@Override public void visit(final EnumConstantDeclaration 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.getArgs() != null) { for (final Expression e : n.getArgs()) { e.accept(this, arg); } } if (n.getClassBody() != null) { for (final BodyDeclaration member : n.getClassBody()) { member.accept(this, arg); } } }
@Override public Node visit(EnumConstantDeclaration _n, Object _arg) { JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg); List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); List<Expression> args = visit(_n.getArgs(), _arg); List<BodyDeclaration> classBody = visit(_n.getClassBody(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); EnumConstantDeclaration r = new EnumConstantDeclaration( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), annotations, _n.getName(), args, classBody ); r.setComment(comment); return r; }
@Override public void visit(final EnumConstantDeclaration n, final Object arg) { printJavaComment(n.getComment(), arg); printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printer.print(n.getName()); if (n.getArgs() != null) { printArguments(n.getArgs(), arg); } if (n.getClassBody() != null) { printer.printLn(" {"); printer.indent(); printMembers(n.getClassBody(), arg); printer.unindent(); printer.printLn("}"); } }