List<TypeAnnotation> (StructMember md) { return Arrays.stream(StructGeneralAttribute.TYPE_ANNOTATION_ATTRIBUTES) .flatMap(attrKey -> { StructTypeAnnotationAttribute attribute = (StructTypeAnnotationAttribute)md.getAttribute(attrKey); if (attribute == null) { return Stream.empty(); } else { return attribute.getAnnotations().stream(); } }) .collect(Collectors.toList()); }