Class SimpleGroovyAnnotationRef
java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyAnnotationRef
- All Implemented Interfaces:
GroovyAnnotationRef
Default
GroovyAnnotationRef implementation backed by parsed source text.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleGroovyAnnotationRef(String name, String desc) Creates an annotation reference from its simple name and raw source description. -
Method Summary
Modifier and TypeMethodDescriptionThe string representation of the annotation reference.booleanIndicates whether the annotation type has been resolved.name()Name of the annotation being referenced.voidReplaces the annotation name used by this reference.voidsetType(GroovyClassDoc type) Associates the resolved annotation type with this reference.type()The annotation being referenced.
-
Constructor Details
-
SimpleGroovyAnnotationRef
Creates an annotation reference from its simple name and raw source description.- Parameters:
name- the annotation namedesc- the raw source description of the annotation
-
-
Method Details
-
setType
Associates the resolved annotation type with this reference.- Parameters:
type- the resolved annotation type
-
type
The annotation being referenced.- Specified by:
typein interfaceGroovyAnnotationRef- Returns:
- the annotation being referenced
-
isTypeAvailable
public boolean isTypeAvailable()Indicates whether the annotation type has been resolved.- Returns:
trueif the annotation type is available
-
name
Name of the annotation being referenced. Once resolved, equates totype().typeName().- Specified by:
namein interfaceGroovyAnnotationRef- Returns:
- the name of the annotation reference
-
setName
Replaces the annotation name used by this reference.- Parameters:
name- the annotation name to store
-
description
The string representation of the annotation reference. Initially implemented as a temporary hack stored from the source. To be replaced with strong-typed finer grained information.- Specified by:
descriptionin interfaceGroovyAnnotationRef- Returns:
- the text representation of the annotation ref
-