public final class Parser extends Object
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
static Iterable<? extends JavaFileObject> |
generate(JavaFileObject... sources)
Parses
sources into com.sun.source.tree.CompilationUnitTree compilation units. |
static Iterable<? extends JavaFileObject> |
generate(String className,
String code)
Parses
sources into com.sun.source.tree.CompilationUnitTree compilation units. |
static Iterable<? extends Element> |
parse(JavaFileObject... sources)
Parses
sources into com.sun.source.tree.CompilationUnitTree compilation units. |
static Iterable<? extends Element> |
parseLines(String className,
String... lines)
Parses
sources into com.sun.source.tree.CompilationUnitTree compilation units. |
public static Iterable<? extends Element> parse(JavaFileObject... sources)
sources
into com.sun.source.tree.CompilationUnitTree compilation units. This method
does not compile the sources.sources
- The sourcescom.sun.source.tree.CompilationUnitTree
iterable objectpublic static Iterable<? extends Element> parseLines(String className, String... lines)
sources
into com.sun.source.tree.CompilationUnitTree compilation units. This method
does not compile the sources.className
- the fully qualified name class namelines
- The sourcecom.sun.source.tree.CompilationUnitTree
iterable objectpublic static Iterable<? extends JavaFileObject> generate(String className, String code)
sources
into com.sun.source.tree.CompilationUnitTree compilation units. This method
does not compile the sources.className
- the fully qualified name class namecode
- The sourcecom.sun.source.tree.CompilationUnitTree
iterable objectpublic static Iterable<? extends JavaFileObject> generate(JavaFileObject... sources)
sources
into com.sun.source.tree.CompilationUnitTree compilation units. This method
does not compile the sources.sources
- The sourcescom.sun.source.tree.CompilationUnitTree
iterable object