hibernate / hibernate-models

An abstraction over "reflection" and annotations
Apache License 2.0
2 stars 5 forks source link

Access to annotation usages with a particular meta-annotation #14

Closed sebersole closed 5 months ago

sebersole commented 5 months ago

Corollary to org.hibernate.boot.model.internal.HCANNHelper#findContainingAnnotations -

interface AnnotationTarget {
    ...

    /**
     * Returns all annotations on this target where the annotation class is annotated with `metaAnnotationType`.
     */
    List<AnnotationUsage<?>> getMetaAnnotated(Class<? extends Annotation> metaAnnotationType);
}

Related with https://github.com/hibernate/hibernate-models/issues/13