protected static class PurityChecker.PurityCheckerHelper extends TreePathScanner<Void,Void>
PurityChecker
's interface clean.Modifier and Type | Field and Description |
---|---|
protected AnnotationProvider |
annoProvider |
Constructor and Description |
---|
PurityCheckerHelper(AnnotationProvider annoProvider,
boolean assumeSideEffectFree,
boolean assumeDeterministic)
Create a PurityCheckerHelper.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assignmentCheck(ExpressionTree variable)
Check whether
variable is permitted on the left-hand-side of an assignment. |
protected boolean |
isLocalVariable(ExpressionTree variable)
Checks if the argument is a local variable.
|
Void |
visitAssignment(AssignmentTree node,
Void ignore) |
Void |
visitCatch(CatchTree node,
Void ignore) |
Void |
visitCompoundAssignment(CompoundAssignmentTree node,
Void ignore) |
Void |
visitMethodInvocation(MethodInvocationTree node,
Void ignore) |
Void |
visitNewClass(NewClassTree node,
Void ignore) |
Void |
visitUnary(UnaryTree node,
Void ignore) |
getCurrentPath, scan, scan
reduce, scan, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitClass, visitCompilationUnit, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitModifiers, visitModule, visitNewArray, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard
protected final AnnotationProvider annoProvider
public PurityCheckerHelper(AnnotationProvider annoProvider, boolean assumeSideEffectFree, boolean assumeDeterministic)
annoProvider
- the annotation providerassumeSideEffectFree
- true if all methods should be assumed to be @SideEffectFreeassumeDeterministic
- true if all methods should be assumed to be @Deterministicpublic Void visitCatch(CatchTree node, Void ignore)
visitCatch
in interface TreeVisitor<Void,Void>
visitCatch
in class TreeScanner<Void,Void>
public Void visitMethodInvocation(MethodInvocationTree node, Void ignore)
visitMethodInvocation
in interface TreeVisitor<Void,Void>
visitMethodInvocation
in class TreeScanner<Void,Void>
public Void visitNewClass(NewClassTree node, Void ignore)
visitNewClass
in interface TreeVisitor<Void,Void>
visitNewClass
in class TreeScanner<Void,Void>
public Void visitAssignment(AssignmentTree node, Void ignore)
visitAssignment
in interface TreeVisitor<Void,Void>
visitAssignment
in class TreeScanner<Void,Void>
public Void visitUnary(UnaryTree node, Void ignore)
visitUnary
in interface TreeVisitor<Void,Void>
visitUnary
in class TreeScanner<Void,Void>
protected void assignmentCheck(ExpressionTree variable)
variable
is permitted on the left-hand-side of an assignment.variable
- the lhs to checkprotected boolean isLocalVariable(ExpressionTree variable)
variable
- the tree to checkpublic Void visitCompoundAssignment(CompoundAssignmentTree node, Void ignore)
visitCompoundAssignment
in interface TreeVisitor<Void,Void>
visitCompoundAssignment
in class TreeScanner<Void,Void>