Class CollectionToArrayHeuristics
- java.lang.Object
-
- org.checkerframework.checker.nullness.CollectionToArrayHeuristics
-
public class CollectionToArrayHeuristics extends java.lang.Object
Determines the nullness type of calls toCollection.toArray()
.- See the Checker Framework Manual:
- Nullness and conversions from collections
to arrays, Constant Value Checker
-
-
Constructor Summary
Constructors Constructor Description CollectionToArrayHeuristics(BaseTypeChecker checker, NullnessNoInitAnnotatedTypeFactory factory)
Create a CollectionToArrayHeuristics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)
If the method invocation is a call totoArray
, then it manipulates the returned type ofmethod
arg to contain the appropriate nullness.
-
-
-
Constructor Detail
-
CollectionToArrayHeuristics
public CollectionToArrayHeuristics(BaseTypeChecker checker, NullnessNoInitAnnotatedTypeFactory factory)
Create a CollectionToArrayHeuristics.- Parameters:
checker
- the checker, used for issuing diagnostic messagesfactory
- the type factory
-
-
Method Detail
-
handle
public void handle(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)
If the method invocation is a call totoArray
, then it manipulates the returned type ofmethod
arg to contain the appropriate nullness. Otherwise, it does nothing.- Parameters:
tree
- method invocation treemethod
- invoked method type
-
-