private boolean isResourceType()

in src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java [168:185]


    private boolean isResourceType(@NotNull Resource resource, @NotNull Resource parent) {
        if (parent.getPath().equals(resource.getPath())) {
            return true;
        }
        String resourceSuperType = resource.getResourceSuperType();
        while (resourceSuperType != null) {
            Resource intermediateType = scriptingResourceResolver.getResource(resourceSuperType);
            if (intermediateType != null) {
                if (intermediateType.getPath().equals(parent.getPath())) {
                    return true;
                }
                resourceSuperType = intermediateType.getResourceSuperType();
            } else {
                return false;
            }
        }
        return false;
    }