public class IntrospectionUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> |
boxingMap
boxing helper maps for standard types
|
(package private) static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> |
unboxingMap
boxing helper maps for standard types
|
Constructor and Description |
---|
IntrospectionUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
getBoxedClass(java.lang.Class clazz)
returns boxed type (or input type if not a primitive type)
|
static java.lang.Class<?> |
getTypeClass(java.lang.reflect.Type type)
returns the Class corresponding to a Type, if possible
|
static java.lang.Class<?> |
getUnboxedClass(java.lang.Class clazz)
returns unboxed type (or input type if not successful)
|
static boolean |
isMethodInvocationConvertible(java.lang.reflect.Type formal,
java.lang.Class<?> actual,
boolean possibleVarArg)
Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, treating object types of primitive
types as if they were primitive types (that is, a Boolean actual
parameter type matches boolean primitive formal type).
|
static boolean |
isStrictMethodInvocationConvertible(java.lang.reflect.Type formal,
java.lang.Class<?> actual,
boolean possibleVarArg)
Determines whether a type represented by a class object is
convertible to another type represented by a class object using a
method invocation conversion, without matching object and primitive
types.
|
static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> boxingMap
static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> unboxingMap
public static java.lang.Class<?> getBoxedClass(java.lang.Class clazz)
clazz
- input classpublic static java.lang.Class<?> getUnboxedClass(java.lang.Class clazz)
clazz
- input classpublic static java.lang.Class<?> getTypeClass(java.lang.reflect.Type type)
type
- the input Typepublic static boolean isMethodInvocationConvertible(java.lang.reflect.Type formal, java.lang.Class<?> actual, boolean possibleVarArg)
formal
- the formal parameter type to which the actual
parameter type should be convertibleactual
- the actual parameter type.possibleVarArg
- whether or not we're dealing with the last parameter
in the method declarationpublic static boolean isStrictMethodInvocationConvertible(java.lang.reflect.Type formal, java.lang.Class<?> actual, boolean possibleVarArg)
formal
- the formal parameter type to which the actual
parameter type should be convertibleactual
- the actual parameter type.possibleVarArg
- whether or not we're dealing with the last parameter
in the method declaration