Class SimpleGroovyAnnotationRef

java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyAnnotationRef
All Implemented Interfaces:
GroovyAnnotationRef

public class SimpleGroovyAnnotationRef extends Object implements GroovyAnnotationRef
Default GroovyAnnotationRef implementation backed by parsed source text.
  • Constructor Details

    • SimpleGroovyAnnotationRef

      public SimpleGroovyAnnotationRef(String name, String desc)
      Creates an annotation reference from its simple name and raw source description.
      Parameters:
      name - the annotation name
      desc - the raw source description of the annotation
  • Method Details

    • setType

      public void setType(GroovyClassDoc type)
      Associates the resolved annotation type with this reference.
      Parameters:
      type - the resolved annotation type
    • type

      public GroovyClassDoc type()
      The annotation being referenced.
      Specified by:
      type in interface GroovyAnnotationRef
      Returns:
      the annotation being referenced
    • isTypeAvailable

      public boolean isTypeAvailable()
      Indicates whether the annotation type has been resolved.
      Returns:
      true if the annotation type is available
    • name

      public String name()
      Name of the annotation being referenced. Once resolved, equates to type().typeName().
      Specified by:
      name in interface GroovyAnnotationRef
      Returns:
      the name of the annotation reference
    • setName

      public void setName(String name)
      Replaces the annotation name used by this reference.
      Parameters:
      name - the annotation name to store
    • description

      public String 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:
      description in interface GroovyAnnotationRef
      Returns:
      the text representation of the annotation ref