@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; }
@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; }
@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 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 R visit(final AnnotationDeclaration n, final A arg) { if (n.getJavaDoc() != null) { R result = n.getJavaDoc().accept(this, arg); if (result != null) { return result; if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { if (n.getMembers() != null) { for (final BodyDeclaration member : n.getMembers()) {
final public AnnotationDeclaration AnnotationTypeDeclaration(Modifier modifier) throws ParseException { NameExpr name; List members; int line = modifier.beginLine; int column = modifier.beginColumn; jj_consume_token(AT); if (line == -1) {line=token.beginLine; column=token.beginColumn;} jj_consume_token(INTERFACE); name = Name(); members = AnnotationTypeBody(); AnnotationDeclaration tmp = new AnnotationDeclaration(line, column, token.endLine, token.endColumn, modifier.modifiers, modifier.annotations, null, members); tmp.setNameExpr(name); {if (true) return tmp;} throw new Error("Missing return statement in function"); }
final public AnnotationDeclaration AnnotationTypeDeclaration(Modifier modifier) throws ParseException { String name; List members; int line = modifier.beginLine; int column = modifier.beginColumn; jj_consume_token(AT); if (line == -1) {line=token.beginLine; column=token.beginColumn;} jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); name = token.image; members = AnnotationTypeBody(); {if (true) return new AnnotationDeclaration(line, column, token.endLine, token.endColumn,popJavadoc(), modifier.modifiers, modifier.annotations, name, members);} throw new Error("Missing return statement in function"); }
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("}"); }