@SuppressWarnings("unchecked")
  private void doRunAnnotationDrivenExtensions(NodeInfo<?, ?> node, List<List<Annotation>> annotations) {
    for (List<Annotation> ann : annotations) {
      IAnnotationDrivenExtension extension = getAnnotationDrivenExtension(ann.get(0));
      if (extension == null) continue;
      if (node instanceof SpecInfo) {
        extension.visitSpecAnnotations(ann, (SpecInfo) node);
      } else if (node instanceof MethodInfo) {
        MethodInfo method = (MethodInfo) node;
        if (method.getKind() == MethodKind.FEATURE) {
          extension.visitFeatureAnnotations(ann, method.getFeature());
        } else {
          extension.visitFixtureAnnotations(ann, method);
        }
      } else {
        extension.visitFieldAnnotations(ann, (FieldInfo) node);
      }
    }
  }
Runs global and local extensions for a spec.
spock-core/src/main/java/org/spockframework/runtime/ExtensionRunner.java