public static class FlowExpressionParseUtil.FlowExpressionContext
extends java.lang.Object
@A(E)
, the context is the program element that is annotated by @A(E)
.Modifier and Type | Field and Description |
---|---|
java.util.List<FlowExpressions.Receiver> |
arguments |
BaseContext |
checkerContext |
FlowExpressions.Receiver |
outerReceiver |
boolean |
parsingMember
Whether or not the FlowExpressionParser is parsing the "member" part of a member select.
|
FlowExpressions.Receiver |
receiver |
boolean |
useLocalScope
Whether the TreePath should be used to find identifiers.
|
Constructor and Description |
---|
FlowExpressionContext(FlowExpressions.Receiver receiver,
java.util.List<FlowExpressions.Receiver> arguments,
BaseContext checkerContext)
Creates context for parsing a flow expression.
|
public final FlowExpressions.Receiver receiver
public final java.util.List<FlowExpressions.Receiver> arguments
public final FlowExpressions.Receiver outerReceiver
public final BaseContext checkerContext
public final boolean parsingMember
public boolean useLocalScope
public FlowExpressionContext(FlowExpressions.Receiver receiver, java.util.List<FlowExpressions.Receiver> arguments, BaseContext checkerContext)
receiver
- used to replace "this" in a flow expression and used to resolve
identifiers in the flow expression with an implicit "this"arguments
- used to replace parameter references, e.g. #1, in flow expressions, null
if no argumentscheckerContext
- used to create FlowExpressions.Receiver
spublic static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodDeclaration(MethodTree methodDeclaration, Tree enclosingTree, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the method declared in methodDeclaration
.methodDeclaration
- used translate parameter numbers in a flow expression to formal
parameters of the methodenclosingTree
- used to look up fields and as type of "this" in flow expressionscheckerContext
- use to build FlowExpressions.ReceivermethodDeclaration
public static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodDeclaration(MethodTree methodDeclaration, javax.lang.model.type.TypeMirror enclosingType, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the method declared in methodDeclaration
.methodDeclaration
- used translate parameter numbers in a flow expression to formal
parameters of the methodenclosingType
- used to look up fields and as type of "this" in flow expressionscheckerContext
- use to build FlowExpressions.ReceivermethodDeclaration
public static FlowExpressionParseUtil.FlowExpressionContext buildContextForLambda(LambdaExpressionTree lambdaTree, TreePath path, BaseContext checkerContext)
public static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodDeclaration(MethodTree methodDeclaration, TreePath currentPath, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the method declared in methodDeclaration
.methodDeclaration
- used translate parameter numbers in a flow expression to formal
parameters of the methodcurrentPath
- to find the enclosing class, which is used to look up fields and as
type of "this" in flow expressionscheckerContext
- use to build FlowExpressions.ReceivermethodDeclaration
public static FlowExpressionParseUtil.FlowExpressionContext buildContextForClassDeclaration(ClassTree classTree, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the class classTree
as seen at the
class declaration.public static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodUse(MethodInvocationNode methodInvocation, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the method methodInvocation
(represented as a Node
as seen at the method use (i.e., at a method call
site).public static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodUse(MethodInvocationTree methodInvocation, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the method methodInvocation
(represented as a MethodInvocationTree
as seen at the method use (i.e., at a
method call site).public static FlowExpressionParseUtil.FlowExpressionContext buildContextForNewClassUse(ObjectCreationNode n, BaseContext checkerContext)
FlowExpressionParseUtil.FlowExpressionContext
for the constructor n
(represented as a
Node
as seen at the method use (i.e., at a method call site).public FlowExpressionParseUtil.FlowExpressionContext copyChangeToParsingMemberOfReceiver(FlowExpressions.Receiver receiver)
public FlowExpressionParseUtil.FlowExpressionContext copyAndUseOuterReceiver()