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