@NotNull
  private Object getOrCreateConfig(Class<?> configType, ConfigurationObject annotation, Class<?> extensionClass) {
    Object config;
    if (IGlobalExtension.class.isAssignableFrom(extensionClass)) {
      config = getOrCreateConfiguration(configType, annotation);
    } else { // local extensions may not initialize configurations
      config = getConfigurationByType(configType);
      if (config == null) {
        throw new ExtensionException("Extension '%s' references unknown configuration class '%s'")
          .withArgs(extensionClass, configType);
      }
    }
    return config;
  }
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