private Stream<? extends AnnotationNode> handleSingleContainedAnnotation(AnnotationNode container,
                                                                           Stream<? extends AnnotationNode> result,
                                                                           Expression value) {
    if (notRepeatedAnnotation(value, container)) {
      return result;
    }

    AnnotationNode annotationNode = asInstance(
      asInstance(value, AnnotationConstantExpression.class).getValue(),
      AnnotationNode.class);
    // supply annotation twice in case there is only the container annotation
    // with one contained annotation and no annotation besides it
    // in that case we also need the RepeatedExtensionAnnotations at runtime
    // to unwrap the container
    return Stream.concat(result, Stream.of(annotationNode, annotationNode));
  }
Puts all spec information required at runtime into annotations
attached to class members.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/SpecAnnotator.java