public static ServerSetup instance()

in src/main/java/org/apache/sling/testing/serversetup/ServerSetupSingleton.java [37:54]


    public static ServerSetup instance(Properties config) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        if(instance == null) {
            synchronized (ServerSetupSingleton.class) {
                if(instance == null) {
                    final String className = config.getProperty(CLASS_NAME_PROP);
                    if(className == null) {
                        throw new IllegalArgumentException("Missing config property: " + CLASS_NAME_PROP);
                    }
                    instance = (ServerSetup)
                        ServerSetupSingleton.class.getClassLoader()
                        .loadClass(className)
                        .newInstance();
                    instance.setConfig(config);
                }
            }
        }
        return instance;
    }