Class TypeInferenceResolver

    • Method Detail

      • getMinimalErasedCandidateSet

        public static Set<Class<?>> getMinimalErasedCandidateSet​(Set<Class<?>> erasedSet)
        Deprecated.
      • isProperSubsetOfVariables

        public static boolean isProperSubsetOfVariables​(List<Variable> variables,
                                                        Map<Variable,​JavaTypeDefinition> instantiations,
                                                        Map<Variable,​Set<Variable>> dependencies,
                                                        List<Bound> bounds)
        Deprecated.
        Given a set of inference variables to resolve, let V be the union of this set and all variables upon which the resolution of at least one variable in this set depends.

        ...

        Otherwise, let { α1, ..., αn } be a non-empty subset of uninstantiated variables in V such that i) for all i (1 ≤ i ≤ n), if αi depends on the resolution of a variable β, then either β has an instantiation or there is some j such that β = αj; and Resolution proceeds by generating an instantiation for each of α1, ..., αn based on the bounds in the bound set:

        Returns:
        true, if 'variables' is a resolvable subset
      • boundsHaveAnEqualityBetween

        public static boolean boundsHaveAnEqualityBetween​(List<Variable> firstList,
                                                          Variable second,
                                                          List<Bound> bounds)
        Deprecated.
        Returns:
        true, if 'bounds' contains an equality between 'second' and an element from 'firstList'
      • getInstantiations

        public static Map<Variable,​JavaTypeDefinition> getInstantiations​(List<Bound> bounds)
        Deprecated.
        Returns:
        A map of variable -> proper type produced by searching for α = T or T = α bounds
      • getUninstantiatedVariables

        public static Set<Variable> getUninstantiatedVariables​(List<Bound> bounds)
        Deprecated.
        Returns:
        A list of variables which have no direct instantiations
      • getMentionedVariables

        public static Set<Variable> getMentionedVariables​(List<Bound> bounds)
        Deprecated.
        Returns:
        a set of variables mentioned by the bounds
      • incorporateBounds

        public static List<Constraint> incorporateBounds​(List<Bound> currentBounds,
                                                         List<Bound> newBounds)
        Deprecated.
        https://docs.oracle.com/javase/specs/jls/se8/html/jls-18.html#jls-18.3