Class TypeChecker


  • public class TypeChecker
    extends Object
    This class contains various utilities for ensuring java type safety
    Author:
    jwells
    • Constructor Detail

      • TypeChecker

        public TypeChecker()
    • 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, if requiredType = 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 into
        beanType - the type being assigned
        Returns:
        true if things are type safe