Examples of astModifiers()


Examples of lombok.ast.TypeDeclaration.astModifiers()

    Modifiers modifiers = md.astModifiers();
    if (modifiers == null) return;
    if (!modifiers.isAbstract()) return;
    TypeDeclaration parent = md.upUpToTypeDeclaration();
    if (parent != null) {
      Modifiers modifiersOfParent = parent.astModifiers();
      if (modifiersOfParent != null && modifiersOfParent.isAbstract()) return;
      md.addMessage(error(MODIFIERS_ABSTRACT_NOT_ALLOWED, "Abstract methods are only allowed in interfaces and abstract classes"));
    }
  }
 
View Full Code Here

Examples of lombok.ast.TypeDeclaration.astModifiers()

      } else {
        throw new IllegalStateException("Unknown type declaration: " + node);
      }
     
      typeDecl.astName(new Identifier().astValue(name));
      typeDecl.astModifiers((Modifiers) toTree(node.mods));
      addJavadoc(typeDecl, node.mods);
      set(node, typeDecl);
    }
   
    @Override public void visitModifiers(JCModifiers node) {
View Full Code Here

Examples of lombok.ast.VariableDefinition.astModifiers()

            // 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

Examples of lombok.ast.VariableDefinition.astModifiers()

                }
            } 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

Examples of lombok.ast.VariableDefinition.astModifiers()

                }
            } 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

Examples of lombok.ast.VariableDefinition.astModifiers()

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

            scope = scope.getParent();
View Full Code Here

Examples of lombok.ast.VariableDefinition.astModifiers()

            // 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

Examples of lombok.ast.VariableDefinition.astModifiers()

                }
            } 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

Examples of lombok.ast.VariableDefinition.astModifiers()

                }
            } 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

Examples of lombok.ast.VariableDefinition.astModifiers()

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

            scope = scope.getParent();
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.