public final class TypeHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeHelper.MapEntryTypes |
Modifier and Type | Method and Description |
---|---|
static boolean |
areCompatible(Class<?> target,
Class<?> source) |
static boolean |
areEquals(Type target,
Type clazz) |
static Type |
getComponentTypeOfListOrArray(Type outType) |
static Type[] |
getGenericParameterForClass(Type type,
Class<?> interfaceClass) |
static TypeHelper.MapEntryTypes |
getKeyValueTypeOfMap(Type outType) |
static <T> Map<TypeVariable<?>,Type> |
getTypesMap(Type targetType) |
static boolean |
isArray(Type outType) |
static boolean |
isAssignable(Class<?> class1,
Type from) |
static boolean |
isAssignable(Type type,
Type from) |
static boolean |
isEnum(Type target) |
static boolean |
isInPackage(Type target,
Predicate<String> packagePredicate) |
static boolean |
isJavaLang(Type target) |
static boolean |
isNumber(Type target) |
static boolean |
isPrimitive(Type type) |
static Type |
resolveTypeVariable(Type type,
TypeVariable t) |
static void |
resolveTypeVariables(Type source,
Type[] types) |
static Class<?> |
toBoxedClass(Class<?> target) |
static Class<?> |
toBoxedClass(Type type) |
static <T> Class<T> |
toClass(Type target) |
static Class<?> |
wrap(Class<?> target) |
public static <T> Map<TypeVariable<?>,Type> getTypesMap(Type targetType)
public static boolean isPrimitive(Type type)
public static boolean isNumber(Type target)
public static boolean isArray(Type outType)
public static TypeHelper.MapEntryTypes getKeyValueTypeOfMap(Type outType)
public static boolean isJavaLang(Type target)
public static boolean isEnum(Type target)
public static Type[] getGenericParameterForClass(Type type, Class<?> interfaceClass)
public static Type resolveTypeVariable(Type type, TypeVariable t)
Copyright © 2017. All rights reserved.