Class Subsequence
java.lang.Object
org.checkerframework.checker.index.Subsequence
Holds information from 
HasSubsequence annotations.- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic SubsequenceReturns a Subsequence representing theHasSubsequenceannotation on the declaration ofrecor null if there is not such annotation.static SubsequencegetSubsequenceFromTree(Tree varTree, BaseAnnotatedTypeFactoryForIndexChecker factory) Returns a Subsequence representing theHasSubsequenceannotation on the declaration ofvarTreeor null if there is not such annotation.static StringReturns the additive inverse of the given String.toString()
- 
Field Details- 
arrayName of the Subsequence.
- 
fromFirst index of the subsequence in the backing sequence.
- 
toLast index of the subsequence in the backing sequence.
 
- 
- 
Method Details- 
getSubsequenceFromTreepublic static Subsequence getSubsequenceFromTree(Tree varTree, BaseAnnotatedTypeFactoryForIndexChecker factory) Returns a Subsequence representing theHasSubsequenceannotation on the declaration ofvarTreeor null if there is not such annotation.Note that this method does not standardize or viewpoint adapt the arguments to the annotation, unlike getSubsequenceFromReceiver. - Parameters:
- varTree- some tree
- factory- an AnnotatedTypeFactory
- Returns:
- null or a new Subsequence from the declaration of varTree
 
- 
getSubsequenceFromReceiverpublic static Subsequence getSubsequenceFromReceiver(JavaExpression expr, BaseAnnotatedTypeFactoryForIndexChecker factory) Returns a Subsequence representing theHasSubsequenceannotation on the declaration ofrecor null if there is not such annotation.- Parameters:
- expr- some tree
- factory- an AnnotatedTypeFactory
- Returns:
- null or a new Subsequence from the declaration of varTree
 
- 
negateStringReturns the additive inverse of the given String. That is, if the result of this method is some String s', then s + s' == 0 will evaluate to true. Note that this relies on the fact that the JavaExpression parser cannot parse multiplication, so it naively just changes '-' to '+' and vice-versa.- Parameters:
- s- a Java expression string
- Returns:
- the negated string
 
- 
toString
 
-