Class TypeInferenceResolver
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.typeresolution.typeinference.TypeInferenceResolver
-
@Deprecated @InternalApi public final class TypeInferenceResolver extends Object
Deprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeInferenceResolver.ResolutionFailedException
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
boundsHaveAnEqualityBetween(List<Variable> firstList, Variable second, List<Bound> bounds)
Deprecated.static Set<Class<?>>
getErasedCandidateSet(List<JavaTypeDefinition> erasedSuperTypeSets)
Deprecated.static Map<Variable,JavaTypeDefinition>
getInstantiations(List<Bound> bounds)
Deprecated.static List<JavaTypeDefinition>
getLowerBoundsOf(Variable var, List<Bound> bounds)
Deprecated.static Set<Variable>
getMentionedVariables(List<Bound> bounds)
Deprecated.static Set<Class<?>>
getMinimalErasedCandidateSet(Set<Class<?>> erasedSet)
Deprecated.static Set<Variable>
getUninstantiatedVariables(List<Bound> bounds)
Deprecated.static Map<Variable,Set<Variable>>
getVariableDependencies(List<Bound> bounds)
Deprecated.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.3static List<JavaTypeDefinition>
inferTypes(List<Constraint> constraints, List<Bound> bounds, List<Variable> variables)
Deprecated.static JavaTypeDefinition
intersect(JavaTypeDefinition first, JavaTypeDefinition second)
Deprecated.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.static JavaTypeDefinition
lub(List<JavaTypeDefinition> types)
Deprecated.static JavaTypeDefinition
merge(JavaTypeDefinition first, JavaTypeDefinition second)
Deprecated.Merge two types of the same class to something both can be assigned to and is most specific.static Map<Variable,JavaTypeDefinition>
resolveVariables(List<Bound> bounds)
Deprecated.Resolve unresolved variables in a list of bounds.
-
-
-
Method Detail
-
inferTypes
public static List<JavaTypeDefinition> inferTypes(List<Constraint> constraints, List<Bound> bounds, List<Variable> variables)
Deprecated.
-
lub
public static JavaTypeDefinition lub(List<JavaTypeDefinition> types)
Deprecated.
-
intersect
public static JavaTypeDefinition intersect(JavaTypeDefinition first, JavaTypeDefinition second)
Deprecated.- Returns:
- the intersection of the two types
-
merge
public static JavaTypeDefinition merge(JavaTypeDefinition first, JavaTypeDefinition second)
Deprecated.Merge two types of the same class to something both can be assigned to and is most specific.
-
getErasedCandidateSet
public static Set<Class<?>> getErasedCandidateSet(List<JavaTypeDefinition> erasedSuperTypeSets)
Deprecated.
-
getMinimalErasedCandidateSet
public static Set<Class<?>> getMinimalErasedCandidateSet(Set<Class<?>> erasedSet)
Deprecated.
-
resolveVariables
public static Map<Variable,JavaTypeDefinition> resolveVariables(List<Bound> bounds)
Deprecated.Resolve unresolved variables in a list of bounds.
-
getLowerBoundsOf
public static List<JavaTypeDefinition> getLowerBoundsOf(Variable var, List<Bound> bounds)
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
-
getVariableDependencies
public static Map<Variable,Set<Variable>> getVariableDependencies(List<Bound> bounds)
Deprecated.
-
getMentionedVariables
public static Set<Variable> getMentionedVariables(List<Bound> bounds)
Deprecated.- Returns:
- a set of variables mentioned by the bounds
-
-