/** * Get all annotations of a specific class declared on any level. * * @param annotationClass Class of annotation you want * @param scopes scopes the caller is interested in * @param <T> type of annotation wanted * @return list of annotations in order specified by methodFirst parameter */ @SuppressWarnings("unchecked") public <T extends Annotation> List<T> combineAnnotations(Class<T> annotationClass, AnnotationScope... scopes) { List<T> result = new LinkedList<>(); result.addAll((Collection<? extends T>) annotations(scopes).getOrDefault(annotationClass, CollectionsHelper.listOf())); return result; }
private void validateAnnotations(EndpointConfig epConfig, Errors.Collector collector) { .annotations(EndpointConfig.AnnotationScope.values());
private void validateAnnotations(EndpointConfig epConfig, Errors.Collector collector) { .annotations(EndpointConfig.AnnotationScope.values());