Class ModifierNode

  • All Implemented Interfaces:
    NodeMetaDataHandler

    public class ModifierNode
    extends ASTNode
    Represents a modifier, which is better to place in the package org.codehaus.groovy.ast

    Created by Daniel.Sun on 2016/08/23.

    • Field Detail

      • MODIFIER_OPCODE_MAP

        public static final java.util.Map<java.lang.Integer,​java.lang.Integer> MODIFIER_OPCODE_MAP
    • Constructor Detail

      • ModifierNode

        public ModifierNode​(java.lang.Integer type)
      • ModifierNode

        public ModifierNode​(java.lang.Integer type,
                            java.lang.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,
                            java.lang.String text)
        Parameters:
        annotationNode - the annotation node
        text - text of the ast node
    • Method Detail

      • 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 java.lang.Integer getType()
      • getOpcode

        public java.lang.Integer getOpcode()
      • isRepeatable

        public boolean isRepeatable()
      • getText

        public java.lang.String getText()
        Overrides:
        getText in class ASTNode
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class ASTNode
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object