public class IndexMethodIdentifier
extends java.lang.Object
Constructor and Description |
---|
IndexMethodIdentifier(AnnotatedTypeFactory factory) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLengthOfMethodInvocation(javax.lang.model.element.ExecutableElement ele)
Returns true if
tree evaluates to the length of "this". |
boolean |
isLengthOfMethodInvocation(Node node) |
boolean |
isLengthOfMethodInvocation(com.sun.source.tree.Tree tree) |
boolean |
isMathMax(com.sun.source.tree.Tree methodTree)
Returns true iff the argument is an invocation of Math.max.
|
boolean |
isMathMin(com.sun.source.tree.Tree methodTree)
Returns true iff the argument is an invocation of Math.min.
|
boolean |
isMathRandom(com.sun.source.tree.Tree tree,
javax.annotation.processing.ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Math.random().
|
boolean |
isRandomNextDouble(com.sun.source.tree.Tree tree,
javax.annotation.processing.ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Random.nextDouble().
|
boolean |
isRandomNextInt(com.sun.source.tree.Tree tree,
javax.annotation.processing.ProcessingEnvironment processingEnv)
Returns true iff the argument is an invocation of Random.nextInt().
|
public IndexMethodIdentifier(AnnotatedTypeFactory factory)
public boolean isMathMin(com.sun.source.tree.Tree methodTree)
public boolean isMathMax(com.sun.source.tree.Tree methodTree)
public boolean isMathRandom(com.sun.source.tree.Tree tree, javax.annotation.processing.ProcessingEnvironment processingEnv)
public boolean isRandomNextDouble(com.sun.source.tree.Tree tree, javax.annotation.processing.ProcessingEnvironment processingEnv)
public boolean isRandomNextInt(com.sun.source.tree.Tree tree, javax.annotation.processing.ProcessingEnvironment processingEnv)
public boolean isLengthOfMethodInvocation(com.sun.source.tree.Tree tree)
tree
is an invocation of a method that returns the length of
"this"public boolean isLengthOfMethodInvocation(javax.lang.model.element.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)
tree
is an invocation of a method that returns the length of
"this"