@Override public Node visit(final AnnotationDeclaration n, final A arg) { if (n.getJavaDoc() != null) { 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++) { annotations.set(i, (AnnotationExpr) annotations.get(i).accept(this, arg)); } removeNulls(annotations); } final List<BodyDeclaration> members = n.getMembers(); if (members != null) { for (int i = 0; i < members.size(); i++) { members.set(i, (BodyDeclaration) members.get(i).accept(this, arg)); } removeNulls(members); } return n; }
@Override public void visit(final AnnotationDeclaration n, final A arg) { visitComment(n.getComment(), arg); if (n.getJavaDoc() != null) { n.getJavaDoc().accept(this, arg); } if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { a.accept(this, arg); } } if (n.getMembers() != null) { for (final BodyDeclaration member : n.getMembers()) { member.accept(this, arg); } } }
@Override public Boolean visit(final AnnotationDeclaration n1, final Node arg) { final AnnotationDeclaration n2 = (AnnotationDeclaration) arg; // javadoc are checked at CompilationUnit if (n1.getModifiers() != n2.getModifiers()) { return Boolean.FALSE; } if (!objEquals(n1.getName(), n2.getName())) { return Boolean.FALSE; } if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) { return Boolean.FALSE; } if (!nodesEquals(n1.getMembers(), n2.getMembers())) { return Boolean.FALSE; } return Boolean.TRUE; }
if (n.getMembers() != null) { for (final BodyDeclaration member : n.getMembers()) {
public void visit(AnnotationDeclaration n, Object arg) { printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); printer.print("@interface "); printer.print(n.getName()); printer.printLn(" {"); printer.indent(); if (n.getMembers() != null) { printMembers(n.getMembers(), arg); } printer.unindent(); printer.print("}"); }
@Override public void visit(final AnnotationDeclaration n, final Object arg) { printJavaComment(n.getComment(), arg); printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); printer.print("@interface "); printer.print(n.getName()); printer.printLn(" {"); printer.indent(); if (n.getMembers() != null) { printMembers(n.getMembers(), arg); } printer.unindent(); printer.print("}"); }
@Override public Node visit(AnnotationDeclaration _n, Object _arg) { JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg); List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); List<BodyDeclaration> members = visit(_n.getMembers(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); AnnotationDeclaration r = new AnnotationDeclaration( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getModifiers(), annotations, _n.getName(), members ); r.setComment(comment); return r; }