Class TypeInferenceResolver
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.typeresolution.typeinference.TypeInferenceResolver
-
@Deprecated @InternalApi public final class TypeInferenceResolver extends java.lang.ObjectDeprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeInferenceResolver.ResolutionFailedExceptionDeprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanboundsHaveAnEqualityBetween(java.util.List<Variable> firstList, Variable second, java.util.List<Bound> bounds)Deprecated.static java.util.Set<java.lang.Class<?>>getErasedCandidateSet(java.util.List<JavaTypeDefinition> erasedSuperTypeSets)Deprecated.static java.util.Map<Variable,JavaTypeDefinition>getInstantiations(java.util.List<Bound> bounds)Deprecated.static java.util.List<JavaTypeDefinition>getLowerBoundsOf(Variable var, java.util.List<Bound> bounds)Deprecated.static java.util.Set<Variable>getMentionedVariables(java.util.List<Bound> bounds)Deprecated.static java.util.Set<java.lang.Class<?>>getMinimalErasedCandidateSet(java.util.Set<java.lang.Class<?>> erasedSet)Deprecated.static java.util.Set<Variable>getUninstantiatedVariables(java.util.List<Bound> bounds)Deprecated.static java.util.Map<Variable,java.util.Set<Variable>>getVariableDependencies(java.util.List<Bound> bounds)Deprecated.static java.util.List<Constraint>incorporateBounds(java.util.List<Bound> currentBounds, java.util.List<Bound> newBounds)Deprecated.https://docs.oracle.com/javase/specs/jls/se8/html/jls-18.html#jls-18.3static java.util.List<JavaTypeDefinition>inferTypes(java.util.List<Constraint> constraints, java.util.List<Bound> bounds, java.util.List<Variable> variables)Deprecated.static JavaTypeDefinitionintersect(JavaTypeDefinition first, JavaTypeDefinition second)Deprecated.static booleanisProperSubsetOfVariables(java.util.List<Variable> variables, java.util.Map<Variable,JavaTypeDefinition> instantiations, java.util.Map<Variable,java.util.Set<Variable>> dependencies, java.util.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 JavaTypeDefinitionlub(java.util.List<JavaTypeDefinition> types)Deprecated.static JavaTypeDefinitionmerge(JavaTypeDefinition first, JavaTypeDefinition second)Deprecated.Merge two types of the same class to something both can be assigned to and is most specific.static java.util.Map<Variable,JavaTypeDefinition>resolveVariables(java.util.List<Bound> bounds)Deprecated.Resolve unresolved variables in a list of bounds.
-
-
-
Method Detail
-
inferTypes
public static java.util.List<JavaTypeDefinition> inferTypes(java.util.List<Constraint> constraints, java.util.List<Bound> bounds, java.util.List<Variable> variables)
Deprecated.
-
lub
public static JavaTypeDefinition lub(java.util.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 java.util.Set<java.lang.Class<?>> getErasedCandidateSet(java.util.List<JavaTypeDefinition> erasedSuperTypeSets)
Deprecated.
-
getMinimalErasedCandidateSet
public static java.util.Set<java.lang.Class<?>> getMinimalErasedCandidateSet(java.util.Set<java.lang.Class<?>> erasedSet)
Deprecated.
-
resolveVariables
public static java.util.Map<Variable,JavaTypeDefinition> resolveVariables(java.util.List<Bound> bounds)
Deprecated.Resolve unresolved variables in a list of bounds.
-
getLowerBoundsOf
public static java.util.List<JavaTypeDefinition> getLowerBoundsOf(Variable var, java.util.List<Bound> bounds)
Deprecated.
-
isProperSubsetOfVariables
public static boolean isProperSubsetOfVariables(java.util.List<Variable> variables, java.util.Map<Variable,JavaTypeDefinition> instantiations, java.util.Map<Variable,java.util.Set<Variable>> dependencies, java.util.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(java.util.List<Variable> firstList, Variable second, java.util.List<Bound> bounds)
Deprecated.- Returns:
- true, if 'bounds' contains an equality between 'second' and an element from 'firstList'
-
getInstantiations
public static java.util.Map<Variable,JavaTypeDefinition> getInstantiations(java.util.List<Bound> bounds)
Deprecated.- Returns:
- A map of variable -> proper type produced by searching for α = T or T = α bounds
-
getUninstantiatedVariables
public static java.util.Set<Variable> getUninstantiatedVariables(java.util.List<Bound> bounds)
Deprecated.- Returns:
- A list of variables which have no direct instantiations
-
getVariableDependencies
public static java.util.Map<Variable,java.util.Set<Variable>> getVariableDependencies(java.util.List<Bound> bounds)
Deprecated.
-
getMentionedVariables
public static java.util.Set<Variable> getMentionedVariables(java.util.List<Bound> bounds)
Deprecated.- Returns:
- a set of variables mentioned by the bounds
-
incorporateBounds
public static java.util.List<Constraint> incorporateBounds(java.util.List<Bound> currentBounds, java.util.List<Bound> newBounds)
Deprecated.https://docs.oracle.com/javase/specs/jls/se8/html/jls-18.html#jls-18.3
-
-