code: public static Class[] getAllInterfaces(Object instance) {
          Assert.notNull(instance, "Instance must not be null");
          return getAllInterfacesForClass(instance.getClass());
      }
docs: Return all interfaces that the given instance implements as array,
  including ones implemented by superclasses.
  @param instance the instance to analyze for interfaces
  @return all interfaces that the given instance implements as array