Class ModifierNode

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.ModifierNode
All Implemented Interfaces:
NodeMetaDataHandler

public class ModifierNode extends ASTNode
Represents a modifier
  • Field Details

  • Constructor Details

    • ModifierNode

      public ModifierNode(Integer type)
    • ModifierNode

      public ModifierNode(Integer type, String text)
      Parameters:
      type - the modifier type, which is same as the token type
      text - text of the ast node
    • ModifierNode

      public ModifierNode(AnnotationNode annotationNode, String text)
      Parameters:
      annotationNode - the annotation node
      text - text of the ast node
  • Method Details

    • isModifier

      public boolean isModifier()
      Check whether the modifier is not an imagined modifier(annotation, def)
    • isVisibilityModifier

      public boolean isVisibilityModifier()
    • isNonVisibilityModifier

      public boolean isNonVisibilityModifier()
    • isAnnotation

      public boolean isAnnotation()
    • isDef

      public boolean isDef()
    • getType

      public Integer getType()
    • getOpcode

      public Integer getOpcode()
    • isRepeatable

      public boolean isRepeatable()
    • getText

      public String getText()
      Overrides:
      getText in class ASTNode
    • getAnnotationNode

      public AnnotationNode getAnnotationNode()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object