Search in sources :

Example 1 with WithAnnotations

use of jakarta.enterprise.inject.spi.WithAnnotations in project core by weld.

the class ExtensionObserverMethodImpl method initRequiredTypeAnnotations.

protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) {
    EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer);
    WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class);
    if (annotation != null) {
        return ImmutableSet.<Class<? extends Annotation>>of(annotation.value());
    }
    return Collections.emptySet();
}
Also used : WithAnnotations(jakarta.enterprise.inject.spi.WithAnnotations) Annotation(java.lang.annotation.Annotation)

Aggregations

WithAnnotations (jakarta.enterprise.inject.spi.WithAnnotations)1 Annotation (java.lang.annotation.Annotation)1