Class TypeUtils

java.lang.Object
com.strobel.util.TypeUtils

public final class TypeUtils extends Object
  • Constructor Details

    • TypeUtils

      private TypeUtils()
  • Method Details

    • 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 String getInternalName(@NotNull Class<?> clazz)
    • isSingleWord

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

      public static boolean isSingleWord(TypeKind kind)
    • isDoubleWord

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

      public static boolean isDoubleWord(TypeKind kind)
    • isNumeric

      public static boolean isNumeric(TypeKind kind)
    • isIntegral

      public static boolean isIntegral(TypeKind kind)
    • isSubWordOrInt32

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

      public static boolean isSubWordOrInt32(TypeKind kind)
    • bitWidth

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

      public static int bitWidth(TypeKind kind)