mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add MethodReflect
This commit is contained in:
@@ -180,14 +180,14 @@ public class MethodUtilTest {
|
||||
|
||||
@Test
|
||||
public void getPublicMethod() {
|
||||
final Method superPublicMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, "publicMethod");
|
||||
final Method superPublicMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, false, "publicMethod");
|
||||
Assertions.assertNotNull(superPublicMethod);
|
||||
final Method superPrivateMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, "privateMethod");
|
||||
final Method superPrivateMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, false, "privateMethod");
|
||||
Assertions.assertNull(superPrivateMethod);
|
||||
|
||||
final Method publicMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, "publicSubMethod");
|
||||
final Method publicMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, false, "publicSubMethod");
|
||||
Assertions.assertNotNull(publicMethod);
|
||||
final Method privateMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, "privateSubMethod");
|
||||
final Method privateMethod = MethodUtil.getPublicMethod(ReflectUtilTest.TestSubClass.class, false, "privateSubMethod");
|
||||
Assertions.assertNull(privateMethod);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user