You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hereby propose the addition of the following method:
public <A extends Annotation> A ResourceInfo.getResourceAnnotations(Class<A> annotationClass)
The idea is that this method returns the annotation instances of the given annotationClasswith full respect to the rules found in spec chapter 3.6. This effectively means, this method returns either the super class annotations, or the interface annotations, or the resource class annotations, or the resource method annotations, depending on whether any JAX-RS annotation is found in the particular deeper levels.
The benefit of this method is that there is no need for filters / interceptors to re-implement this algorithm again and again for custom annotations, in case the annotation author wants to apply the same rules as found in chapter 3.6 (hence: the new annotation shall "look and feel" like an official JAX-RS annotation). Implementations could make the already existing algorithm publicly available here, so it is guaranteed that the exact same treatment happens for custom annotations and for official annotations.
The text was updated successfully, but these errors were encountered:
I hereby propose the addition of the following method:
public <A extends Annotation> A ResourceInfo.getResourceAnnotations(Class<A> annotationClass)
The idea is that this method returns the annotation instances of the given
annotationClass
with full respect to the rules found in spec chapter 3.6. This effectively means, this method returns either the super class annotations, or the interface annotations, or the resource class annotations, or the resource method annotations, depending on whether any JAX-RS annotation is found in the particular deeper levels.The benefit of this method is that there is no need for filters / interceptors to re-implement this algorithm again and again for custom annotations, in case the annotation author wants to apply the same rules as found in chapter 3.6 (hence: the new annotation shall "look and feel" like an official JAX-RS annotation). Implementations could make the already existing algorithm publicly available here, so it is guaranteed that the exact same treatment happens for custom annotations and for official annotations.
The text was updated successfully, but these errors were encountered: