public class IndexMethodIdentifier extends Object
Constructor and Description |
---|
IndexMethodIdentifier(AnnotatedTypeFactory factory) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLengthOfMethodInvocation(ExecutableElement ele)
Returns true if
tree evaluates to the length of "this". |
boolean |
isLengthOfMethodInvocation(Node node)
Returns true if
node is an invocation of a method that returns the length of this |
boolean |
isLengthOfMethodInvocation(Tree tree)
Returns true if
tree is an invocation of a method that returns the length of "this" |
boolean |
isMathMax(Tree methodTree)
Returns true iff the argument is an invocation of Math.max.
|
boolean |
isMathMin(Tree methodTree)
Returns true iff the argument is an invocation of Math.min.
|
boolean |
isMathRandom(Tree tree,
ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Math.random().
|
boolean |
isRandomNextDouble(Tree tree,
ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Random.nextDouble().
|
boolean |
isRandomNextInt(Tree tree,
ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Random.nextInt().
|
public IndexMethodIdentifier(AnnotatedTypeFactory factory)
public boolean isMathMin(Tree methodTree)
public boolean isMathMax(Tree methodTree)
public boolean isMathRandom(Tree tree, ProcessingEnvironment processingEnv)
public boolean isRandomNextDouble(Tree tree, ProcessingEnvironment processingEnv)
public boolean isRandomNextInt(Tree tree, ProcessingEnvironment processingEnv)
public boolean isLengthOfMethodInvocation(Tree tree)
tree
is an invocation of a method that returns the length of "this"tree
- a treetree
is an invocation of a method that returns the length of this
public boolean isLengthOfMethodInvocation(ExecutableElement ele)
tree
evaluates to the length of "this". This might be a call to
String,length, or a method annotated with @LengthOf.tree
evaluates to the length of "this"public boolean isLengthOfMethodInvocation(Node node)
node
is an invocation of a method that returns the length of this
node
- a nodenode
is an invocation of a method that returns the length of this