public void visit(FieldDeclaration n, Object arg) { if (n.getJavaDoc() != null) { n.getJavaDoc().accept(this, arg); } printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); n.getType().accept(this, arg); for (Iterator<VariableDeclarator> i = n.getVariables().iterator(); i.hasNext(); ) { VariableDeclarator var = i.next(); var.accept(this, arg); if (i.hasNext()) {} } }
public boolean visit(FieldDeclaration decl) throws Exception { // This is constant declaration: int modifiers = decl.getModifiers(); modifiers = markAsDeprecated(modifiers, decl); modifyDeclaration( decl, new DeclarationInfo( IModelElement.FIELD, modifiers, decl.sourceStart(), decl.sourceEnd() - decl.sourceStart(), decl.getNameStart(), decl.getNameEnd() - decl.getNameStart(), decl.getName(), null, encodeDocInfo(decl), null, null)); return visitGeneral(decl); }
OJModifier getModifiers() { return OJModifier.forParseTree(definition.getModifiers()); }
@Override public AccessFlags getAccessFlags() { return new AccessFlags(declaration.getModifiers()); }