private void printMembers(final List<BodyDeclaration> members, final Object arg) { for (final BodyDeclaration member : members) { printer.printLn(); member.accept(this, arg); printer.printLn(); } }
private void printMembers(List<BodyDeclaration> members, Object arg) { for (BodyDeclaration member : members) { printer.printLn(); member.accept(this, arg); printer.printLn(); } }
@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 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; }
if (members != null) { for (int i = 0; i < members.size(); i++) { members.set(i, (BodyDeclaration) members.get(i).accept(this, arg));
@Override public Node visit(final ObjectCreationExpr n, final A arg) { if (n.getScope() != null) { n.setScope((Expression) n.getScope().accept(this, arg)); } final List<Type> typeArgs = n.getTypeArgs(); if (typeArgs != null) { for (int i = 0; i < typeArgs.size(); i++) { typeArgs.set(i, (Type) typeArgs.get(i).accept(this, arg)); } removeNulls(typeArgs); } n.setType((ClassOrInterfaceType) n.getType().accept(this, arg)); 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> anonymousClassBody = n.getAnonymousClassBody(); if (anonymousClassBody != null) { for (int i = 0; i < anonymousClassBody.size(); i++) { anonymousClassBody.set(i, (BodyDeclaration) anonymousClassBody.get(i).accept(this, arg)); } removeNulls(anonymousClassBody); } return n; }
if (members != null) { for (int i = 0; i < members.size(); i++) { members.set(i, (BodyDeclaration) members.get(i).accept(this, arg));
@Override public void visit(final ClassOrInterfaceDeclaration n, final String mappedClass) { annotationHelper.visitPre(n, mappedClass); ParserUtil.deconstructMultiDeclarations(ParserUtil.getFieldMembers(n.getMembers())); if (n.getMembers() != null) { for (final BodyDeclaration member : n.getMembers()) { member.accept(this, mappedClass); } } annotationHelper.visitPost(n, mappedClass); }
@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); } } }
for (final BodyDeclaration member : n.getMembers()) { R result = member.accept(this, arg); if (result != null) { return result;
@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 (final BodyDeclaration member : n.getClassBody()) { R result = member.accept(this, arg); if (result != null) { return result;
@Override public void visit(final ObjectCreationExpr n, final A arg) { visitComment(n.getComment(), arg); if (n.getScope() != null) { n.getScope().accept(this, arg); } if (n.getTypeArgs() != null) { for (final Type t : n.getTypeArgs()) { t.accept(this, arg); } } n.getType().accept(this, arg); if (n.getArgs() != null) { for (final Expression e : n.getArgs()) { e.accept(this, arg); } } if (n.getAnonymousClassBody() != null) { for (final BodyDeclaration member : n.getAnonymousClassBody()) { member.accept(this, arg); } } }
@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); } } }
for (final BodyDeclaration member : n.getAnonymousClassBody()) { R result = member.accept(this, arg); if (result != null) { return result;
for (final BodyDeclaration member : n.getMembers()) { R result = member.accept(this, arg); if (result != null) { return result;
member.accept(this, arg);
for (final BodyDeclaration member : n.getMembers()) { R result = member.accept(this, arg); if (result != null) { return result;