Package lombok.ast

Examples of lombok.ast.VariableDefinition.astModifiers()


  public void fieldModifiersCheck(VariableDeclaration vd) {
    TypeDeclaration td = vd.upUpToTypeDeclaration();
    if (td == null) return//not a field.
    VariableDefinition def = vd.astDefinition();
    if (def != null) {
      Modifiers m = def.astModifiers();
      modifiersCheck(m, FIELD_MODIFIERS_EXCLUSIVITY, FIELD_MODIFIERS_LEGAL, "field declarations");
      boolean allFieldsHaveInitializers = true;
      for (VariableDefinitionEntry entry : def.astVariables()) {
        if (entry.rawInitializer() == null) {
          allFieldsHaveInitializers = false;
View Full Code Here


    if (dimClosed != null) for (org.parboiled.Node<Node> pNode : dimClosed) {
      source.registerStructure(e, pNode);
    }
    if (name != null) e.setPosition(new Position(name.getPosition().getStart(), currentPos()));
    VariableDefinition decl = new VariableDefinition().rawTypeReference(type);
    if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
    if (varargs != null && !varargs.trim().isEmpty()) decl.astVarargs(true);
    decl.rawVariables().addToEnd(e);
    return posify(decl);
  }
 
View Full Code Here

        break;
      }
    }
   
    VariableDefinition def = new VariableDefinition();
    def.astModifiers((Modifiers) toTree(first.mods));
    setPos(decls.get(decls.size()-1), def);
    if (decls.size() > 1) def.setPosition(new Position(startPosFirst, def.getPosition().getEnd()));
    int baseDims = countDims(baseType);
    if ((first.mods.flags & Flags.VARARGS) != 0) {
      def.astVarargs(true);
View Full Code Here

            // The Lombok AST uses a flat hierarchy of node type implementation classes
            // so no need to do instanceof stuff here.
            if (type == VariableDefinition.class) {
                // Variable
                VariableDefinition declaration = (VariableDefinition) scope;
                if (isSuppressed(issue, declaration.astModifiers())) {
                    return true;
                }
            } else if (type == MethodDeclaration.class) {
                // Method
                // Look for annotations on the method
View Full Code Here

                }
            } else if (type == MethodDeclaration.class) {
                // Method
                // Look for annotations on the method
                MethodDeclaration declaration = (MethodDeclaration) scope;
                if (isSuppressed(issue, declaration.astModifiers())) {
                    return true;
                }
            } else if (type == ConstructorDeclaration.class) {
                // Constructor
                // Look for annotations on the method
View Full Code Here

                }
            } else if (type == ConstructorDeclaration.class) {
                // Constructor
                // Look for annotations on the method
                ConstructorDeclaration declaration = (ConstructorDeclaration) scope;
                if (isSuppressed(issue, declaration.astModifiers())) {
                    return true;
                }
            } else if (type == ClassDeclaration.class) {
                // Class
                ClassDeclaration declaration = (ClassDeclaration) scope;
View Full Code Here

                    return true;
                }
            } else if (type == ClassDeclaration.class) {
                // Class
                ClassDeclaration declaration = (ClassDeclaration) scope;
                if (isSuppressed(issue, declaration.astModifiers())) {
                    return true;
                }
            }

            if (checkComments && context.isSuppressed(scope, issue)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.