Class TypeChecker
- java.lang.Object
-
- org.glassfish.hk2.utilities.reflection.TypeChecker
-
public class TypeChecker extends Object
This class contains various utilities for ensuring java type safety- Author:
- jwells
-
-
Constructor Summary
Constructors Constructor Description TypeChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isRawTypeSafe(Type requiredType, Type beanType)
Returns true if the given requiredType is safely assignable from the given beanType.
-
-
-
Method Detail
-
isRawTypeSafe
public static boolean isRawTypeSafe(Type requiredType, Type beanType)
Returns true if the given requiredType is safely assignable from the given beanType. In otherwords, ifrequiredType = beanType
without any cast. It should be noted that this checker is using the CDI rules (as stated in CDI version 1.1 in section- Parameters:
requiredType
- The type being assigned intobeanType
- the type being assigned- Returns:
- true if things are type safe
-
-