Class CollectionToArrayHeuristics

    • Constructor Detail

      • CollectionToArrayHeuristics

        public CollectionToArrayHeuristics​(BaseTypeChecker checker,
                                           NullnessNoInitAnnotatedTypeFactory factory)
        Create a CollectionToArrayHeuristics.
        Parameters:
        checker - the checker, used for issuing diagnostic messages
        factory - 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 to toArray, then it manipulates the returned type of method arg to contain the appropriate nullness. Otherwise, it does nothing.
        Parameters:
        tree - method invocation tree
        method - invoked method type