Package org.codehaus.groovy.tools.groovydoc

# 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`

public class SimpleGroovyRootDoc extends SimpleGroovyDoc implements 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

  Constructors
  Constructor
  Description
  `SimpleGroovyRootDoc(String name)`
  Creates a root documentation model with the supplied name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GroovyClassDoc[]`
  `classes()`
  Returns all classes known to this documentation run.
  `GroovyClassDoc`
  `classNamed(GroovyClassDoc groovyClassDoc, String name)`
  Resolves a class name from the perspective of another documented class.
  `GroovyClassDoc`
  `classNamedExact(String name)`
  Resolves a class using its exact internal name.
  `String`
  `description()`
  Returns the root description text.
  `Map<String,GroovyClassDoc>`
  `getResolvedClasses()`
  Returns the classes that have already been resolved for the current documentation run.
  `String[]`
  `getSourcepaths()`
  Returns the source paths used to build this root document.
  `Map<String,GroovyClassDoc>`
  `getVisibleClasses(List importedClassesAndPackages)`
  Returns the classes visible from a set of imports.
  `String[][]`
  `options()`
  Returns the effective tool options associated with this documentation run.
  `GroovyPackageDoc`
  `packageNamed(String packageName)`
  Resolves a package by name.
  `void`
  `printError(String arg0)`
  Reports an error message.
  `void`
  `printNotice(String arg0)`
  Reports an informational notice.
  `void`
  `printWarning(String arg0)`
  Reports a warning message.
  `void`
  `put(String packageName, GroovyPackageDoc packageDoc)`
  Adds a package to this root document.
  `void`
  `putAllClasses(Map<String,GroovyClassDoc> classes)`
  Adds all supplied classes to this root document.
  `void`
  `resolve()`
  Resolves deferred type references across all collected classes.
  `void`
  `setDescription(String description)`
  Sets the root description text.
  `void`
  `setSourcepaths(String[] sourcepaths)`
  Stores the source paths used to build this root document.
  `GroovyClassDoc[]`
  `specifiedClasses()`
  Returns the classes explicitly specified as documentation targets.
  `GroovyPackageDoc[]`
  `specifiedPackages()`
  Returns the packages explicitly specified as documentation targets.
  `String`
  `summary()`
  Returns the first-sentence summary derived from `description()`.

  ### 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, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface java.lang.Comparable

  `compareTo`

  ### Methods 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

    public SimpleGroovyRootDoc(String name)
    Creates a root documentation model with the supplied name.
    Parameters:
      `name` - the root document name

- ## Method Details

  - ### getSourcepaths

    public String[] getSourcepaths()
    Returns the source paths used to build this root document.
    Returns:
      the configured source paths
    Since:
      6.0.0

  - ### setSourcepaths

    public void setSourcepaths(String[] sourcepaths)
    Stores the source paths used to build this root document.
    Parameters:
      `sourcepaths` - the source paths to retain
    Since:
      6.0.0

  - ### classNamed

    public GroovyClassDoc classNamed(GroovyClassDoc groovyClassDoc, String name)
    Resolves a class name from the perspective of another documented class.
    Specified by:
      `classNamed` in interface `GroovyRootDoc`
    Parameters:
      `groovyClassDoc` - the class providing the lookup context
      `name` - the class name to resolve
    Returns:
      the matching class documentation, or `null` if it cannot be resolved

  - ### classNamedExact

    public GroovyClassDoc classNamedExact(String name)
    Resolves a class using its exact internal name.
    Parameters:
      `name` - the exact class name to resolve
    Returns:
      the matching class documentation, or `null` if none exists

  - ### setDescription

    public void setDescription(String description)
    Sets the root description text.
    Parameters:
      `description` - the root description

  - ### description

    public String description()
    Returns the root description text.
    Returns:
      the configured description

  - ### summary

    public String summary()
    Returns the first-sentence summary derived from `description()`.
    Returns:
      the first-sentence summary

  - ### classes

    public GroovyClassDoc[] classes()
    Returns all classes known to this documentation run.
    Specified by:
      `classes` in interface `GroovyRootDoc`
    Returns:
      the discovered classes

  - ### options

    public String[][] options()
    Returns the effective tool options associated with this documentation run.
    Specified by:
      `options` in interface `GroovyRootDoc`
    Returns:
      the configured options

  - ### packageNamed

    public GroovyPackageDoc packageNamed(String packageName)
    Resolves a package by name.
    Specified by:
      `packageNamed` in interface `GroovyRootDoc`
    Parameters:
      `packageName` - the package name to resolve
    Returns:
      the matching package documentation, or `null` if none exists

  - ### putAllClasses

    public void putAllClasses(Map<String,GroovyClassDoc> classes)
    Adds all supplied classes to this root document.
    Parameters:
      `classes` - the classes to add

  - ### put

    public void put(String packageName, GroovyPackageDoc packageDoc)
    Adds a package to this root document.
    Parameters:
      `packageName` - the package name key
      `packageDoc` - the package documentation object

  - ### specifiedClasses

    public GroovyClassDoc[] specifiedClasses()
    Returns the classes explicitly specified as documentation targets.
    Specified by:
      `specifiedClasses` in interface `GroovyRootDoc`
    Returns:
      the specified classes

  - ### specifiedPackages

    public GroovyPackageDoc[] specifiedPackages()
    Returns the packages explicitly specified as documentation targets.
    Specified by:
      `specifiedPackages` in interface `GroovyRootDoc`
    Returns:
      the specified packages

  - ### getVisibleClasses

    public Map<String,GroovyClassDoc> getVisibleClasses(List importedClassesAndPackages)
    Returns the classes visible from a set of imports.
    Specified by:
      `getVisibleClasses` in interface `GroovyRootDoc`
    Parameters:
      `importedClassesAndPackages` - the imported classes and packages to evaluate
    Returns:
      a map of visible class names to class documentation

  - ### getResolvedClasses

    public Map<String,GroovyClassDoc> getResolvedClasses()
    Returns the classes that have already been resolved for the current documentation run.
    Specified by:
      `getResolvedClasses` in interface `GroovyRootDoc`
    Returns:
      a map of resolved class names to class documentation

  - ### printError

    public void printError(String arg0)
    Reports an error message.
    Specified by:
      `printError` in interface `GroovyDocErrorReporter`
    Parameters:
      `arg0` - the error message

  - ### printNotice

    public void printNotice(String arg0)
    Reports an informational notice.
    Specified by:
      `printNotice` in interface `GroovyDocErrorReporter`
    Parameters:
      `arg0` - the notice message

  - ### printWarning

    public void printWarning(String arg0)
    Reports a warning message.
    Specified by:
      `printWarning` in interface `GroovyDocErrorReporter`
    Parameters:
      `arg0` - the warning message

  - ### resolve

    public void resolve()
    Resolves deferred type references across all collected classes.