示例#1
0
  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()) {}
    }
  }
示例#2
0
  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());
 }
示例#4
0
 @Override
 public AccessFlags getAccessFlags() {
   return new AccessFlags(declaration.getModifiers());
 }