public class Subsequence
extends java.lang.Object
HasSubsequence
annotations.Modifier and Type | Field and Description |
---|---|
java.lang.String |
array
Name of the Subsequence.
|
java.lang.String |
from
First index of the subsequence in the backing sequence.
|
java.lang.String |
to
Last index of the subsequence in the backing sequence.
|
Modifier and Type | Method and Description |
---|---|
static FlowExpressionParseUtil.FlowExpressionContext |
getContextFromReceiver(FlowExpressions.Receiver rec,
BaseContext checker)
If the passed receiver is a FieldAccess, returns the context associated with it.
|
static Subsequence |
getSubsequenceFromReceiver(FlowExpressions.Receiver rec,
AnnotatedTypeFactory factory,
com.sun.source.util.TreePath currentPath,
FlowExpressionParseUtil.FlowExpressionContext context)
Returns a Subsequence representing the
HasSubsequence annotation on the declaration
of rec or null if there is not such annotation. |
static Subsequence |
getSubsequenceFromTree(com.sun.source.tree.Tree varTree,
AnnotatedTypeFactory factory)
Returns a Subsequence representing the
HasSubsequence annotation on the declaration
of varTree or null if there is not such annotation. |
static java.lang.String |
negateString(java.lang.String s,
com.sun.source.util.TreePath currentPath,
FlowExpressionParseUtil.FlowExpressionContext context)
Returns the additive inverse of the given String.
|
java.lang.String |
toString() |
public final java.lang.String array
public final java.lang.String from
public final java.lang.String to
public static Subsequence getSubsequenceFromTree(com.sun.source.tree.Tree varTree, AnnotatedTypeFactory factory)
HasSubsequence
annotation on the declaration
of varTree
or null if there is not such annotation.
Note that this method does not standardize or viewpoint adapt the arguments to the annotation, unlike getSubsequenceFromReceiver.
varTree
- some treefactory
- AnnotatedTypeFactoryvarTree
public static Subsequence getSubsequenceFromReceiver(FlowExpressions.Receiver rec, AnnotatedTypeFactory factory, com.sun.source.util.TreePath currentPath, FlowExpressionParseUtil.FlowExpressionContext context)
HasSubsequence
annotation on the declaration
of rec
or null if there is not such annotation.rec
- some treefactory
- AnnotatedTypeFactorycurrentPath
- the path at which to viewpoint adapt the subsequencecontext
- the context in which to viewpoint adapt the subsequencevarTree
public static FlowExpressionParseUtil.FlowExpressionContext getContextFromReceiver(FlowExpressions.Receiver rec, BaseContext checker)
Used to standardize and viewpoint adapt arguments to HasSubsequence annotations.
public static java.lang.String negateString(java.lang.String s, com.sun.source.util.TreePath currentPath, FlowExpressionParseUtil.FlowExpressionContext context)
The passed String is standardized and viewpoint adapted before this transformation is applied.
public java.lang.String toString()
toString
in class java.lang.Object