public class FlowExpressions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FlowExpressions.ArrayAccess
An array access.
|
static class |
FlowExpressions.ArrayCreation
FlowExpression for array creations.
|
static class |
FlowExpressions.BinaryOperation
FlowExpression.Receiver for binary operations.
|
static class |
FlowExpressions.ClassName
A ClassName represents the occurrence of a class as part of a static field access or method
invocation.
|
static class |
FlowExpressions.FieldAccess |
static class |
FlowExpressions.LocalVariable |
static class |
FlowExpressions.MethodCall
A call to a @Deterministic method.
|
static class |
FlowExpressions.Receiver
This class represents a Java expression and its type.
|
static class |
FlowExpressions.ThisReference |
static class |
FlowExpressions.Unknown
Stands for any expression that the Dataflow Framework lacks explicit support for.
|
static class |
FlowExpressions.ValueLiteral
FlowExpression.Receiver for literals.
|
Constructor and Description |
---|
FlowExpressions() |
Modifier and Type | Method and Description |
---|---|
static @Nullable List<FlowExpressions.Receiver> |
getParametersOfEnclosingMethod(AnnotationProvider annotationProvider,
TreePath path)
Returns Receiver objects for the formal parameters of the method in which path is enclosed.
|
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
ExpressionTree receiverTree)
Returns the internal representation (as
FlowExpressions.Receiver ) of any ExpressionTree . |
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
ExpressionTree receiverTree,
boolean allowNonDeterministic)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
Node receiverNode)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
Node receiverNode,
boolean allowNonDeterministic)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static FlowExpressions.ArrayAccess |
internalReprOfArrayAccess(AnnotationProvider provider,
ArrayAccessNode node)
Returns the internal representation (as
FlowExpressions.FieldAccess ) of a FieldAccessNode . |
static FlowExpressions.FieldAccess |
internalReprOfFieldAccess(AnnotationProvider provider,
FieldAccessNode node)
Returns the internal representation (as
FlowExpressions.FieldAccess ) of a FieldAccessNode . |
static FlowExpressions.Receiver |
internalReprOfImplicitReceiver(Element ele)
Returns the implicit receiver of ele.
|
static FlowExpressions.Receiver |
internalReprOfPseudoReceiver(TreePath path,
TypeMirror enclosingType)
Returns either a new ClassName or ThisReference Receiver object for the enclosingType.
|
public static FlowExpressions.FieldAccess internalReprOfFieldAccess(AnnotationProvider provider, FieldAccessNode node)
FlowExpressions.FieldAccess
) of a FieldAccessNode
.
Can contain FlowExpressions.Unknown
as receiver.FlowExpressions.FieldAccess
) of a FieldAccessNode
.
Can contain FlowExpressions.Unknown
as receiver.public static FlowExpressions.ArrayAccess internalReprOfArrayAccess(AnnotationProvider provider, ArrayAccessNode node)
FlowExpressions.FieldAccess
) of a FieldAccessNode
.
Can contain FlowExpressions.Unknown
as receiver.FlowExpressions.FieldAccess
) of a FieldAccessNode
.
Can contain FlowExpressions.Unknown
as receiver.public static FlowExpressions.Receiver internalReprOf(AnnotationProvider provider, Node receiverNode)
FlowExpressions.Receiver
) of any Node
. Might contain
FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOf(AnnotationProvider provider, Node receiverNode, boolean allowNonDeterministic)
FlowExpressions.Receiver
) of any Node
. Might contain
FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOf(AnnotationProvider provider, ExpressionTree receiverTree)
FlowExpressions.Receiver
) of any ExpressionTree
.
Might contain FlowExpressions.Unknown
.FlowExpressions.Receiver
) of any ExpressionTree
.
Might contain FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOf(AnnotationProvider provider, ExpressionTree receiverTree, boolean allowNonDeterministic)
FlowExpressions.Receiver
) of any ExpressionTree
.
Might contain FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOfImplicitReceiver(Element ele)
Returns either a new ClassName or a new ThisReference depending on whether ele is static or not. The passed element must be a field, method, or class.
ele
- field, method, or classpublic static FlowExpressions.Receiver internalReprOfPseudoReceiver(TreePath path, TypeMirror enclosingType)
The Tree should be an expression or a statement that does not have a receiver or an implicit receiver. For example, a local variable declaration.
path
- TreePath to treeenclosingType
- type of the enclosing typepublic static @Nullable List<FlowExpressions.Receiver> getParametersOfEnclosingMethod(AnnotationProvider annotationProvider, TreePath path)
annotationProvider
- annotationProviderpath
- TreePath that is enclosed by the methodnull
otherwise