public abstract class MethodUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
MethodUtils.DeclaredMethodIterator
DeclaredMethodIterator
|
static class |
MethodUtils.MethodIterator
MethodIterator
|
| 构造器和说明 |
|---|
MethodUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Method> |
getDeclaredMethods(Class<?> cls,
MethodFilter methodFilter) |
static List<Method> |
getDeclaredMethodsWithAnnotation(Class<?> cls,
Class<? extends Annotation> annotationClass) |
static Method |
getMethod(Class<?> type,
String methodName,
Class<?>... parameterTypes) |
static Method |
getMethodIfAbsent(Class<?> type,
String methodName,
Class<?>... parameterTypes) |
static List<Method> |
getMethods(Class<?> cls,
MethodFilter methodFilter) |
static List<Method> |
getMethodsWithAnnotation(Class<?> cls,
Class<? extends Annotation> annotationClass) |
static Object |
invokeMethod(Object object,
Method method,
Object... arguments) |
static Object |
invokeMethod(Object object,
String methodName,
Class<?>[] parameterTypes,
Object... arguments) |
static Object |
invokeMethod(Object object,
String methodName,
Object... arguments) |
static Object[] |
invokeMethodsWithAnnotation(Object object,
Class<? extends Annotation> annotationClass,
Object... arguments) |
static Object |
invokeMethodWithAnnotation(Object object,
Class<? extends Annotation> annotationClass,
Object... arguments) |
static Object |
invokeStaticMethod(Class<?> type,
String methodName,
Class<?>[] parameterTypes,
Object... arguments) |
static Object |
invokeStaticMethod(Class<?> type,
String methodName,
Object... arguments) |
static Object |
invokeStaticMethod(Method method,
Object... arguments) |
private static Method |
searchMethod(Class<?> type,
Method[] methods,
String methodName,
Class<?>... parameterTypes) |
public static Object invokeMethod(Object object, String methodName, Object... arguments)
public static Object invokeMethod(Object object, String methodName, Class<?>[] parameterTypes, Object... arguments)
public static Object invokeStaticMethod(Class<?> type, String methodName, Object... arguments)
public static Object invokeStaticMethod(Class<?> type, String methodName, Class<?>[] parameterTypes, Object... arguments)
public static Method getMethodIfAbsent(Class<?> type, String methodName, Class<?>... parameterTypes)
public static Method getMethod(Class<?> type, String methodName, Class<?>... parameterTypes)
private static Method searchMethod(Class<?> type, Method[] methods, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException
public static List<Method> getDeclaredMethodsWithAnnotation(Class<?> cls, Class<? extends Annotation> annotationClass)
public static List<Method> getDeclaredMethods(Class<?> cls, MethodFilter methodFilter)
public static List<Method> getMethods(Class<?> cls, MethodFilter methodFilter)
public static List<Method> getMethodsWithAnnotation(Class<?> cls, Class<? extends Annotation> annotationClass)
public static Object invokeMethodWithAnnotation(Object object, Class<? extends Annotation> annotationClass, Object... arguments)
public static Object[] invokeMethodsWithAnnotation(Object object, Class<? extends Annotation> annotationClass, Object... arguments)
Copyright © 2020. All rights reserved.