goja-core/src/main/java/goja/core/kits/reflect/ClassKit.java
public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {
        Preconditions.checkNotNull(instance, "Instance must not be null");
        return getAllInterfacesForClassAsSet(instance.getClass());
    }
public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {
        Preconditions.checkNotNull(instance, "Instance must not be null");
        return getAllInterfacesForClassAsSet(instance.getClass());
    }
Return all interfaces that the given instance implements as Set,
including ones implemented by superclasses.

@param instance the instance to analyze for interfaces
@return all interfaces that the given instance implements as Set