Example usage for Java org.apache.commons.lang3.reflect TypeUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | containsTypeVariables(final Type type) Learn, recursively, whether any of the type parameters associated with type are bound to variables. |
Map | determineTypeArguments(final Class> cls, final ParameterizedType superType) Tries to determine the type arguments of a class/interface based on a super parameterized type's type arguments. |
boolean | equals(final Type t1, final Type t2) Check equality of types. |
boolean | equals(final ParameterizedType p, final Type t) Learn whether t equals p . |
boolean | equals(final GenericArrayType a, final Type t) Learn whether t equals a . |
boolean | equals(final WildcardType w, final Type t) Learn whether t equals w . |
boolean | equals(final Type[] t1, final Type[] t2) Learn whether t1 equals t2 . |
Type | getArrayComponentType(final Type type) Get the array component type of type . |
Type[] | getImplicitBounds(final TypeVariable> typeVariable) Returns an array containing the sole type of Object if TypeVariable#getBounds() returns an empty array. |
Type[] | getImplicitLowerBounds(final WildcardType wildcardType) Returns an array containing a single value of null if WildcardType#getLowerBounds() returns an empty array. |
Type[] | getImplicitUpperBounds(final WildcardType wildcardType) Returns an array containing the sole value of Object if WildcardType#getUpperBounds() returns an empty array. |
Class> | getRawType(final Type type, final Type assigningType) Get the raw type of a Java type, given its context. |
Map | getTypeArguments(final Type type, final Class> toClass) Gets the type arguments of a class/interface based on a subtype. |
Map | getTypeArguments(final ParameterizedType type) Retrieves all the type arguments for this parameterized type including owner hierarchy arguments such as Outer |
boolean | isArrayType(final Type type) Learn whether the specified type denotes an array type. |
boolean | isAssignable(final Type type, final Type toType) Checks if the subject type may be implicitly cast to the target type following the Java generics rules. |
boolean | isAssignable(final Type type, final Class> toClass) Checks if the subject type may be implicitly cast to the target class following the Java generics rules. |
boolean | isInstance(final Object value, final Type type) Checks if the given value can be assigned to the target type following the Java generics rules. |
ParameterizedType | parameterize(final Class> raw, final Type... typeArguments) Create a parameterized type instance. |
ParameterizedType | parameterize(final Class> raw, final Map Create a parameterized type instance. |
ParameterizedType | parameterizeWithOwner(final Type owner, final Class> raw, final Type... typeArguments) Create a parameterized type instance. |
ParameterizedType | parameterizeWithOwner(final Type owner, final Class> raw, final Map Create a parameterized type instance. |
String | toLongString(final TypeVariable> var) Format a TypeVariable including its GenericDeclaration . |
String | toString(final Type type) Present a given type as a Java-esque String. |
Type | unrollVariables(Map Get a type representing type with variable assignments "unrolled." |
Typed | wrap(final Type type) Wrap the specified Type in a Typed wrapper. |
Typed | wrap(final Class Wrap the specified Class in a Typed wrapper. |