Package org.codehaus.groovy.ast

# 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 Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `static int` | `ANNOTATION_TYPE` |
  `static java.util.Map<java.lang.Integer,​java.lang.Integer>` | `MODIFIER_OPCODE_MAP` |

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ModifierNode​(java.lang.Integer type)` |
  `ModifierNode​(java.lang.Integer type, java.lang.String text)` |
  `ModifierNode​(AnnotationNode annotationNode, java.lang.String text)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `boolean` | `equals​(java.lang.Object o)` |
  `AnnotationNode` | `getAnnotationNode()` |
  `java.lang.Integer` | `getOpcode()` |
  `java.lang.String` | `getText()` |
  `java.lang.Integer` | `getType()` |
  `int` | `hashCode()` |
  `boolean` | `isAnnotation()` |
  `boolean` | `isDef()` |
  `boolean` | `isModifier()` | Check whether the modifier is not an imagined modifier(annotation, def)
  `boolean` | `isNonVisibilityModifier()` |
  `boolean` | `isRepeatable()` |
  `boolean` | `isVisibilityModifier()` |
  `java.lang.String` | `toString()` |

  ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

  `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData`

- ## Field Details

  - ### ANNOTATION_TYPE

    public static final int ANNOTATION_TYPE
    See Also:
      Constant Field Values

  - ### MODIFIER_OPCODE_MAP

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

- ## Constructor Details

  - ### 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 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 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`

  - ### getAnnotationNode

    public AnnotationNode getAnnotationNode()

  - ### equals

    public boolean equals​(java.lang.Object o)
    Overrides:
      `equals` in class `java.lang.Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `java.lang.Object`

  - ### toString

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