public class CancellableTreeScanner<R,P> extends ErrorAwareTreeScanner<R,P>
Constructor and Description |
---|
CancellableTreeScanner()
Construct a new CancellableTreeScanner which can be canceled by calling
the
CancellableTreeScanner.cancel() method. |
CancellableTreeScanner(AtomicBoolean canceled)
Construct a new CancellableTreeScanner which can be canceled either by calling
the
CancellableTreeScanner.cancel() method, or by setting true into the provided
canceled AtomicBoolean . |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
protected boolean |
isCanceled() |
R |
scan(Iterable<? extends Tree> trees,
P p) |
R |
scan(Tree tree,
P p) |
visitCase, visitErroneous
reduce, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitConstantCaseLabel, visitContinue, visitDeconstructionPattern, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitParenthesizedPattern, visitPatternCaseLabel, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard, visitYield
public CancellableTreeScanner()
CancellableTreeScanner.cancel()
method.public CancellableTreeScanner(AtomicBoolean canceled)
CancellableTreeScanner.cancel()
method, or by setting true
into the provided
canceled
AtomicBoolean
.canceled
- an AtomicBoolean
through which this scanner can be canceled.
The scanner never changes the state of the AtomicBoolean
.