Package org.codehaus.groovy.tools.groovydoc

# Class GroovyRootDocBuilder

java.lang.Object
org.codehaus.groovy.tools.groovydoc.GroovyRootDocBuilder

public class GroovyRootDocBuilder extends Object
Builds a `SimpleGroovyRootDoc` from source files by dispatching each file to either the Groovy AST visitor or the Java parser.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GroovyRootDocBuilder(String[] sourcepaths, List<LinkArgument> links, Properties properties)`
  Creates a builder for the given source paths, link arguments, and generation properties.
  `GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties)`
  Deprecated.
  The `tool` parameter is unused; use `GroovyRootDocBuilder(String[], List, Properties)` instead.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `buildTree(List<String> filenames)`
  Parses all given source files and populates the root doc.
  `int`
  `getErrorCount()`
  Returns the number of source files that failed to parse.
  `GroovyRootDoc`
  `getRootDoc()`
  Resolves inter-class references and returns the completed root doc.

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

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

- ## Constructor Details

  - ### GroovyRootDocBuilder

    @Deprecated public GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties)
    Deprecated.
    The `tool` parameter is unused; use `GroovyRootDocBuilder(String[], List, Properties)` instead.

  - ### GroovyRootDocBuilder

    public GroovyRootDocBuilder(String[] sourcepaths, List<LinkArgument> links, Properties properties)
    Creates a builder for the given source paths, link arguments, and generation properties.

- ## Method Details

  - ### buildTree

    public void buildTree(List<String> filenames) throws IOException
    Parses all given source files and populates the root doc.
    Parameters:
      `filenames` - source file paths to process
    Throws:
      `IOException` - if a file cannot be read

  - ### getErrorCount

    public int getErrorCount()
    Returns the number of source files that failed to parse.
    Since:
      6.0.0

  - ### getRootDoc

    public GroovyRootDoc getRootDoc()
    Resolves inter-class references and returns the completed root doc.