@SuppressWarnings("unchecked")
    private static Class<ConfigInstance.Builder> builderClass(ConfigKey<ConfigInstance> key) {
        Class<?> configClass = key.getConfigClass();
        if (configClass != null) {
            Class<?>[] nestedClasses = configClass.getClasses();
            for (Class<?> clazz : nestedClasses) {
                if (clazz.getName().equals(key.getConfigClass().getName() + "$Builder")) {
                    return (Class<ConfigInstance.Builder>) clazz;
                }
            }
        }
        throw new RuntimeException("Builder class for " + (configClass == null ? null : configClass.getName()) + " could not be located");
    }
@author Tony Vaagenes
@author gjoranv
@author ollivir
standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java