public class TreeParser
extends java.lang.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(javax.annotation.processing.ProcessingEnvironment env) |
Modifier and Type | Method and Description |
---|---|
com.sun.source.tree.ExpressionTree |
parseTree(java.lang.String s)
Parses the snippet in the string as an internal Javac AST expression node.
|