code: private static Class<?> findInterface(Class<?> target)
     {
        if (target == null)
        {
           return null;
        }
        Class<?>[] interfaces = target.getInterfaces();
        if (interfaces != null)
        {
           for (Class<?> c : TARGET_INTERFACES)
           {
              for (Class<?> i : interfaces)
              {
                 if (c.getName().equals(i.getName()))
                 {
                    return c;
                 }
              }
           }
        }
        return findInterface(target.getSuperclass());
     }
docs: Find the monitored interface from the target {@link Class}
  @param target the target {@link Class}
  @return the monitored interface, <code>null</code> otherwise