private void injectConfiguration(Field field, ConfigurationObject annotation, Object extension) {
    Object config = getOrCreateConfig(field.getType(), annotation, extension.getClass());
    field.setAccessible(true);
    try {
      field.set(extension, config);
    } catch (IllegalAccessException e) {
      throw new UnreachableCodeError();
    }
  }
Maintains a registry of global Spock extensions and their configuration objects,
which can be used to configure other extensions.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/runtime/GlobalExtensionRegistry.java