Class Parser
java.lang.Object
io.micronaut.annotation.processing.test.Parser
Methods to parse Java source files.
NOTE: Forked from Google Compile Testing Project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Iterable<? extends JavaFileObject>
Parsessources
into CompilationUnitTree compilation units.static Iterable<? extends JavaFileObject>
generate
(JavaFileObject... sources) Parsessources
into CompilationUnitTree compilation units.parse
(JavaFileObject... sources) Parsessources
into CompilationUnitTree compilation units.parseLines
(String className, String... lines) Parsessources
into CompilationUnitTree compilation units.
-
Constructor Details
-
Parser
public Parser()
-
-
Method Details
-
parse
Parsessources
into CompilationUnitTree compilation units. This method does not compile the sources.- Parameters:
sources
- The sources- Returns:
- parsed
CompilationUnitTree
iterable object
-
parseLines
Parsessources
into CompilationUnitTree compilation units. This method does not compile the sources.- Parameters:
className
- the fully qualified name class namelines
- The source- Returns:
- parsed
CompilationUnitTree
iterable object
-
generate
Parsessources
into CompilationUnitTree compilation units. This method does not compile the sources.- Parameters:
className
- the fully qualified name class namecode
- The source- Returns:
- parsed
CompilationUnitTree
iterable object
-
generate
Parsessources
into CompilationUnitTree compilation units. This method does not compile the sources.- Parameters:
sources
- The sources- Returns:
- parsed
CompilationUnitTree
iterable object
-