goja-core/src/main/java/goja/core/kits/reflect/ClassKit.java
public static Class<?>[] getAllInterfaces(Object instance) {
        Preconditions.checkNotNull(instance, "Instance must not be null");
        return getAllInterfacesForClass(instance.getClass());
    }
public static Class<?>[] getAllInterfaces(Object instance) {
        Preconditions.checkNotNull(instance, "Instance must not be null");
        return getAllInterfacesForClass(instance.getClass());
    }
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