Class GroovyDocParser
java.lang.Object
org.codehaus.groovy.tools.groovydoc.antlr4.GroovyDocParser
- All Implemented Interfaces:
GroovyDocParserI
Parses Groovy and Java source files and builds
GroovyClassDoc maps. Groovy sources
are processed via the Groovy compiler AST (GroovydocVisitor); Java sources via
JavaParser (GroovydocJavaVisitor).-
Constructor Summary
ConstructorsConstructorDescriptionGroovyDocParser(com.github.javaparser.JavaParser javaParser, List<LinkArgument> links, Properties properties) Creates a parser with the suppliedJavaParserinstance.GroovyDocParser(List<LinkArgument> links, Properties properties) Creates a parser with a defaultJavaParserinstance. -
Method Summary
Modifier and TypeMethodDescriptiongetClassDocsFromSingleSource(String packagePath, String file, String src) Parses one source unit and returns the classes discovered in it.
-
Constructor Details
-
GroovyDocParser
Creates a parser with a defaultJavaParserinstance. -
GroovyDocParser
public GroovyDocParser(com.github.javaparser.JavaParser javaParser, List<LinkArgument> links, Properties properties) Creates a parser with the suppliedJavaParserinstance.- Since:
- 6.0.0
-
-
Method Details
-
getClassDocsFromSingleSource
public Map<String,GroovyClassDoc> getClassDocsFromSingleSource(String packagePath, String file, String src) throws RuntimeException Parses one source unit and returns the classes discovered in it.- Specified by:
getClassDocsFromSingleSourcein interfaceGroovyDocParserI- Parameters:
packagePath- the package path associated with the sourcefile- the source file namesrc- the source text to parse- Returns:
- a map of discovered class names to class documentation objects
- Throws:
RuntimeException
-