Package: org.codehaus.groovy.tools.groovydoc

## [Java] Class SimpleGroovyRootDoc

- org.codehaus.groovy.tools.groovydoc.SimpleGroovyRootDoc

- All Implemented Interfaces and Traits:
    GroovyRootDoc

      public class SimpleGroovyRootDoc
      extends SimpleGroovyDoc
      implements GroovyRootDoc

  Default GroovyRootDoc implementation used to collect packages, classes, and lookup caches.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SimpleGroovyDoc` | `ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF`

  - ### Constructor Summary

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

  - ### Methods Summary

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

  - ### Inherited Methods Summary

    Inherited Methods
    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`

- - ### Constructor Detail

    - #### public SimpleGroovyRootDoc(String name)

      Creates a root documentation model with the supplied name.

      Parameters:
        `name` - the root document name

  - ### Method Detail

    - #### public GroovyClassDoc classNamed(GroovyClassDoc groovyClassDoc, String name)

      Resolves a class name from the perspective of another documented class.

      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

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

    - #### public GroovyClassDoc[] classes()

      Returns all classes known to this documentation run.

      Returns:
        the discovered classes

    - #### public String description()

      Returns the root description text.

      Returns:
        the configured description

    - #### public Map<String, GroovyClassDoc> getResolvedClasses()

      Returns the classes that have already been resolved for the current documentation run.

      Returns:
        a map of resolved class names to class documentation

    - #### public String[] getSourcepaths()

      Returns the source paths used to build this root document.

      Returns:
        the configured source paths
      Since:
        6.0.0

    - #### public Map<String, GroovyClassDoc> getVisibleClasses(List importedClassesAndPackages)

      Returns the classes visible from a set of imports.

      Parameters:
        `importedClassesAndPackages` - the imported classes and packages to evaluate
      Returns:
        a map of visible class names to class documentation

    - #### public String[] options()

      Returns the effective tool options associated with this documentation run.

      Returns:
        the configured options

    - #### public GroovyPackageDoc packageNamed(String packageName)

      Resolves a package by name.

      Parameters:
        `arg0` - the package name to resolve
      Returns:
        the matching package documentation, or `null` if none exists

    - #### public void printError(String arg0)

      Reports an error message.

      Parameters:
        `arg0` - the error message

    - #### public void printNotice(String arg0)

      Reports an informational notice.

      Parameters:
        `arg0` - the notice message

    - #### public void printWarning(String arg0)

      Reports a warning message.

      Parameters:
        `arg0` - the warning message

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

    - #### public void putAllClasses(Map<String, GroovyClassDoc> classes)

      Adds all supplied classes to this root document.

      Parameters:
        `classes` - the classes to add

    - #### public void resolve()

      Resolves deferred type references across all collected classes.

    - #### public void setDescription(String description)

      Sets the root description text.

      Parameters:
        `description` - the root description

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

    - #### public GroovyClassDoc[] specifiedClasses()

      Returns the classes explicitly specified as documentation targets.

      Returns:
        the specified classes

    - #### public GroovyPackageDoc[] specifiedPackages()

      Returns the packages explicitly specified as documentation targets.

      Returns:
        the specified packages

    - #### public String summary()

      Returns the first-sentence summary derived from description().

      Returns:
        the first-sentence summary