public class EqualitiesSolver extends Object
Constructor and Description |
---|
EqualitiesSolver() |
Modifier and Type | Method and Description |
---|---|
InferredValue.InferredTarget |
findEqualTarget(TargetConstraints.Equalities equalities,
AnnotationMirrorSet tops)
Attempt to find a target which is equal to this target.
|
InferredValue |
mergeConstraints(TypeVariable target,
TargetConstraints.Equalities equalities,
InferenceResult solution,
ConstraintMap constraintMap,
AnnotatedTypeFactory typeFactory) |
InferenceResult |
solveEqualities(Set<TypeVariable> targets,
ConstraintMap constraintMap,
AnnotatedTypeFactory typeFactory)
For each target, if there is one or more equality constraints involving concrete types that
lets us infer a primary annotation in all qualifier hierarchies then infer a concrete type
argument.
|
boolean |
updateTargetsWithPartiallyInferredType(TargetConstraints.Equalities equalities,
ConstraintMap constraintMap,
AnnotatedTypeFactory typeFactory) |
public InferenceResult solveEqualities(Set<TypeVariable> targets, ConstraintMap constraintMap, AnnotatedTypeFactory typeFactory)
if we have inferred either a concrete type or another target as type argument rewrite all of the constraints for the current target to instead use the inferred type/target
We do this iteratively until NO new inferred type argument is found
targets
- the list of type parameters for which we are inferring type argumentsconstraintMap
- the set of constraints over the set of targetstarget ⇒ inferred type or target
)public InferredValue mergeConstraints(TypeVariable target, TargetConstraints.Equalities equalities, InferenceResult solution, ConstraintMap constraintMap, AnnotatedTypeFactory typeFactory)
public boolean updateTargetsWithPartiallyInferredType(TargetConstraints.Equalities equalities, ConstraintMap constraintMap, AnnotatedTypeFactory typeFactory)
public InferredValue.InferredTarget findEqualTarget(TargetConstraints.Equalities equalities, AnnotationMirrorSet tops)