Set<Annotation> (final Class<?> klass, final Collection<Class<? extends Annotation>> wanted) { return wanted.stream() .filter(collectAnnotationTypes(klass)::contains) .map(ann -> klass.getAnnotation(ann)) .collect(Collectors.toSet()); }