public class IntrospectionUtils extends Object
Constructor and Description |
---|
IntrospectionUtils() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getBoxedClass(Class clazz)
returns boxed type (or input type if not a primitive type)
|
static Class<?> |
getTypeClass(Type type)
returns the Class corresponding to a Type, if possible
|
static Class<?> |
getUnboxedClass(Class clazz)
returns unboxed type (or input type if not successful)
|
static boolean |
isMethodInvocationConvertible(Type formal,
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(Type formal,
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.
|
public static Class<?> getBoxedClass(Class clazz)
clazz
- input classpublic static Class<?> getUnboxedClass(Class clazz)
clazz
- input classpublic static Class<?> getTypeClass(Type type)
type
- the input Typepublic static boolean isMethodInvocationConvertible(Type formal, 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(Type formal, 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 declarationCopyright © 2000–2021 The Apache Software Foundation. All rights reserved.