public class FlowExpressions extends Object
Constructor and Description |
---|
FlowExpressions() |
Modifier and Type | Method and Description |
---|---|
static @Nullable List<Receiver> |
getParametersOfEnclosingMethod(AnnotationProvider annotationProvider,
TreePath path)
Returns Receiver objects for the formal parameters of the method in which path is enclosed.
|
static Receiver |
internalReprOf(AnnotationProvider provider,
ExpressionTree receiverTree)
Returns the internal representation (as
Receiver ) of any ExpressionTree . |
static Receiver |
internalReprOf(AnnotationProvider provider,
ExpressionTree receiverTree,
boolean allowNonDeterministic)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static Receiver |
internalReprOf(AnnotationProvider provider,
Node receiverNode)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static Receiver |
internalReprOf(AnnotationProvider provider,
Node receiverNode,
boolean allowNonDeterministic)
We ignore operations such as widening and narrowing when computing the internal
representation.
|
static ArrayAccess |
internalReprOfArrayAccess(AnnotationProvider provider,
ArrayAccessNode node)
Returns the internal representation (as
FieldAccess ) of a FieldAccessNode . |
static FieldAccess |
internalReprOfFieldAccess(AnnotationProvider provider,
FieldAccessNode node)
Returns the internal representation (as
FieldAccess ) of a FieldAccessNode . |
static Receiver |
internalReprOfImplicitReceiver(Element ele)
Returns the implicit receiver of ele.
|
static Receiver |
internalReprOfPseudoReceiver(TreePath path,
TypeMirror enclosingType)
Returns either a new ClassName or ThisReference Receiver object for the enclosingType.
|
public static FieldAccess internalReprOfFieldAccess(AnnotationProvider provider, FieldAccessNode node)
FieldAccess
) of a FieldAccessNode
.
Can contain Unknown
as receiver.FieldAccess
) of a FieldAccessNode
.
Can contain Unknown
as receiver.public static ArrayAccess internalReprOfArrayAccess(AnnotationProvider provider, ArrayAccessNode node)
FieldAccess
) of a FieldAccessNode
.
Can contain Unknown
as receiver.FieldAccess
) of a FieldAccessNode
.
Can contain Unknown
as receiver.public static Receiver internalReprOf(AnnotationProvider provider, Node receiverNode)
public static Receiver internalReprOf(AnnotationProvider provider, Node receiverNode, boolean allowNonDeterministic)
public static Receiver internalReprOf(AnnotationProvider provider, ExpressionTree receiverTree)
Receiver
) of any ExpressionTree
.
Might contain Unknown
.public static Receiver internalReprOf(AnnotationProvider provider, ExpressionTree receiverTree, boolean allowNonDeterministic)
Receiver
) of any ExpressionTree
.
Might contain Unknown
.public static 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 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<Receiver> getParametersOfEnclosingMethod(AnnotationProvider annotationProvider, TreePath path)
annotationProvider
- annotationProviderpath
- TreePath that is enclosed by the methodnull
otherwise