Package org.jboss.weld.resolution
Class CovariantTypes
- java.lang.Object
-
- org.jboss.weld.resolution.CovariantTypes
-
public class CovariantTypes extends Object
Utility class that captures standard covariant Java assignability rules. This class operates on all the possible Type subtypes: Class, ParameterizedType, TypeVariable, WildcardType, GenericArrayType. To make this class easier to understand and maintain, there is a separate isAssignableFrom method for each combination of possible types. Each of these methods compares two type instances and determines whether the first one is assignable from the other. TypeVariables are considered a specific unknown type restricted by the upper bound. No inference of type variables is performed.- Author:
- Jozef Hartinger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isAssignableFrom(Type type1, Type type2)
static boolean
isAssignableFromAtLeastOne(Type type1, Type[] types2)
-