Package: org.codehaus.groovy.ast

## [Java] Class ModifierNode

- org.codehaus.groovy.ast.ModifierNode

- Represents a modifier

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

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `ANNOTATION_TYPE` |
    `static Map<Integer, Integer>` | `MODIFIER_OPCODE_MAP` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ModifierNode (Integer type)`
    `ModifierNode (Integer type, String text)` Parameters: `type` - the modifier type, which is same as the token type
    `ModifierNode (AnnotationNode annotationNode, String text)` Parameters: `annotationNode` - the annotation node

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `equals(Object o)`
    `` | `AnnotationNode` | `getAnnotationNode()`
    `` | `Integer` | `getOpcode()`
    `` | `String` | `getText()`
    `` | `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()`
    `` | `String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, hashCode, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

- - ### Field Detail

    - #### public static final int ANNOTATION_TYPE

    - #### public static final Map<Integer, Integer> MODIFIER_OPCODE_MAP

  - ### Constructor Detail

    - #### public ModifierNode(Integer type)

    - #### public ModifierNode(Integer type, String text)

      Parameters:
        `type` - the modifier type, which is same as the token type
        `text` - text of the ast node

    - #### public ModifierNode(AnnotationNode annotationNode, String text)

      Parameters:
        `annotationNode` - the annotation node
        `text` - text of the ast node

  - ### Method Detail

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean equals(Object o)

    - #### public AnnotationNode getAnnotationNode()

    - #### public Integer getOpcode()

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public String getText()

    - #### public Integer getType()

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public int hashCode()

    - #### public boolean isAnnotation()

    - #### public boolean isDef()

    - #### public boolean isModifier()

      Check whether the modifier is not an imagined modifier(annotation, def)

    - #### public boolean isNonVisibilityModifier()

    - #### public boolean isRepeatable()

    - #### public boolean isVisibilityModifier()

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public String toString()