public final class Parser extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Parser.ParseResultThe diagnostic, parse trees, and  Treesinstance for a parse task. | 
| Constructor and Description | 
|---|
| Parser() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Iterable<? extends JavaFileObject> | generate(JavaFileObject... sources)Parses  sourcesinto compilation units. | 
| static Iterable<? extends JavaFileObject> | generate(String className,
        String code)Parses  sourcesinto compilation units. | 
| static boolean | hasErrorNode(com.sun.source.tree.Tree tree)Returns  trueif the tree contains at least one "erroneous"
 node. | 
| static Iterable<? extends Element> | parse(JavaFileObject... sources)Parses  sourcesinto compilation units. | 
| static Iterable<? extends Element> | parseLines(String className,
          String... lines)Parses  sourcesinto compilation units. | 
public static boolean hasErrorNode(com.sun.source.tree.Tree tree)
true if the tree contains at least one "erroneous"
 node.public static Iterable<? extends Element> parse(JavaFileObject... sources)
sources into compilation units. This method
 does not compile the sources.public static Iterable<? extends Element> parseLines(String className, String... lines)
sources into compilation units. This method
 does not compile the sources.public static Iterable<? extends JavaFileObject> generate(String className, String code)
sources into compilation units. This method
 does not compile the sources.public static Iterable<? extends JavaFileObject> generate(JavaFileObject... sources)
sources into compilation units. This method
 does not compile the sources.sources - The sources