|
||||||||||
| 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 java.lang.reflect.GenericArrayType |
genericArrayType(java.lang.reflect.Type componentType)
Creates a generic array type for the specified component type. |
|
static java.lang.reflect.Type |
getArrayType(java.lang.reflect.Type componentType)
|
|
static java.lang.reflect.Type |
getComponentType(java.lang.reflect.Type type)
|
|
static java.lang.reflect.Type |
getErasedType(java.lang.reflect.Type type)
Gets the erased type of the specified type. |
|
static java.lang.reflect.Type[] |
getResolvedInterfaces(java.lang.reflect.Type type)
|
|
static
|
getValidatorsTypes(java.util.List<java.lang.Class<? extends javax.validation.ConstraintValidator<T,?>>> validators)
|
|
static boolean |
isArray(java.lang.reflect.Type type)
|
|
static boolean |
isAssignable(java.lang.reflect.Type supertype,
java.lang.reflect.Type type)
|
|
static boolean |
isInstance(java.lang.reflect.Type type,
java.lang.Object object)
|
|
static java.lang.reflect.ParameterizedType |
parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.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(java.lang.reflect.Type supertype,
java.lang.reflect.Type type)
public static java.lang.reflect.Type getErasedType(java.lang.reflect.Type type)
type - the type to perform erasure on
public static boolean isArray(java.lang.reflect.Type type)
public static java.lang.reflect.Type getComponentType(java.lang.reflect.Type type)
public static java.lang.reflect.Type getArrayType(java.lang.reflect.Type componentType)
public static java.lang.reflect.GenericArrayType genericArrayType(java.lang.reflect.Type componentType)
componentType - the component type
public static boolean isInstance(java.lang.reflect.Type type,
java.lang.Object object)
public static java.lang.reflect.ParameterizedType parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.Type... actualTypeArguments)
rawType - the raw typeactualTypeArguments - the actual type arguments
java.lang.reflect.MalformedParameterizedTypeException - if the number of actual type arguments differs from those defined on the raw typepublic static java.lang.reflect.Type[] getResolvedInterfaces(java.lang.reflect.Type type)
public static <T extends java.lang.annotation.Annotation> java.util.Map<java.lang.reflect.Type,java.lang.Class<? extends javax.validation.ConstraintValidator<?,?>>> getValidatorsTypes(java.util.List<java.lang.Class<? extends javax.validation.ConstraintValidator<T,?>>> 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 | |||||||||