private MethodInfo filterAnnotationsFor(MethodInfo method) { return new MethodInfo( method.getClassName(), method.getMethodName(), method.getAnnotationInfo() .stream() .filter(this::isVisibleAnnotation) .sorted() .collect(toList()), method.getModifiers(), method.getTypeDescriptorStr(), method.getTypeSignatureStr(), method.getParameterNames(), method.getParameterModifiers(), method.getParameterAnnotationInfo() ); }