List<TypeAnnotationWriteHelper> ( StringBuilder sb, GenericType type, int wildcard, List<TypeAnnotationWriteHelper> typeAnnWriteHelpers ) { return typeAnnWriteHelpers.stream().filter(typeAnnWriteHelper -> { StructTypePathEntry path = typeAnnWriteHelper.getPaths().peek(); if (wildcard != GenericType.WILDCARD_NO && path == null) { typeAnnWriteHelper.writeTo(sb); return false; } if (type.getArrayDim() == typeAnnWriteHelper.getPaths().size() && type.getArrayDim() == typeAnnWriteHelper.arrayPathCount()) { typeAnnWriteHelper.writeTo(sb); return false; } return true; }).collect(Collectors.toList()); }