public List<Annotation> getAnnotations(String name) {

        List<Annotation> results = new ArrayList<>();
        for (Annotation annotation : annotations) {
            if (annotation.getName().equalsIgnoreCase(name)) {
                results.add(annotation);
            }
        }
        return results;
    }
Annotation for siddhi functions and extensions
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/annotation/Annotation.java