예제 #1
0
 public void testGetAccessiblePublicMethodFromDescription() throws Exception {
   assertSame(
       MutableObject.class,
       MethodUtils.getAccessibleMethod(
               MutableObject.class, "getValue", ArrayUtils.EMPTY_CLASS_ARRAY)
           .getDeclaringClass());
 }
예제 #2
0
 public void testGetAccessibleInterfaceMethodFromDescription() throws Exception {
   Class<?>[][] p = {ArrayUtils.EMPTY_CLASS_ARRAY, null};
   for (int i = 0; i < p.length; i++) {
     Method accessibleMethod =
         MethodUtils.getAccessibleMethod(TestMutable.class, "getValue", p[i]);
     assertSame(Mutable.class, accessibleMethod.getDeclaringClass());
   }
 }