public class TreeParser extends Object
This is useful for parsing EnsuresNonNull*, and KeyFor values.
Currently, it handles four tree types only:
id)
method(2, 3))
Class.field, instance.method())
array[id])
It's implemented via a Recursive-Descend parser.
| Constructor and Description |
|---|
TreeParser(ProcessingEnvironment env)
Create a TreeParser.
|
| Modifier and Type | Method and Description |
|---|---|
ExpressionTree |
parseTree(String s)
Parses the snippet in the string as an internal Javac AST expression node.
|
public TreeParser(ProcessingEnvironment env)
public ExpressionTree parseTree(String s)
s - the Java snippet