Package com.strobel.util
Class TypeUtils
- java.lang.Object
-
- com.strobel.util.TypeUtils
-
public final class TypeUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareEquivalent(Type<?> class1, Type<?> class2)static booleanareEquivalent(TypeList types1, TypeList types2)static booleanareEquivalentWithOrdering(TypeList types1, TypeList types2)static booleanareReferenceAssignable(Type<?> destination, Type<?> source)static intbitWidth(Type<?> type)static intbitWidth(javax.lang.model.type.TypeKind kind)static Type<?>getBoxedType(Type<?> type)static Type<?>getBoxedTypeOrSelf(Type<?> type)static MethodInfogetBoxMethod(Type<?> type)static MethodInfogetCoercionMethod(Type<?> source, Type<?> destination)static java.lang.StringgetInternalName(java.lang.Class<?> clazz)static MethodInfogetUnboxMethod(Type<?> type)static MethodInfogetUnboxMethod(Type<?> boxedType, Type<?> unboxedType)static Type<?>getUnderlyingPrimitive(Type<?> type)static Type<?>getUnderlyingPrimitiveOrSelf(Type<?> type)static booleanhasBuiltInEqualityOperator(Type<?> left, Type<?> right)static booleanhasIdentityPrimitiveOrBoxingConversion(Type<?> source, Type<?> destination)static booleanhasReferenceConversion(Type<?> source, Type<?> destination)static booleanhasReferenceEquality(Type<?> left, Type<?> right)static booleanisArithmetic(Type<?> type)static booleanisAutoUnboxed(Type<?> type)static booleanisBoolean(Type<?> type)static booleanisDoubleWord(Type<?> type)static booleanisDoubleWord(javax.lang.model.type.TypeKind kind)static booleanisImplicitNumericConversion(Type<?> sourceType, Type<?> targetType)static booleanisIntegral(Type<?> type)static booleanisIntegral(javax.lang.model.type.TypeKind kind)static booleanisIntegralOrBoolean(Type<?> type)static booleanisNumeric(Type<?> type)static booleanisNumeric(javax.lang.model.type.TypeKind kind)static booleanisSameOrSubType(Type<?> type, Type<?> subType)static booleanisSingleWord(Type<?> type)static booleanisSingleWord(javax.lang.model.type.TypeKind kind)static booleanisSubWordOrInt32(Type<?> type)static booleanisSubWordOrInt32(javax.lang.model.type.TypeKind kind)static booleanisValidInvocationTargetType(MethodInfo method, Type<?> targetType)
-
-
-
Method Detail
-
isAutoUnboxed
public static boolean isAutoUnboxed(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)
-
areEquivalentWithOrdering
public static boolean areEquivalentWithOrdering(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)
-
hasBuiltInEqualityOperator
public static boolean hasBuiltInEqualityOperator(Type<?> left, Type<?> right)
-
isValidInvocationTargetType
public static boolean isValidInvocationTargetType(MethodInfo method, Type<?> targetType)
-
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)
-
-