public class ViewpointAdaptJavaExpression extends JavaExpressionConverter
JavaExpression
by replacing ThisReference
and FormalParameter
expressions with the given JavaExpression
s.Modifier and Type | Method and Description |
---|---|
static JavaExpression |
viewpointAdapt(JavaExpression javaExpr,
@Nullable JavaExpression thisReference)
|
static JavaExpression |
viewpointAdapt(JavaExpression javaExpr,
@Nullable JavaExpression thisReference,
@Nullable List<JavaExpression> args)
|
static JavaExpression |
viewpointAdapt(JavaExpression javaExpr,
@Nullable List<JavaExpression> args)
|
protected JavaExpression |
visitFormalParameter(FormalParameter parameterExpr,
Void unused)
Visit a
FormalParameter . |
protected JavaExpression |
visitThisReference(ThisReference thisExpr,
Void unused)
Visit a
ThisReference . |
convert, convert, visitArrayAccess, visitArrayCreation, visitBinaryOperation, visitClassName, visitFieldAccess, visitLocalVariable, visitMethodCall, visitUnaryOperation, visitUnknown, visitValueLiteral
visit
public static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable List<JavaExpression> args)
javaExpr
- the expression to viewpoint-adaptargs
- the expressions that replace FormalParameter
s; if null, FormalParameter
s are not replacedpublic static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable JavaExpression thisReference)
javaExpr
- the expression to viewpoint-adaptthisReference
- the expression that replaces occurrences of ThisReference
; if
null, ThisReference
s are not replacedpublic static JavaExpression viewpointAdapt(JavaExpression javaExpr, @Nullable JavaExpression thisReference, @Nullable List<JavaExpression> args)
javaExpr
- the expression to viewpoint-adaptthisReference
- the expression that replaces occurrences of ThisReference
; if
null, ThisReference
s are not replacedargs
- the expressions that replaces FormalParameter
s; if null, FormalParameter
s are not replacedprotected JavaExpression visitThisReference(ThisReference thisExpr, Void unused)
JavaExpressionVisitor
ThisReference
.visitThisReference
in class JavaExpressionConverter
thisExpr
- the JavaExpression to visitunused
- the parameter to pass to the visit methodthisExpr
protected JavaExpression visitFormalParameter(FormalParameter parameterExpr, Void unused)
JavaExpressionVisitor
FormalParameter
.visitFormalParameter
in class JavaExpressionConverter
parameterExpr
- the JavaExpression to visitunused
- the parameter to pass to the visit methodparameterExpr