Class TypeUtils


  • public final class TypeUtils
    extends java.lang.Object
    • Constructor Detail

      • TypeUtils

        private TypeUtils()
    • Method Detail

      • isAutoUnboxed

        public static boolean isAutoUnboxed​(Type<?> type)
      • getUnderlyingPrimitive

        public static Type<?> getUnderlyingPrimitive​(Type<?> type)
      • getBoxedTypeOrSelf

        public static Type<?> getBoxedTypeOrSelf​(Type<?> type)
      • getUnderlyingPrimitiveOrSelf

        public static Type<?> getUnderlyingPrimitiveOrSelf​(Type<?> type)
      • getBoxedType

        public static Type<?> getBoxedType​(Type<?> type)
      • isArithmetic

        public static boolean isArithmetic​(Type<?> type)
      • isNumeric

        public static boolean isNumeric​(Type<?> type)
      • isIntegralOrBoolean

        public static boolean isIntegralOrBoolean​(Type<?> type)
      • isIntegral

        public static boolean isIntegral​(Type<?> type)
      • isBoolean

        public static boolean isBoolean​(Type<?> type)
      • areEquivalent

        public static boolean areEquivalent​(Type<?> class1,
                                            Type<?> class2)
      • areEquivalentWithOrdering

        public static boolean areEquivalentWithOrdering​(TypeList types1,
                                                        TypeList types2)
      • areEquivalent

        public static boolean areEquivalent​(TypeList types1,
                                            TypeList types2)
      • hasIdentityPrimitiveOrBoxingConversion

        public static boolean hasIdentityPrimitiveOrBoxingConversion​(Type<?> source,
                                                                     Type<?> destination)
      • hasReferenceConversion

        public static boolean hasReferenceConversion​(Type<?> source,
                                                     Type<?> destination)
      • getCoercionMethod

        public static MethodInfo getCoercionMethod​(Type<?> source,
                                                   Type<?> destination)
      • getBoxMethod

        public static MethodInfo getBoxMethod​(Type<?> type)
      • getUnboxMethod

        public static MethodInfo getUnboxMethod​(Type<?> type)
      • getUnboxMethod

        public static MethodInfo getUnboxMethod​(Type<?> boxedType,
                                                Type<?> unboxedType)
      • areReferenceAssignable

        public static boolean areReferenceAssignable​(Type<?> destination,
                                                     Type<?> source)
      • hasReferenceEquality

        public static boolean hasReferenceEquality​(Type<?> left,
                                                   Type<?> right)
      • hasBuiltInEqualityOperator

        public static boolean hasBuiltInEqualityOperator​(Type<?> left,
                                                         Type<?> right)
      • isValidInvocationTargetType

        public static boolean isValidInvocationTargetType​(MethodInfo method,
                                                          Type<?> targetType)
      • isSameOrSubType

        public static boolean isSameOrSubType​(Type<?> type,
                                              Type<?> subType)
      • isImplicitNumericConversion

        public static boolean isImplicitNumericConversion​(Type<?> sourceType,
                                                          Type<?> targetType)
      • getInternalName

        public static java.lang.String getInternalName​(@NotNull
                                                       java.lang.Class<?> clazz)
      • isSingleWord

        public static boolean isSingleWord​(Type<?> type)
      • isSingleWord

        public static boolean isSingleWord​(javax.lang.model.type.TypeKind kind)
      • isDoubleWord

        public static boolean isDoubleWord​(Type<?> type)
      • isDoubleWord

        public static boolean isDoubleWord​(javax.lang.model.type.TypeKind kind)
      • isNumeric

        public static boolean isNumeric​(javax.lang.model.type.TypeKind kind)
      • isIntegral

        public static boolean isIntegral​(javax.lang.model.type.TypeKind kind)
      • isSubWordOrInt32

        public static boolean isSubWordOrInt32​(Type<?> type)
      • isSubWordOrInt32

        public static boolean isSubWordOrInt32​(javax.lang.model.type.TypeKind kind)
      • bitWidth

        public static int bitWidth​(Type<?> type)
      • bitWidth

        public static int bitWidth​(javax.lang.model.type.TypeKind kind)