@Override public Object visit(ASTMethodDeclaration node, Object data) { if (!node.isAbstract()) { if (node.getFirstParentOfType(ASTAnyTypeDeclaration.class) == exploredClass) { currentMethodName = node.getQualifiedName().getOperation(); methodAttributeAccess.put(currentMethodName, new HashSet<String>()); super.visit(node, data); currentMethodName = null; } else { super.visit(node, data); } } return null; }
final ASTClassOrInterfaceDeclaration classOrInterface = node.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class); if (classOrInterface != null && //Don't analyze enums, which cannot subclass clone() (node.isFinal() || classOrInterface.isFinal())) {
ASTTypeDeclaration td = method.getFirstParentOfType(ASTTypeDeclaration.class); for (ASTReturnStatement ret : returns) { final String vn = getReturnedVariableName(ret);
private boolean isInInnerClassOrInterface(ASTMethodDeclaration md) { ASTClassOrInterfaceDeclaration p = md.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class); return p != null && p.isNested(); }
private boolean threadFactoryVariable(ASTAllocationExpression node) { ASTMethodDeclaration methodDeclaration = node.getFirstParentOfType(ASTMethodDeclaration.class); if (methodDeclaration == null) { return false; } ASTVariableDeclarator variableDeclarator = methodDeclaration.getFirstParentOfType(ASTVariableDeclarator.class); return variableDeclarator != null && variableDeclarator.getType() == ThreadFactory.class; }
@Override public Object visit(ASTMethodDeclaration node, Object data) { if (!node.isAbstract()) { if (node.getFirstParentOfType(ASTAnyTypeDeclaration.class) == exploredClass) { currentMethodName = node.getQualifiedName().getOperation(); methodAttributeAccess.put(currentMethodName, new HashSet<String>()); super.visit(node, data); currentMethodName = null; } else { super.visit(node, data); } } return null; }
final ASTClassOrInterfaceDeclaration classOrInterface = node.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class); if (classOrInterface != null && //Don't analyze enums, which cannot subclass clone() (node.isFinal() || classOrInterface.isFinal())) {
ASTTypeDeclaration td = method.getFirstParentOfType(ASTTypeDeclaration.class); for (ASTReturnStatement ret : returns) { final String vn = getReturnedVariableName(ret);