void (Class<?> cls) { Stream.of(cls.getMethods()) .filter(method ->//my comment to keep { Class<?> c = method.getReturnType(); return Collection.class.isAssignableFrom(c) || Map.class.isAssignableFrom(c); }) .collect(Collectors.<Method>toList()); }