@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 Boolean visit(final EnumConstantDeclaration n1, final Node arg) { final EnumConstantDeclaration n2 = (EnumConstantDeclaration) arg; // javadoc are checked at CompilationUnit if (!objEquals(n1.getName(), n2.getName())) { return Boolean.FALSE; } if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) { return Boolean.FALSE; } if (!nodesEquals(n1.getArgs(), n2.getArgs())) { return Boolean.FALSE; } if (!nodesEquals(n1.getClassBody(), n2.getClassBody())) { return Boolean.FALSE; } return Boolean.TRUE; }
if (entries != null) { for (int i = 0; i < entries.size(); i++) { entries.set(i, (EnumConstantDeclaration) entries.get(i).accept(this, arg));
EnumConstantDeclaration tmp = new EnumConstantDeclaration(line, column, token.endLine, token.endColumn, annotations, name, args, classBody);
@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); } } }
for (Iterator<EnumConstantDeclaration> i = n.getEntries().iterator(); i.hasNext();) { EnumConstantDeclaration e = i.next(); e.accept(this, arg); if (i.hasNext()) { printer.print(", ");
{if (true) return new EnumConstantDeclaration(line, column, token.endLine, token.endColumn,popJavadoc(), annotations, name, args, classBody);} throw new Error("Missing return statement in function");
@Override public R visit(final EnumConstantDeclaration 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.getArgs() != null) { for (final Expression e : n.getArgs()) { if (n.getClassBody() != null) { for (final BodyDeclaration member : n.getClassBody()) {
for (final Iterator<EnumConstantDeclaration> i = n.getEntries().iterator(); i.hasNext();) { final EnumConstantDeclaration e = i.next(); e.accept(this, arg); if (i.hasNext()) { printer.print(", ");
public void visit(EnumConstantDeclaration n, Object 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("}"); } }
@Override public void visit(final EnumDeclaration 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.getImplements() != null) { for (final ClassOrInterfaceType c : n.getImplements()) { c.accept(this, arg); } } if (n.getEntries() != null) { for (final EnumConstantDeclaration e : n.getEntries()) { e.accept(this, arg); } } if (n.getMembers() != null) { for (final BodyDeclaration member : n.getMembers()) { member.accept(this, arg); } } }
@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("}"); } }
for (final EnumConstantDeclaration e : n.getEntries()) { R result = e.accept(this, arg); if (result != null) { return result;
@Override public Node visit(final EnumConstantDeclaration 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<Expression> args = n.getArgs(); if (args != null) { for (int i = 0; i < args.size(); i++) { args.set(i, (Expression) args.get(i).accept(this, arg)); } removeNulls(args); } final List<BodyDeclaration> classBody = n.getClassBody(); if (classBody != null) { for (int i = 0; i < classBody.size(); i++) { classBody.set(i, (BodyDeclaration) classBody.get(i).accept(this, arg)); } removeNulls(classBody); } return n; }