Ejemplo n.º 1
0
 private static void findCallbacksOnClasses(Class<?> type, Map<String, Method> result) {
   Class<?> superclass = type.getSuperclass();
   if (superclass != null) {
     findCallbacks(type, result);
     findCallbacksOnClasses(superclass, result);
   }
 }
Ejemplo n.º 2
0
 private static Map<String, Method> getCallbacks(Class<?> type) {
   Map<String, Method> notImplemented = new HashMap<String, Method>();
   findNotImplemented(type, notImplemented);
   Map<String, Method> callbacks = new HashMap<String, Method>();
   findCallbacksOnClasses(type, callbacks);
   findCallbacksOnInterfaces(type, callbacks);
   // Remove callbacks which have a corresponding @NotImplemented method
   callbacks.keySet().removeAll(notImplemented.keySet());
   return callbacks;
 }