public class SubtypesSolver extends Object
Constructor and Description |
---|
SubtypesSolver() |
Modifier and Type | Method and Description |
---|---|
InferenceResult |
glbSubtypes(Set<TypeVariable> remainingTargets,
ConstraintMap constraints,
AnnotatedTypeFactory typeFactory) |
protected static void |
propagatePreviousGlbs(TargetConstraints.Subtypes targetSubtypes,
InferenceResult solution,
Map<AnnotatedTypeMirror,AnnotationMirrorSet> subtypesOfTarget)
/** If the target corresponding to targetRecord must be a subtype of another target for which
we have already determined a GLB, add that target's GLB to the list of subtypes to be GLBed
for this target.
|
InferenceResult |
solveFromSubtypes(Set<TypeVariable> remainingTargets,
ConstraintMap constraints,
AnnotatedTypeFactory typeFactory)
Infers type arguments using subtype constraints.
|
public InferenceResult solveFromSubtypes(Set<TypeVariable> remainingTargets, ConstraintMap constraints, AnnotatedTypeFactory typeFactory)
remainingTargets
- targets for which we still need to infer a valueconstraints
- the set of constraints for all targetstarget ⇒ inferred type
), note this class always infers
concrete types and will not infer that the target is equivalent to another targetpublic InferenceResult glbSubtypes(Set<TypeVariable> remainingTargets, ConstraintMap constraints, AnnotatedTypeFactory typeFactory)
protected static void propagatePreviousGlbs(TargetConstraints.Subtypes targetSubtypes, InferenceResult solution, Map<AnnotatedTypeMirror,AnnotationMirrorSet> subtypesOfTarget)