in src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java [197:214]
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 = resolveResource(resourceSuperType);
if (intermediateType != null) {
if (intermediateType.getPath().equals(parent.getPath())) {
return true;
}
resourceSuperType = intermediateType.getResourceSuperType();
} else {
return false;
}
}
return false;
}