Class JavaExpressionVisitor<R,P>
- java.lang.Object
-
- org.checkerframework.dataflow.expression.JavaExpressionVisitor<R,P>
-
- Type Parameters:
R
- the return type of the visit methodsP
- the parameter passed to the visit methods
- Direct Known Subclasses:
JavaExpressionConverter
,JavaExpressionScanner
public abstract class JavaExpressionVisitor<R,P> extends java.lang.Object
A simple visitor forJavaExpression
.
-
-
Constructor Summary
Constructors Constructor Description JavaExpressionVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description R
visit(JavaExpression javaExpr, P p)
Visits the givenjavaExpr
.protected abstract R
visitArrayAccess(ArrayAccess arrayAccessExpr, P p)
Visit anArrayAccess
.protected abstract R
visitArrayCreation(ArrayCreation arrayCreationExpr, P p)
Visit anArrayCreation
.protected abstract R
visitBinaryOperation(BinaryOperation binaryOpExpr, P p)
Visit aBinaryOperation
.protected abstract R
visitClassName(ClassName classNameExpr, P p)
Visit aClassName
.protected abstract R
visitFieldAccess(FieldAccess fieldAccessExpr, P p)
Visit aFieldAccess
.protected abstract R
visitFormalParameter(FormalParameter parameterExpr, P p)
Visit aFormalParameter
.protected abstract R
visitLocalVariable(LocalVariable localVarExpr, P p)
Visit aLocalVariable
.protected abstract R
visitMethodCall(MethodCall methodCallExpr, P p)
Visit aMethodCall
.protected abstract R
visitThisReference(ThisReference thisExpr, P p)
Visit aThisReference
.protected abstract R
visitUnaryOperation(UnaryOperation unaryOpExpr, P p)
Visit anUnaryOperation
.protected abstract R
visitUnknown(Unknown unknownExpr, P p)
Visit anUnknown
.protected abstract R
visitValueLiteral(ValueLiteral literalExpr, P p)
Visit aValueLiteral
.
-
-
-
Method Detail
-
visit
public R visit(JavaExpression javaExpr, P p)
Visits the givenjavaExpr
.- Parameters:
javaExpr
- the expression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the expression
-
visitArrayAccess
protected abstract R visitArrayAccess(ArrayAccess arrayAccessExpr, P p)
Visit anArrayAccess
.- Parameters:
arrayAccessExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
arrayAccessExpr
-
visitArrayCreation
protected abstract R visitArrayCreation(ArrayCreation arrayCreationExpr, P p)
Visit anArrayCreation
.- Parameters:
arrayCreationExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
arrayCreationExpr
-
visitBinaryOperation
protected abstract R visitBinaryOperation(BinaryOperation binaryOpExpr, P p)
Visit aBinaryOperation
.- Parameters:
binaryOpExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
binaryOpExpr
-
visitClassName
protected abstract R visitClassName(ClassName classNameExpr, P p)
Visit aClassName
.- Parameters:
classNameExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
classNameExpr
-
visitFieldAccess
protected abstract R visitFieldAccess(FieldAccess fieldAccessExpr, P p)
Visit aFieldAccess
.- Parameters:
fieldAccessExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
fieldAccessExpr
-
visitFormalParameter
protected abstract R visitFormalParameter(FormalParameter parameterExpr, P p)
Visit aFormalParameter
.- Parameters:
parameterExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
parameterExpr
-
visitLocalVariable
protected abstract R visitLocalVariable(LocalVariable localVarExpr, P p)
Visit aLocalVariable
.- Parameters:
localVarExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
localVarExpr
-
visitMethodCall
protected abstract R visitMethodCall(MethodCall methodCallExpr, P p)
Visit aMethodCall
.- Parameters:
methodCallExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
methodCallExpr
-
visitThisReference
protected abstract R visitThisReference(ThisReference thisExpr, P p)
Visit aThisReference
.- Parameters:
thisExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
thisExpr
-
visitUnaryOperation
protected abstract R visitUnaryOperation(UnaryOperation unaryOpExpr, P p)
Visit anUnaryOperation
.- Parameters:
unaryOpExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
unaryOpExpr
-
visitUnknown
protected abstract R visitUnknown(Unknown unknownExpr, P p)
Visit anUnknown
.- Parameters:
unknownExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
unknownExpr
-
visitValueLiteral
protected abstract R visitValueLiteral(ValueLiteral literalExpr, P p)
Visit aValueLiteral
.- Parameters:
literalExpr
- the JavaExpression to visitp
- the parameter to pass to the visit method- Returns:
- the result of visiting the
literalExpr
-
-