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
 
 public class AnnotatedNode extends ASTNode implements GroovydocHolder<AnnotatedNode> Base class for any AST node which is capable of being annotated
- 
- 
Field Summary- 
Fields inherited from interface groovy.lang.groovydoc.GroovydocHolderDOC_COMMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description AnnotatedNode()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(AnnotationNode annotation)voidaddAnnotations(List<AnnotationNode> annotations)List<AnnotationNode>getAnnotations()List<AnnotationNode>getAnnotations(ClassNode type)ClassNodegetDeclaringClass()GroovydocgetGroovydoc()Get the groovydocAnnotatedNodegetInstance()Get GroovydocHolder instancebooleanhasNoRealSourcePosition()Returns true for default constructors added by the compiler.booleanisSynthetic()Indicates 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.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
 
- 
 
- 
- 
- 
Method Detail- 
getAnnotationspublic List<AnnotationNode> getAnnotations() 
 - 
getAnnotationspublic List<AnnotationNode> getAnnotations(ClassNode type) 
 - 
addAnnotationpublic void addAnnotation(AnnotationNode annotation) 
 - 
addAnnotationspublic void addAnnotations(List<AnnotationNode> annotations) 
 - 
getDeclaringClasspublic ClassNode getDeclaringClass() 
 - 
setDeclaringClasspublic void setDeclaringClass(ClassNode declaringClass) 
 - 
getGroovydocpublic Groovydoc getGroovydoc() Description copied from interface:GroovydocHolderGet the groovydoc- Specified by:
- getGroovydocin interface- GroovydocHolder<AnnotatedNode>
- Returns:
- the groovydoc
 
 - 
getInstancepublic AnnotatedNode getInstance() Description copied from interface:GroovydocHolderGet GroovydocHolder instance- Specified by:
- getInstancein interface- GroovydocHolder<AnnotatedNode>
- Returns:
- GroovydocHolder instance
 
 - 
hasNoRealSourcePositionpublic boolean hasNoRealSourcePosition() Returns true for default constructors added by the compiler.See GROOVY-4161 
 - 
setHasNoRealSourcePositionpublic void setHasNoRealSourcePosition(boolean hasNoRealSourcePosition) 
 - 
isSyntheticpublic 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. 
 - 
setSyntheticpublic 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. 
 
- 
 
-