Class SimpleGroovyRootDoc
java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
org.codehaus.groovy.tools.groovydoc.SimpleGroovyRootDoc
- All Implemented Interfaces:
Comparable<GroovyDoc>,GroovyDoc,GroovyDocErrorReporter,GroovyRootDoc
Default
GroovyRootDoc implementation used to collect packages, classes, and lookup caches.-
Field Summary
Fields inherited from class org.codehaus.groovy.tools.groovydoc.SimpleGroovyDoc
ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF -
Constructor Summary
ConstructorsConstructorDescriptionSimpleGroovyRootDoc(String name) Creates a root documentation model with the supplied name. -
Method Summary
Modifier and TypeMethodDescriptionclasses()Returns all classes known to this documentation run.classNamed(GroovyClassDoc groovyClassDoc, String name) Resolves a class name from the perspective of another documented class.classNamedExact(String name) Resolves a class using its exact internal name.Returns the root description text.Returns the classes that have already been resolved for the current documentation run.String[]Returns the source paths used to build this root document.getVisibleClasses(List importedClassesAndPackages) Returns the classes visible from a set of imports.String[][]options()Returns the effective tool options associated with this documentation run.packageNamed(String packageName) Resolves a package by name.voidprintError(String arg0) Reports an error message.voidprintNotice(String arg0) Reports an informational notice.voidprintWarning(String arg0) Reports a warning message.voidput(String packageName, GroovyPackageDoc packageDoc) Adds a package to this root document.voidputAllClasses(Map<String, GroovyClassDoc> classes) Adds all supplied classes to this root document.voidresolve()Resolves deferred type references across all collected classes.voidsetDescription(String description) Sets the root description text.voidsetSourcepaths(String[] sourcepaths) Stores the source paths used to build this root document.Returns the classes explicitly specified as documentation targets.Returns the packages explicitly specified as documentation targets.summary()Returns the first-sentence summary derived fromdescription().Methods inherited from class org.codehaus.groovy.tools.groovydoc.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, 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, setRawCommentText
-
Constructor Details
-
SimpleGroovyRootDoc
Creates a root documentation model with the supplied name.- Parameters:
name- the root document name
-
-
Method Details
-
getSourcepaths
Returns the source paths used to build this root document.- Returns:
- the configured source paths
- Since:
- 6.0.0
-
setSourcepaths
Stores the source paths used to build this root document.- Parameters:
sourcepaths- the source paths to retain- Since:
- 6.0.0
-
classNamed
Resolves a class name from the perspective of another documented class.- Specified by:
classNamedin interfaceGroovyRootDoc- Parameters:
groovyClassDoc- the class providing the lookup contextname- the class name to resolve- Returns:
- the matching class documentation, or
nullif it cannot be resolved
-
classNamedExact
Resolves a class using its exact internal name.- Parameters:
name- the exact class name to resolve- Returns:
- the matching class documentation, or
nullif none exists
-
setDescription
Sets the root description text.- Parameters:
description- the root description
-
description
Returns the root description text.- Returns:
- the configured description
-
summary
Returns the first-sentence summary derived fromdescription().- Returns:
- the first-sentence summary
-
classes
Returns all classes known to this documentation run.- Specified by:
classesin interfaceGroovyRootDoc- Returns:
- the discovered classes
-
options
Returns the effective tool options associated with this documentation run.- Specified by:
optionsin interfaceGroovyRootDoc- Returns:
- the configured options
-
packageNamed
Resolves a package by name.- Specified by:
packageNamedin interfaceGroovyRootDoc- Parameters:
packageName- the package name to resolve- Returns:
- the matching package documentation, or
nullif none exists
-
putAllClasses
Adds all supplied classes to this root document.- Parameters:
classes- the classes to add
-
put
Adds a package to this root document.- Parameters:
packageName- the package name keypackageDoc- the package documentation object
-
specifiedClasses
Returns the classes explicitly specified as documentation targets.- Specified by:
specifiedClassesin interfaceGroovyRootDoc- Returns:
- the specified classes
-
specifiedPackages
Returns the packages explicitly specified as documentation targets.- Specified by:
specifiedPackagesin interfaceGroovyRootDoc- Returns:
- the specified packages
-
getVisibleClasses
Returns the classes visible from a set of imports.- Specified by:
getVisibleClassesin interfaceGroovyRootDoc- Parameters:
importedClassesAndPackages- the imported classes and packages to evaluate- Returns:
- a map of visible class names to class documentation
-
getResolvedClasses
Returns the classes that have already been resolved for the current documentation run.- Specified by:
getResolvedClassesin interfaceGroovyRootDoc- Returns:
- a map of resolved class names to class documentation
-
printError
Reports an error message.- Specified by:
printErrorin interfaceGroovyDocErrorReporter- Parameters:
arg0- the error message
-
printNotice
Reports an informational notice.- Specified by:
printNoticein interfaceGroovyDocErrorReporter- Parameters:
arg0- the notice message
-
printWarning
Reports a warning message.- Specified by:
printWarningin interfaceGroovyDocErrorReporter- Parameters:
arg0- the warning message
-
resolve
public void resolve()Resolves deferred type references across all collected classes.
-