public class CollectionToArrayHeuristics extends Object
Collection.toArray().| Constructor and Description |
|---|
CollectionToArrayHeuristics(BaseTypeChecker checker,
NullnessAnnotatedTypeFactory factory)
Create a CollectionToArrayHeuristics.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(MethodInvocationTree tree,
AnnotatedTypeMirror.AnnotatedExecutableType method)
If the method invocation is a call to
toArray, then it manipulates the returned type of
method arg to contain the appropriate nullness. |
public CollectionToArrayHeuristics(BaseTypeChecker checker, NullnessAnnotatedTypeFactory factory)
checker - the checker, used for issuing diagnostic messagesfactory - the type factorypublic void handle(MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)
toArray, then it manipulates the returned type of
method arg to contain the appropriate nullness. Otherwise, it does nothing.tree - method invocation treemethod - invoked method type