Class IndexMethodIdentifier
java.lang.Object
org.checkerframework.checker.index.IndexMethodIdentifier
Given a Tree or other construct, this class has methods to query whether it is a particular
 method call.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisIndexOfString(Tree methodTree) Returns true iff the argument is an invocation of String#indexOf or String#lastIndexOf that takes a string parameter.booleanReturns true iftreeis an invocation of a method that returns the length of "this"booleanReturns true iftreeevaluates to the length of "this".booleanReturns true ifnodeis an invocation of a method that returns the length ofthisbooleanReturns true iff the argument is an invocation of Math.max.booleanReturns true iff the argument is an invocation of Math.min.booleanisMathRandom(Tree tree, ProcessingEnvironment processingEnv) Returns true iff the argument is an invocation of Math.random().booleanisRandomNextDouble(Tree tree, ProcessingEnvironment processingEnv) Returns true iff the argument is an invocation of Random.nextDouble().booleanisRandomNextInt(Tree tree, ProcessingEnvironment processingEnv) Returns true iff the argument is an invocation of Random.nextInt().
- 
Constructor Details- 
IndexMethodIdentifier
 
- 
- 
Method Details- 
isIndexOfStringReturns true iff the argument is an invocation of String#indexOf or String#lastIndexOf that takes a string parameter.- Parameters:
- methodTree- the method invocation tree to be tested
- Returns:
- true iff the argument is an invocation of one of String's indexOf or lastIndexOf methods that takes another string as a parameter
 
- 
isMathMinReturns true iff the argument is an invocation of Math.min.- Parameters:
- methodTree- the method invocation tree to be tested
- Returns:
- true iff the argument is an invocation of Math.min()
 
- 
isMathMaxReturns true iff the argument is an invocation of Math.max.
- 
isMathRandomReturns true iff the argument is an invocation of Math.random().
- 
isRandomNextDoubleReturns true iff the argument is an invocation of Random.nextDouble().
- 
isRandomNextIntReturns true iff the argument is an invocation of Random.nextInt().
- 
isLengthOfMethodInvocationReturns true iftreeis an invocation of a method that returns the length of "this"- Parameters:
- tree- a tree
- Returns:
- true if treeis an invocation of a method that returns the length ofthis
 
- 
isLengthOfMethodInvocationReturns true iftreeevaluates to the length of "this". This might be a call to String,length, or a method annotated with @LengthOf.- Returns:
- true if treeevaluates to the length of "this"
 
- 
isLengthOfMethodInvocationReturns true ifnodeis an invocation of a method that returns the length ofthis- Parameters:
- node- a node
- Returns:
- true if nodeis an invocation of a method that returns the length ofthis
 
 
-