Class ViewpointAdaptJavaExpression
java.lang.Object
org.checkerframework.dataflow.expression.JavaExpressionVisitor<JavaExpression,Void>
org.checkerframework.dataflow.expression.JavaExpressionConverter
org.checkerframework.dataflow.expression.ViewpointAdaptJavaExpression
This class has methods to viewpoint-adapt
JavaExpression
by replacing ThisReference
and FormalParameter
expressions with the given JavaExpression
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic JavaExpression
viewpointAdapt
(JavaExpression javaExpr, @Nullable List<JavaExpression> args) static JavaExpression
viewpointAdapt
(JavaExpression javaExpr, @Nullable JavaExpression thisReference) static JavaExpression
viewpointAdapt
(JavaExpression javaExpr, @Nullable JavaExpression thisReference, @Nullable List<JavaExpression> args) protected JavaExpression
visitFormalParameter
(FormalParameter parameterExpr, Void unused) Visit aFormalParameter
.protected JavaExpression
visitThisReference
(ThisReference thisExpr, Void unused) Visit aThisReference
.Methods inherited from class org.checkerframework.dataflow.expression.JavaExpressionConverter
convert, convert, visitArrayAccess, visitArrayCreation, visitBinaryOperation, visitClassName, visitFieldAccess, visitLocalVariable, visitMethodCall, visitUnaryOperation, visitUnknown, visitValueLiteral
Methods inherited from class org.checkerframework.dataflow.expression.JavaExpressionVisitor
visit
-
Method Details
-
viewpointAdapt
public static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable List<JavaExpression> args) - Parameters:
javaExpr
- the expression to viewpoint-adaptargs
- the expressions that replaceFormalParameter
s; if null,FormalParameter
s are not replaced- Returns:
- the viewpoint-adapted expression
-
viewpointAdapt
public static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable JavaExpression thisReference) - Parameters:
javaExpr
- the expression to viewpoint-adaptthisReference
- the expression that replaces occurrences ofThisReference
; if null,ThisReference
s are not replaced- Returns:
- the viewpoint-adapted expression
-
viewpointAdapt
public static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable JavaExpression thisReference, @Nullable List<JavaExpression> args) - Parameters:
javaExpr
- the expression to viewpoint-adaptthisReference
- the expression that replaces occurrences ofThisReference
; if null,ThisReference
s are not replacedargs
- the expressions that replacesFormalParameter
s; if null,FormalParameter
s are not replaced- Returns:
- the viewpoint-adapted expression
-
visitThisReference
Description copied from class:JavaExpressionVisitor
Visit aThisReference
.- Overrides:
visitThisReference
in classJavaExpressionConverter
- Parameters:
thisExpr
- the JavaExpression to visitunused
- the parameter to pass to the visit method- Returns:
- the result of visiting the
thisExpr
-
visitFormalParameter
Description copied from class:JavaExpressionVisitor
Visit aFormalParameter
.- Overrides:
visitFormalParameter
in classJavaExpressionConverter
- Parameters:
parameterExpr
- the JavaExpression to visitunused
- the parameter to pass to the visit method- Returns:
- the result of visiting the
parameterExpr
-