|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.validator.internal.util.TypeHelper
public final class TypeHelper
Provides utility methods for working with types.
| Method Summary | ||
|---|---|---|
static GenericArrayType |
genericArrayType(Type componentType)
Creates a generic array type for the specified component type. |
|
static Type |
getArrayType(Type componentType)
|
|
static Type |
getComponentType(Type type)
|
|
static Type |
getErasedType(Type type)
Gets the erased type of the specified type. |
|
static Type[] |
getResolvedInterfaces(Type type)
|
|
static
|
getValidatorsTypes(Class<A> annotationType,
List<Class<? extends ConstraintValidator<A,?>>> validators)
|
|
static boolean |
isArray(Type type)
|
|
static boolean |
isAssignable(Type supertype,
Type type)
|
|
static boolean |
isInstance(Type type,
Object object)
|
|
static ParameterizedType |
parameterizedType(Class<?> rawType,
Type... actualTypeArguments)
Creates a parameterized type for the specified raw type and actual type arguments. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isAssignable(Type supertype,
Type type)
public static Type getErasedType(Type type)
type - the type to perform erasure on
public static boolean isArray(Type type)
public static Type getComponentType(Type type)
public static Type getArrayType(Type componentType)
public static GenericArrayType genericArrayType(Type componentType)
componentType - the component type
public static boolean isInstance(Type type,
Object object)
public static ParameterizedType parameterizedType(Class<?> rawType,
Type... actualTypeArguments)
rawType - the raw typeactualTypeArguments - the actual type arguments
MalformedParameterizedTypeException - if the number of actual type arguments differs from those defined on the raw typepublic static Type[] getResolvedInterfaces(Type type)
public static <A extends Annotation> Map<Type,Class<? extends ConstraintValidator<A,?>>> getValidatorsTypes(Class<A> annotationType,
List<Class<? extends ConstraintValidator<A,?>>> validators)
validators - List of constraint validator classes (for a given constraint).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||