public class SimpleGroovyProgramElementDoc
extends SimpleGroovyDoc
implements GroovyProgramElementDoc
Base implementation for documented program elements with modifiers, package ownership, and annotations.
| Fields inherited from class | Fields |
|---|---|
class SimpleGroovyDoc |
ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF |
| Constructor and description |
|---|
SimpleGroovyProgramElementDoc(String name)Creates a documented program element with the supplied name. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addAnnotationRef(GroovyAnnotationRef ref)Adds an annotation declared on this element. |
|
public GroovyAnnotationRef[] |
annotations()Returns the annotations declared on this element.
|
|
public GroovyClassDoc |
containingClass()Returns the containing class for this element.
|
|
public GroovyPackageDoc |
containingPackage()Returns the package that contains this element.
|
|
public boolean |
isFinal()Indicates whether this element is declared final.
|
|
public boolean |
isPackagePrivate()Indicates whether this element has package-private visibility.
|
|
public boolean |
isPrivate()Indicates whether this element is declared private.
|
|
public boolean |
isProtected()Indicates whether this element is declared protected.
|
|
public boolean |
isPublic()Indicates whether this element is declared public.
|
|
public boolean |
isStatic()Indicates whether this element is declared static.
|
|
public int |
modifierSpecifier()Returns the modifier flags for this element.
|
|
public String |
modifiers()Returns the rendered modifier text for this element.
|
|
public String |
qualifiedName()Returns the fully qualified name of this element.
|
|
public void |
setContainingPackage(GroovyPackageDoc packageDoc)Associates this element with its containing package. |
|
public void |
setFinal(boolean b)Sets whether this element is final. |
|
public void |
setPackagePrivate(boolean b)Sets whether this element has package-private visibility. |
|
public void |
setPrivate(boolean b)Sets whether this element is private. |
|
public void |
setProtected(boolean b)Sets whether this element is protected. |
|
public void |
setPublic(boolean b)Sets whether this element is public. |
|
public void |
setStatic(boolean b)Sets whether this element is static. |
| Methods inherited from class | Name |
|---|---|
class SimpleGroovyDoc |
calculateFirstSentence, commentText, compareTo, firstSentenceCommentText, 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, toString, tokenType |
Creates a documented program element with the supplied name.
name - the element nameAdds an annotation declared on this element.
ref - the annotation reference to addReturns the annotations declared on this element.
Returns the containing class for this element.
null if this element is not nested within a classReturns the package that contains this element.
null if none is available Indicates whether this element is declared final.
true if this element is finalIndicates whether this element has package-private visibility.
true if this element is package-private Indicates whether this element is declared private.
true if this element is private Indicates whether this element is declared protected.
true if this element is protected Indicates whether this element is declared public.
true if this element is public Indicates whether this element is declared static.
true if this element is staticReturns the modifier flags for this element.
Returns the rendered modifier text for this element.
Returns the fully qualified name of this element.
Associates this element with its containing package.
packageDoc - the containing packageSets whether this element is final.
b - true if the element is finalSets whether this element has package-private visibility.
b - true if the element is package-privateSets whether this element is private.
b - true if the element is privateSets whether this element is protected.
b - true if the element is protectedSets whether this element is public.
b - true if the element is publicSets whether this element is static.
b - true if the element is staticCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.