public class SimpleGroovyClassDoc
extends SimpleGroovyAbstractableElementDoc
implements GroovyClassDoc
Default GroovyClassDoc implementation for classes parsed from Groovy or Java source.
| Modifiers | Name | Description |
|---|---|---|
static Pattern |
CODE_REGEX |
Pattern used to locate {@code ...} style inline tags for angle-bracket escaping. |
static String |
DOCROOT_PATTERN |
Pattern used to replace ../../../../../ references. |
static String |
DOCROOT_PATTERN2 |
Pattern used to replace ../../../../../ references. |
static Pattern |
NAME_ARGS_REGEX |
Pattern used to split a method reference into its name and argument list. |
static Pattern |
REF_LABEL_REGEX |
Pattern used to split a reference target from its optional label. |
static Pattern |
SPLIT_ARGS_REGEX |
Pattern used to split comma-separated method argument declarations. |
| Fields inherited from class | Fields |
|---|---|
class SimpleGroovyDoc |
ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF |
| Constructor and description |
|---|
SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String, String> aliases, String name, List<LinkArgument> links)Creates a documented class with explicit imports, aliases, and external links. |
SimpleGroovyClassDoc(List<String> importedClassesAndPackages, Map<String, String> aliases, String name)Creates a documented class with explicit imports and aliases. |
SimpleGroovyClassDoc(List<String> importedClassesAndPackages, String name)Creates a documented class with explicit imports and no aliases. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
add(GroovyConstructorDoc constructor)Adds a constructor to this class. |
|
public boolean |
add(GroovyFieldDoc field)Adds a field to this class. |
|
public boolean |
add(GroovyMethodDoc method)Adds a method to this class. |
|
public boolean |
addEnumConstant(GroovyFieldDoc field)Adds an enum constant to this class. |
|
public void |
addInterfaceName(String className)Adds the name of an implemented or extended interface for later resolution. |
|
public boolean |
addNested(GroovyClassDoc nestedClass)Adds a nested class or interface to this class. |
|
public boolean |
addProperty(GroovyFieldDoc property)Adds a property to this class. |
|
public String |
commentText()Returns the processed comment text for this element.
|
|
public GroovyConstructorDoc[] |
constructors()returns a sorted array of constructors |
|
public GroovyConstructorDoc[] |
constructors(boolean filter)Returns the constructors declared by this type, optionally applying the active visibility filter.
|
|
public boolean |
definesSerializableFields()Indicates whether this type explicitly defines serializable fields metadata.
|
|
public static String |
encodeAngleBrackets(String text)Escapes angle brackets in plain text so they remain visible in rendered HTML. |
|
public static String |
encodeAngleBracketsInTagBody(String text, Pattern regex)Replaces angle brackets inside a tag. |
|
public GroovyFieldDoc[] |
enumConstants()returns a sorted array of enum constants |
|
public GroovyFieldDoc[] |
fields()returns a sorted array of fields |
|
public GroovyFieldDoc[] |
fields(boolean filter)Returns the fields declared by this type, optionally applying the active visibility filter.
|
|
public GroovyClassDoc |
findClass(String className)Resolves a referenced class name from the context of this type.
|
|
public String |
firstSentenceCommentText()Returns the first sentence of the processed comment text.
|
|
public String |
getDocUrl(String type)Builds a documentation URL for the supplied type using the current rendering context. |
|
public String |
getDocUrl(String type, boolean full)Builds a documentation URL for the supplied type using the current rendering context. |
|
public static String |
getDocUrl(String type, boolean full, List<LinkArgument> links, String relativePath, GroovyRootDoc rootDoc, SimpleGroovyClassDoc classDoc)Builds a documentation URL for the supplied type using explicit rendering context inputs. |
|
public String |
getFullPathName() |
|
public String |
getNameWithTypeArgs()Returns the rendered class name including any type arguments. |
|
public GroovyClassDoc |
getOuter()Returns the enclosing class when this class is nested. |
|
public List<GroovyClassDoc> |
getParentClasses()Returns this class together with its resolved superclass chain. |
|
public Set<GroovyClassDoc> |
getParentInterfaces()Returns this class and all interfaces reachable from its direct interfaces. |
|
public String |
getRelativeRootPath() |
|
public String |
getSuperClassName()Returns the unresolved superclass name parsed from source. |
|
public GroovyClassDoc[] |
importedClasses()Returns the explicitly imported classes visible to this type.
|
|
public GroovyPackageDoc[] |
importedPackages()Returns the imported packages visible to this type.
|
|
public GroovyClassDoc[] |
innerClasses()returns a sorted array of nested classes and interfaces |
|
public GroovyClassDoc[] |
innerClasses(boolean filter)Returns the nested classes declared by this type, optionally applying the active visibility filter.
|
|
public GroovyType[] |
interfaceTypes()Returns the interface types directly implemented or extended by this type.
|
|
public GroovyClassDoc[] |
interfaces()Returns the interfaces directly implemented or extended by this type.
|
|
public boolean |
isExternalizable()Indicates whether this type implements Externalizable.
|
|
public boolean |
isGroovy()Indicates whether this class originated from Groovy source. |
|
public boolean |
isPrimitive()Indicates whether this type is a Java primitive type.
|
|
public boolean |
isSerializable()Indicates whether this type implements Serializable.
|
|
public GroovyMethodDoc[] |
methods()returns a sorted array of methods |
|
public GroovyMethodDoc[] |
methods(boolean filter)Returns the methods declared by this type, optionally applying the active visibility filter.
|
|
public GroovyFieldDoc[] |
properties()returns a sorted array of properties |
|
public String |
qualifiedTypeName()The qualified name of this type excluding any dimension information. For example, a two-dimensional array of String returns " java.lang.String".
|
|
public String |
replaceTags(String comment)Replaces inline tags in the supplied comment using this class as the rendering context. |
|
public String |
replaceTags(String comment, GroovyMemberDoc memberDoc)GROOVY-3782 / GROOVY-6016: overload that threads the current member through to TagRenderer so inline tags that need the enclosing member context (e.g. |
|
public GroovyFieldDoc[] |
serializableFields()Returns the fields that participate in serialization.
|
|
public GroovyMethodDoc[] |
serializationMethods()Returns the methods related to custom serialization.
|
|
public void |
setFullPathName(String fullPathName)Sets the output path used for this class in generated documentation. |
|
public void |
setGroovy(boolean isgroovy)Sets whether this class originated from Groovy source. |
|
public void |
setNameWithTypeArgs(String nameWithTypeArgs)Stores the rendered class name including any type arguments. |
|
public void |
setOuter(GroovyClassDoc outer)Sets the enclosing class for this nested class. |
|
public void |
setSuperClass(GroovyClassDoc doc)Sets the resolved superclass for this class. |
|
public void |
setSuperClassName(String className)Stores the unresolved superclass name parsed from source. |
|
public String |
simpleTypeName()The unqualified name of this type excluding any dimension or nesting information. For example, the class Outer.Inner returns "Inner".
|
|
public boolean |
subclassOf(GroovyClassDoc gcd)Determines whether this type is a subclass of the supplied candidate.
|
|
public GroovyClassDoc |
superclass()Returns the direct superclass of this type.
|
|
public GroovyType |
superclassType()Returns the direct superclass as a type reference.
|
|
public String |
typeName()The unqualified name of this type excluding any dimension information. For example, a two-dimensional array of String returns " String".
|
Pattern used to locate {@code ...} style inline tags for angle-bracket escaping.
Pattern used to replace ../../../../../ references.
Pattern used to replace ../../../../../ references.
Pattern used to split a method reference into its name and argument list.
Pattern used to split a reference target from its optional label.
Pattern used to split comma-separated method argument declarations.
Creates a documented class with explicit imports, aliases, and external links.
importedClassesAndPackages - the imports visible to the classaliases - the import aliases visible to the classname - the simple class namelinks - the configured external documentation linksCreates a documented class with explicit imports and aliases.
importedClassesAndPackages - the imports visible to the classaliases - the import aliases visible to the classname - the simple class nameAdds a constructor to this class.
constructor - the constructor to addtrue if the constructor was addedAdds a field to this class.
field - the field to addtrue if the field was addedAdds a method to this class.
method - the method to addtrue if the method was addedAdds an enum constant to this class.
field - the enum constant to addtrue if the enum constant was addedAdds the name of an implemented or extended interface for later resolution.
className - the interface name to addAdds a nested class or interface to this class.
nestedClass - the nested class to addtrue if the nested class was addedAdds a property to this class.
property - the property to addtrue if the property was addedReturns the processed comment text for this element.
returns a sorted array of constructors
Returns the constructors declared by this type, optionally applying the active visibility filter.
filter - true to include only visible constructors, false to include all constructorsIndicates whether this type explicitly defines serializable fields metadata.
true if serializable fields are defined explicitlyEscapes angle brackets in plain text so they remain visible in rendered HTML.
text - the text to escapeReplaces angle brackets inside a tag.
text - GroovyDoc text to processregex - has to capture tag name in group 1 and tag body in group 2returns a sorted array of enum constants
returns a sorted array of fields
Returns the fields declared by this type, optionally applying the active visibility filter.
filter - true to include only visible fields, false to include all fieldsResolves a referenced class name from the context of this type.
className - the class name to resolvenull if it cannot be resolvedReturns the first sentence of the processed comment text.
Builds a documentation URL for the supplied type using the current rendering context.
type - the type or reference to renderBuilds a documentation URL for the supplied type using the current rendering context.
type - the type or reference to renderfull - true to prefer fully qualified labelsBuilds a documentation URL for the supplied type using explicit rendering context inputs.
type - the type or reference to renderfull - true to prefer fully qualified labelslinks - the configured external documentation linksrelativePath - the relative path back to the documentation rootrootDoc - the root document used for in-project lookupsclassDoc - the current class context
Returns the rendered class name including any type arguments.
null if none was recordedReturns the enclosing class when this class is nested.
null if this class is top-levelReturns this class together with its resolved superclass chain.
Returns this class and all interfaces reachable from its direct interfaces.
Returns the unresolved superclass name parsed from source.
null if none was declaredReturns the explicitly imported classes visible to this type.
Returns the imported packages visible to this type.
returns a sorted array of nested classes and interfaces
Returns the nested classes declared by this type, optionally applying the active visibility filter.
filter - true to include only visible nested classes, false to include all nested classesReturns the interface types directly implemented or extended by this type.
Returns the interfaces directly implemented or extended by this type.
Indicates whether this type implements Externalizable.
true if this type is externalizableIndicates whether this class originated from Groovy source.
true if this class came from Groovy sourceIndicates whether this type is a Java primitive type.
true if this type is primitiveIndicates whether this type implements Serializable.
true if this type is serializablereturns a sorted array of methods
Returns the methods declared by this type, optionally applying the active visibility filter.
filter - true to include only visible methods, false to include all methodsreturns a sorted array of properties
The qualified name of this type excluding any dimension information.
For example, a two-dimensional array of String returns "java.lang.String".
Replaces inline tags in the supplied comment using this class as the rendering context.
comment - the comment to process GROOVY-3782 / GROOVY-6016: overload that threads the current member
through to TagRenderer so inline tags that need the enclosing
member context (e.g. {@inheritDoc} needs the current method
to find its overridden parent) can resolve.
Returns the fields that participate in serialization.
Returns the methods related to custom serialization.
Sets the output path used for this class in generated documentation.
fullPathName - the documentation path for this classSets whether this class originated from Groovy source.
isgroovy - true if this class came from Groovy sourceStores the rendered class name including any type arguments.
nameWithTypeArgs - the rendered class name with type argumentsSets the enclosing class for this nested class.
outer - the enclosing classSets the resolved superclass for this class.
doc - the resolved superclassStores the unresolved superclass name parsed from source.
className - the unresolved superclass name The unqualified name of this type excluding any dimension or nesting information.
For example, the class Outer.Inner returns "Inner".
Determines whether this type is a subclass of the supplied candidate.
gcd - the candidate superclasstrue if this type is a subclass of gcdReturns the direct superclass of this type.
null if none existsReturns the direct superclass as a type reference.
null if none exists The unqualified name of this type excluding any dimension information.
For example, a two-dimensional array of String returns "String".
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.