Class SimpleGroovyFieldDoc

All Implemented Interfaces:
Comparable<GroovyDoc>, GroovyDoc, GroovyFieldDoc, GroovyMemberDoc, GroovyProgramElementDoc

public class SimpleGroovyFieldDoc extends SimpleGroovyMemberDoc implements GroovyFieldDoc
Default GroovyFieldDoc implementation.
  • Constructor Details

    • SimpleGroovyFieldDoc

      public SimpleGroovyFieldDoc(String name, GroovyClassDoc belongsToClass)
      Creates a documented field owned by the supplied class.
      Parameters:
      name - the field name
      belongsToClass - the declaring class
  • Method Details

    • constantValue

      public Object constantValue()
      Returns the constant value of this field when one is available.
      Specified by:
      constantValue in interface GroovyFieldDoc
      Returns:
      the constant value, or null if none is defined
    • setConstantValueExpression

      public void setConstantValueExpression(String constantValueExpression)
      Stores the source expression used to initialize this field's constant value.
      Parameters:
      constantValueExpression - the constant value expression
    • constantValueExpression

      public String constantValueExpression()
      Returns the source expression used to define the constant value.
      Specified by:
      constantValueExpression in interface GroovyFieldDoc
      Returns:
      the constant value expression, or null if none is available
    • isTransient

      public boolean isTransient()
      Indicates whether this field is declared transient.
      Specified by:
      isTransient in interface GroovyFieldDoc
      Returns:
      true if this field is transient
    • isVolatile

      public boolean isVolatile()
      Indicates whether this field is declared volatile.
      Specified by:
      isVolatile in interface GroovyFieldDoc
      Returns:
      true if this field is volatile
    • type

      public GroovyType type()
      Returns the declared type of this field.
      Specified by:
      type in interface GroovyFieldDoc
      Returns:
      the field type
    • setType

      public void setType(GroovyType type)
      Sets the resolved type for this field.
      Parameters:
      type - the field type