hibernate / hibernate-models

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

Create Function counterparts to some of the iteration methods #26

Closed sebersole closed 4 months ago

sebersole commented 4 months ago

Create Function counterparts to some of the iteration methods. E.g.

interface AnnotationTarget {
    ...

    @FunctionalInterface
    interface AnnotationUsageProcessor<T> {
        T process(AnnotationUsage<? extends Annotation> annotationUsage);
    }

    default <T, A extends Annotation> T fromAnnotations(
            Class<A> annotationType,
            AnnotationUsageProcessor<T> handler);
}