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.
|
Modifier and Type | Method and Description |
---|---|
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForClassDeclaration(com.sun.source.tree.ClassTree classTree,
BaseContext checkerContext) |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForLambda(com.sun.source.tree.LambdaExpressionTree lambdaTree,
com.sun.source.util.TreePath path,
BaseContext checkerContext) |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForMethodDeclaration(com.sun.source.tree.MethodTree methodDeclaration,
com.sun.source.tree.Tree enclosingTree,
BaseContext checkerContext)
Creates a
FlowExpressionParseUtil.FlowExpressionContext for the method declared in methodDeclaration . |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForMethodDeclaration(com.sun.source.tree.MethodTree methodDeclaration,
com.sun.source.util.TreePath currentPath,
BaseContext checkerContext)
Creates a
FlowExpressionParseUtil.FlowExpressionContext for the method declared in methodDeclaration . |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForMethodDeclaration(com.sun.source.tree.MethodTree methodDeclaration,
javax.lang.model.type.TypeMirror enclosingType,
BaseContext checkerContext)
Creates a
FlowExpressionParseUtil.FlowExpressionContext for the method declared in methodDeclaration . |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForMethodUse(MethodInvocationNode methodInvocation,
BaseContext checkerContext) |
static FlowExpressionParseUtil.FlowExpressionContext |
buildContextForNewClassUse(ObjectCreationNode n,
BaseContext checkerContext) |
FlowExpressionParseUtil.FlowExpressionContext |
copyAndUseOuterReceiver()
Returns a copy of the context that differs in that it uses the outer receiver as main
receiver (and also uses it as the outer receiver).
|
FlowExpressionParseUtil.FlowExpressionContext |
copyChangeToParsingMemberOfReceiver(FlowExpressions.Receiver receiver)
Returns a copy of the context that differs in that it has a different receiver.
|
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(com.sun.source.tree.MethodTree methodDeclaration, com.sun.source.tree.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(com.sun.source.tree.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(com.sun.source.tree.LambdaExpressionTree lambdaTree, com.sun.source.util.TreePath path, BaseContext checkerContext)
public static FlowExpressionParseUtil.FlowExpressionContext buildContextForMethodDeclaration(com.sun.source.tree.MethodTree methodDeclaration, com.sun.source.util.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(com.sun.source.tree.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 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()