public class TreePathCacher extends TreeScanner<TreePath,Tree>
Constructor and Description |
---|
TreePathCacher() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
TreePath |
getPath(CompilationUnitTree root,
Tree target)
Return the TreePath for a Tree.
|
boolean |
isCached(Tree target) |
TreePath |
scan(Tree tree,
Tree target)
Scan a single node.
|
reduce, scan, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewArray, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitVariable, visitWhileLoop, visitWildcard
public boolean isCached(Tree target)
target
- The tree to search forpublic TreePath getPath(CompilationUnitTree root, Tree target)
root
- The compilation unit to search intarget
- The target tree to look forpublic void clear()