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 modifierCreated by Daniel.Sun on 2016/08/23.
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intANNOTATION_TYPEstatic Map<Integer,Integer>MODIFIER_OPCODE_MAP 
- 
Constructor Summary
Constructors Constructor Description ModifierNode(Integer type)ModifierNode(Integer type, String text)ModifierNode(AnnotationNode annotationNode, String text) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)AnnotationNodegetAnnotationNode()IntegergetOpcode()StringgetText()IntegergetType()inthashCode()booleanisAnnotation()booleanisDef()booleanisModifier()Check whether the modifier is not an imagined modifier(annotation, def)booleanisNonVisibilityModifier()booleanisRepeatable()booleanisVisibilityModifier()StringtoString()- 
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 Detail
- 
ANNOTATION_TYPE
public static final int ANNOTATION_TYPE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ModifierNode
public ModifierNode(Integer type)
 
- 
ModifierNode
public ModifierNode(Integer type, String text)
- Parameters:
 type- the modifier type, which is same as the token typetext- text of the ast node
 
- 
ModifierNode
public ModifierNode(AnnotationNode annotationNode, String text)
- Parameters:
 annotationNode- the annotation nodetext- 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 Integer getType()
 
- 
getOpcode
public Integer getOpcode()
 
- 
isRepeatable
public boolean isRepeatable()
 
- 
getAnnotationNode
public AnnotationNode getAnnotationNode()
 
 - 
 
 -