Package org.codehaus.groovy.ast
Class AnnotatedNode
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
- All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>,NodeMetaDataHandler
- Direct Known Subclasses:
ClassNode,Expression,FieldNode,ImportNode,MethodNode,PackageNode,Parameter,PropertyNode,RecordComponentNode
Base class for any AST node which is capable of being annotated
-
Field Summary
Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationNode annotation) addAnnotation(ClassNode type) voidaddAnnotations(List<AnnotationNode> annotations) getAnnotations(ClassNode type) Get the groovydocGet GroovydocHolder instancebooleanReturns true for default constructors added by the compiler.booleanIndicates if this node was added by the compiler.voidsetDeclaringClass(ClassNode declaringClass) voidsetHasNoRealSourcePosition(boolean hasNoRealSourcePosition) voidsetSynthetic(boolean synthetic) Sets this node as a node added by the compiler.Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Constructor Details
-
AnnotatedNode
public AnnotatedNode()
-
-
Method Details
-
getAnnotations
-
getAnnotations
-
addAnnotation
-
addAnnotation
-
addAnnotations
-
getDeclaringClass
-
setDeclaringClass
-
getGroovydoc
Description copied from interface:GroovydocHolderGet the groovydoc- Specified by:
getGroovydocin interfaceGroovydocHolder<AnnotatedNode>- Returns:
- the groovydoc
-
getInstance
Description copied from interface:GroovydocHolderGet GroovydocHolder instance- Specified by:
getInstancein interfaceGroovydocHolder<AnnotatedNode>- Returns:
- GroovydocHolder instance
-
hasNoRealSourcePosition
public boolean hasNoRealSourcePosition()Returns true for default constructors added by the compiler.See GROOVY-4161
-
setHasNoRealSourcePosition
public void setHasNoRealSourcePosition(boolean hasNoRealSourcePosition) -
isSynthetic
public boolean isSynthetic()Indicates if this node was added by the compiler.Note: This method has nothing to do with the synthetic flag for classes, fields, methods or properties.
-
setSynthetic
public void setSynthetic(boolean synthetic) Sets this node as a node added by the compiler.Note: This method has nothing to do with the synthetic flag for classes, fields, methods or properties.
-