Class SimpleGroovyFieldDoc
java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyProgramElementDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyAbstractableElementDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyMemberDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyFieldDoc
- All Implemented Interfaces:
Comparable<GroovyDoc>,GroovyDoc,GroovyFieldDoc,GroovyMemberDoc,GroovyProgramElementDoc
Default
GroovyFieldDoc implementation.-
Field Summary
Fields inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyMemberDoc
belongsToClassFields inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF -
Constructor Summary
ConstructorsConstructorDescriptionSimpleGroovyFieldDoc(String name, GroovyClassDoc belongsToClass) Creates a documented field owned by the supplied class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the constant value of this field when one is available.Returns the source expression used to define the constant value.booleanIndicates whether this field is declaredtransient.booleanIndicates whether this field is declaredvolatile.voidsetConstantValueExpression(String constantValueExpression) Stores the source expression used to initialize this field's constant value.voidsetType(GroovyType type) Sets the resolved type for this field.type()Returns the declared type of this field.Methods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyMemberDoc
commentText, firstSentenceCommentText, isSyntheticMethods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyAbstractableElementDoc
isAbstract, setAbstractMethods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyProgramElementDoc
addAnnotationRef, annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName, setContainingPackage, setFinal, setPackagePrivate, setPrivate, setProtected, setPublic, setStaticMethods inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
calculateFirstSentence, compareTo, getRawCommentText, getTypeDescription, getTypeSourceDescription, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isDeprecated, isEnum, isEnumConstant, isError, isException, isField, isHidden, isIncluded, isInterface, isMarkdown, isMethod, isOrdinaryClass, isRecord, isScript, isTrait, name, setCommentText, setDeprecated, setFirstSentenceCommentText, setHidden, setMarkdown, setRawCommentText, setScript, setTokenType, tags, tokenType, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.codehaus.groovy.groovydoc.GroovyDoc
commentText, firstSentenceCommentText, getRawCommentText, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isDeprecated, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, isRecord, name, setRawCommentTextMethods inherited from interface org.codehaus.groovy.groovydoc.GroovyMemberDoc
isSyntheticMethods inherited from interface org.codehaus.groovy.groovydoc.GroovyProgramElementDoc
annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
-
Constructor Details
-
SimpleGroovyFieldDoc
Creates a documented field owned by the supplied class.- Parameters:
name- the field namebelongsToClass- the declaring class
-
-
Method Details
-
constantValue
Returns the constant value of this field when one is available.- Specified by:
constantValuein interfaceGroovyFieldDoc- Returns:
- the constant value, or
nullif none is defined
-
setConstantValueExpression
Stores the source expression used to initialize this field's constant value.- Parameters:
constantValueExpression- the constant value expression
-
constantValueExpression
Returns the source expression used to define the constant value.- Specified by:
constantValueExpressionin interfaceGroovyFieldDoc- Returns:
- the constant value expression, or
nullif none is available
-
isTransient
public boolean isTransient()Indicates whether this field is declaredtransient.- Specified by:
isTransientin interfaceGroovyFieldDoc- Returns:
trueif this field is transient
-
isVolatile
public boolean isVolatile()Indicates whether this field is declaredvolatile.- Specified by:
isVolatilein interfaceGroovyFieldDoc- Returns:
trueif this field is volatile
-
type
Returns the declared type of this field.- Specified by:
typein interfaceGroovyFieldDoc- Returns:
- the field type
-
setType
Sets the resolved type for this field.- Parameters:
type- the field type
-