private boolean isSlingModel()

in src/main/java/org/apache/sling/models/annotations/apt/ValidatingAnnotationProcessor.java [101:107]


    private boolean isSlingModel(Element annotatedElement) {
        Element enclosingElement = annotatedElement.getEnclosingElement();

        // skip any occurrence where the enclosing element is not a class or interface, should not happen
        return (enclosingElement.getKind() == ElementKind.CLASS || enclosingElement.getKind() == ElementKind.INTERFACE)
                && enclosingElement.getAnnotation(Model.class) != null;
    }