@Override public void visit(ClassOrInterfaceDeclaration n, List<String> excludedMethods) { n.setAnnotations(null); List<MethodDeclaration> methodToRemove = new ArrayList<MethodDeclaration>(); for (BodyDeclaration bodyDeclaration : n.getMembers()) { if(bodyDeclaration instanceof MethodDeclaration) { MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration; if (excludedMethods.contains(methodDeclaration.getName())) { methodToRemove.add(methodDeclaration); } } } n.getMembers().removeAll(methodToRemove); // if (n.getAnnotations() != null) annotationExprs.addAll(n.getAnnotations()); n.setName(name); super.visit(n, excludedMethods); }
n.setJavaDoc((JavadocComment) n.getJavaDoc().accept(this, arg)); final List<AnnotationExpr> annotations = n.getAnnotations(); if (annotations != null) { for (int i = 0; i < annotations.size(); i++) {
@Override public void visit(ClassOrInterfaceDeclaration n, Object arg) { if (n.getAnnotations() != null) annotationExprs.addAll(n.getAnnotations()); List<FieldInfo> fieldInfos = new ArrayList<FieldInfo>(); n.setModifiers(n.getModifiers() & ~Modifier.ABSTRACT & ~Modifier.PUBLIC); if (n.getAnnotations() != null) annotationExprs.addAll(n.getAnnotations()); super.visit(n, arg);
@Override public void visit(ClassOrInterfaceDeclaration n, Object arg) { currentClass = new CGEntry(CGEntry.TYPE.CLASS, currentClass, null, n.getName()); if (mainClass == null) { mainClass = currentClass; mainClass.setMainClass(true); mainClass.setPackage(pack); } if (isDebug()) System.out.println("C:" + currentClass); list.add(currentClass); List<AnnotationExpr> annos = n.getAnnotations(); if (annos != null) { for (AnnotationExpr anno : annos) { if (isDebug()) System.out.println("A:" + anno.getName()); currentClass.addAnnotation(new CGEntry(TYPE.ANNOTATION, currentClass, currentMethod, anno.getName().getName())); } } super.visit(n, arg); if (currentClass != null ) currentClass = currentClass.getClazz(); }
public void visit(ClassOrInterfaceDeclaration n, Object arg) { printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers());
@Override public void visit(final ClassOrInterfaceDeclaration n, final Object arg) { printJavaComment(n.getComment(), arg); printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers());
n.getJavaDoc().accept(this, arg); if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { a.accept(this, arg);
@Override public Boolean visit(final ClassOrInterfaceDeclaration n1, final Node arg) { final ClassOrInterfaceDeclaration n2 = (ClassOrInterfaceDeclaration) arg; // javadoc are checked at CompilationUnit if (n1.getModifiers() != n2.getModifiers()) { return Boolean.FALSE; } if (n1.isInterface() != n2.isInterface()) { return Boolean.FALSE; } if (!objEquals(n1.getName(), n2.getName())) { return Boolean.FALSE; } if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) { return Boolean.FALSE; } if (!nodesEquals(n1.getTypeParameters(), n2.getTypeParameters())) { return Boolean.FALSE; } if (!nodesEquals(n1.getExtends(), n2.getExtends())) { return Boolean.FALSE; } if (!nodesEquals(n1.getImplements(), n2.getImplements())) { return Boolean.FALSE; } if (!nodesEquals(n1.getMembers(), n2.getMembers())) { return Boolean.FALSE; } return Boolean.TRUE; }
if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) {
@Override public Node visit(ClassOrInterfaceDeclaration _n, Object _arg) { JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg); List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); List<TypeParameter> typeParameters = visit(_n.getTypeParameters(), _arg); List<ClassOrInterfaceType> extendsList = visit(_n.getExtends(), _arg); List<ClassOrInterfaceType> implementsList = visit(_n.getImplements(), _arg); List<BodyDeclaration> members = visit(_n.getMembers(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); ClassOrInterfaceDeclaration r = new ClassOrInterfaceDeclaration( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getModifiers(), annotations, _n.isInterface(), _n.getName(), typeParameters, extendsList, implementsList, members ); r.setComment(comment); return r; }