public class FlowExpressions
extends java.lang.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.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
The poorly-named Receiver class is actually a Java AST.
|
static class |
FlowExpressions.ThisReference |
static class |
FlowExpressions.Unknown |
static class |
FlowExpressions.ValueLiteral |
Constructor and Description |
---|
FlowExpressions() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<FlowExpressions.Receiver> |
getParametersOfEnclosingMethod(AnnotationProvider annotationProvider,
com.sun.source.util.TreePath path)
Returns Receiver objects for the formal parameters of the method in which path is enclosed.
|
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
com.sun.source.tree.ExpressionTree receiverTree) |
static FlowExpressions.Receiver |
internalReprOf(AnnotationProvider provider,
com.sun.source.tree.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) |
static FlowExpressions.FieldAccess |
internalReprOfFieldAccess(AnnotationProvider provider,
FieldAccessNode node) |
static FlowExpressions.Receiver |
internalReprOfImplicitReceiver(javax.lang.model.element.Element ele)
Returns the implicit receiver of ele.
|
static FlowExpressions.Receiver |
internalReprOfPseudoReceiver(com.sun.source.util.TreePath path,
javax.lang.model.type.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.public static FlowExpressions.ArrayAccess internalReprOfArrayAccess(AnnotationProvider provider, ArrayAccessNode node)
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, com.sun.source.tree.ExpressionTree receiverTree)
FlowExpressions.Receiver
) of any ExpressionTree
.
Might contain FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOf(AnnotationProvider provider, com.sun.source.tree.ExpressionTree receiverTree, boolean allowNonDeterministic)
FlowExpressions.Receiver
) of any ExpressionTree
.
Might contain FlowExpressions.Unknown
.public static FlowExpressions.Receiver internalReprOfImplicitReceiver(javax.lang.model.element.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(com.sun.source.util.TreePath path, javax.lang.model.type.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 java.util.List<FlowExpressions.Receiver> getParametersOfEnclosingMethod(AnnotationProvider annotationProvider, com.sun.source.util.TreePath path)
annotationProvider
- annotationProviderpath
- TreePath that is enclosed by the method