public class MemberFinder
extends java.lang.Object
| Constructor and Description |
|---|
MemberFinder() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.reflect.Field |
findField(java.lang.Class<?> declaring,
java.lang.String name)
Find if one field belongs a class
|
static java.lang.reflect.Method |
findMethod(java.lang.Class<?> declaring,
java.lang.String name)
Find if one method belongs a class
|
static java.lang.reflect.Method |
getMethod(java.lang.Class<?> interfaceClass)
Obtains the main method of the functional interface
|
static java.lang.reflect.Type[] |
resolveGenericParameters(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
Resolves the generic parameter types of the method
|
static java.lang.Class<?>[] |
resolveGenericParametersToClass(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
Resolves the genericity of the method to Class types
|
static java.lang.reflect.Type |
resolveGenericReturn(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
Resolves the generic return type of the method
|
public static java.lang.reflect.Method getMethod(java.lang.Class<?> interfaceClass)
interfaceClass - Functional interfacepublic static java.lang.reflect.Method findMethod(java.lang.Class<?> declaring,
java.lang.String name)
throws StructuralIntercessionException,
java.lang.NoSuchMethodException
declaring - The class ownername - The name of the methodStructuralIntercessionException - There are more than one methodjava.lang.NoSuchMethodException - If the method doesn't existpublic static java.lang.reflect.Field findField(java.lang.Class<?> declaring,
java.lang.String name)
throws java.lang.NoSuchFieldException
declaring - The class ownername - The name of the fieldjava.lang.NoSuchFieldException - If the field doesn't existpublic static java.lang.reflect.Type resolveGenericReturn(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
m - Generic methodparametrizationClasses - Parametrization classespublic static java.lang.reflect.Type[] resolveGenericParameters(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
m - Generic methodparametrizationClasses - Parametrization classespublic static java.lang.Class<?>[] resolveGenericParametersToClass(java.lang.reflect.Method m,
java.lang.Class<?>[] parametrizationClasses)
m - Generic methodparametrizationClasses - Parametrization classes