public class MethodUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> E |
invoke(Method method,
Object instance,
Object... args) |
static boolean |
isEqualsMethod(Method method)
Determine whether the given method is an "equals" method.
|
static boolean |
isHashCodeMethod(Method method)
Determine whether the given method is a "hashCode" method.
|
static boolean |
isObjectMethod(Method method)
判断指定方法是否是
Object的方法, Copy from Spring#ReflectionUtils |
static boolean |
isOverriddenMethod(Method method,
Class<?> baseClass)
判断指定的方法是否是指定类或者接口的重写方法
|
static boolean |
isSameSignature(Method m1,
Method m2)
判断两个方法的签名是否相同
|
static boolean |
isToStringMethod(Method method)
Determine whether the given method is a "toString" method.
|
public static boolean isObjectMethod(Method method)
Object的方法, Copy from Spring#ReflectionUtilsmethod - 方法truepublic static boolean isOverriddenMethod(Method method, Class<?> baseClass)
method - 方法baseClass - 基类或者接口truepublic static boolean isSameSignature(Method m1, Method m2)
m1 - 方法1m2 - 方法2truepublic static boolean isEqualsMethod(Method method)
method - methdObject.equals(Object)public static boolean isHashCodeMethod(Method method)
method - methodObject.hashCode()public static boolean isToStringMethod(Method method)
method - methodObject.toString()Copyright © 2020. All rights reserved.