contextprovider/annotationprocessor/src/main/java/io/tracee/contextlogger/contextprovider/api/TraceeContextLoggerAbstractMethodAnnotationProcessor.java
protected boolean isParentAnnotatedWithTraceeContextProvider(final Element element) {

        Element parentElement = element.getEnclosingElement();
        if (parentElement == null || parentElement.getKind() != ElementKind.CLASS
                || !isTypeAnnotatedWithTraceeContextProvider((TypeElement) parentElement)) {

            error(element, "Enclosing type of method %s annotated with annotation %s is not annotated with annotation %s.", element.getSimpleName(),
                    Flatten.class.getSimpleName(), TraceeContextProvider.class.getSimpleName());
            return false;

        }

        return true;
    }
protected boolean isParentAnnotatedWithTraceeContextProvider(final Element element) {

        Element parentElement = element.getEnclosingElement();
        if (parentElement == null || parentElement.getKind() != ElementKind.CLASS
                || !isTypeAnnotatedWithTraceeContextProvider((TypeElement) parentElement)) {

            error(element, "Enclosing type of method %s annotated with annotation %s is not annotated with annotation %s.", element.getSimpleName(),
                    Flatten.class.getSimpleName(), TraceeContextProvider.class.getSimpleName());
            return false;

        }

        return true;
    }
Checks if passed elements parent is type element and annotated with {@link TraceeContextProvider}.

@param element
@return