public final class Reflection extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getClass(Type type)
Get the
Class for a generic type. |
static boolean |
isGetter(Method method)
Is the given method a JavaBeans getter.
|
static boolean |
isListIndex(Method method)
Does the given method represent a
List index. |
static Type |
resultType(Type declaringType,
Type type)
Get the resulting type of invoking a method.
|
static Type |
variableType(ParameterizedType type,
TypeVariable<?> variable)
Get the type for a class type variable.
|
public static Class<?> getClass(Type type)
Class for a generic type.type - Class or ParameterizedTypeIllegalArgumentException - if type doesn't represent a classpublic static boolean isGetter(Method method)
method - method to testtrue if method is a getterpublic static boolean isListIndex(Method method)
List index.method - method to testtrue if list indexpublic static Type resultType(Type declaringType, Type type)
declaringType - declaring class of the methodtype - return type of methodnull if not knownpublic static Type variableType(ParameterizedType type, TypeVariable<?> variable)
type - the owning typevariable - the variablenullCopyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.