private String getMatchingSuperClass(Element elementToValidate, String[] superClassNames) {

        TypeMirror superType = ((TypeElement) elementToValidate).getSuperclass();
        String superClass = null;
        // Looping the inheritance hierarchy to check if the element inherits at least one of the super
        // classes specified.
        while (!"none".equals(superType.toString())) {
            Element superTypeElement = ((DeclaredType) superType).asElement();

            if (Arrays.asList(superClassNames).contains(superTypeElement.toString())) {
                superClass = superTypeElement.toString();
                break;
            }

            superType = ((TypeElement) superTypeElement).getSuperclass();
        }
        return superClass;
    }
The annotation processor for siddhi extension annotation validation. This will validate @Extension, @Parameter,
ReturnAttribute, @SystemParameter and @Example annotation and parameters. Note that each of the validation
processor select using the super class where the extension extends or implement.
<p>
annotationsClasses : holds all the supported annotations class.
messager : the messager used to report errors, warnings, and other notices when validation error throws..
modules/siddhi-annotations/src/main/java/io/siddhi/annotation/processor/SiddhiAnnotationProcessor.java