public class LubTypeVariableAnnotator
extends Object
At the moment, this class is just a collection of special cases that fix the behavior of AnnotateAsLub
Annotate as lub always uses a type variable's upper bound to annotate (when in fact the type variable unchanged
is sometimes the lub). This class handles the cases where the lub type is a type variable and:
a) the subtypes list contains only type variables
In the case we should not be using only the upper bound, but choosing a set of bounds that serves as a
LUB of all type variables.
b) the subtypes lsit contains only type variables or NULL types
In this case NULL should have been converted to a type by asSuper but was NOT. In this case, we
make a copy of the lub type and apply the primary annotations of the NULL type as primary
annotations on the copy. From there, we follow the logic in case a.