Initialize with an explicit instance

@param instance the explicit instance
773614
public static void initialize(SingletonProvider instance) {
        synchronized (SingletonProvider.class) {
            if (INSTANCE == null) {
                INSTANCE = instance;
            } else {
                throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
            }
        }
    }
376399
public void assignInstance(XEvent event, String instance) {
		if (instance != null && instance.trim().length() > 0) {
			XAttributeLiteral attr = (XAttributeLiteral) ATTR_INSTANCE.clone();
			attr.setValue(instance);
			event.getAttributes().put(KEY_INSTANCE, attr);
		}
	}
780377
public static void initialize()
    {
        if (InfinispanCache.get().exists(AccessType.UUIDCACHE)) {
            InfinispanCache.get().<UUID, AccessType>getCache(AccessType.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, AccessType>getCache(AccessType.UUIDCACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        if (InfinispanCache.get().exists(AccessType.IDCACHE)) {
            InfinispanCache.get().<Long, AccessType>getCache(AccessType.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, AccessType>getCache(AccessType.IDCACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        if (InfinispanCache.get().exists(AccessType.NAMECACHE)) {
            InfinispanCache.get().<String, AccessType>getCache(AccessType.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, AccessType>getCache(AccessType.NAMECACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        AccessCache.initialize();
    }
1227931
@Override
    public void activate(final T instance, final Object key) throws DempsyException {
        wrap(() -> activationMethod.invoke(instance, key));
    }
697016
public static void initialize()
    {
        if (InfinispanCache.get().exists(Association.IDCACHE)) {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE)
                            .addListener(new CacheLogListener(Association.LOG));
        }
    }
1173920
@Override
    public void initialize(BeanContext context) {
        Resource resource = ConsoleUtil.getConsoleResource(context);
        initialize(context, ResourceHandle.use(resource));
    }
837519
protected void setAttributes(FaceletContext ctx, Object instance) {
        if (instance != null) {
            Class type = instance.getClass();
            if (mapper == null || !this.lastType.equals(type)) {
                this.lastType = type;
                this.mapper = this.createMetaRuleset(type).finish();
            }
            this.mapper.applyMetadata(ctx, instance);
        }
    }
688571
public static void setInstanceProvider(SpringInstanceProvider provider) {
		if(instanceProvider != null)return;
		instanceProvider = provider;
		initialized.set(true);
	}
74625
protected static void removeInstance( Object instance ) {
      Set set = getCycleSet();
      set.remove( instance );
      if(set.size() == 0) {
          cycleSet.remove();
      }
   }
1105866
private static void initialize() throws AsyncException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "initialize");
        }

        capabilities = aio_init(MAX_IDENTIFIERS, AsyncException.class);
        aioInitialized = AIO_INITIALIZED;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "initialize: " + capabilities);
        }
    }
1236071
public function store($instance, string $name = null): void
    {
        if ($name === null) {
            $name = get_class($instance);
        }

        $name = $this->getDefinitiveName($name);

        $this->instances[$name] = $instance;
    }
87898
public static void setInstance(Application application) {
		if (application == Application.instance) {
			return;
		}
		if (Application.instance != null) {
			throw new IllegalStateException("Application cannot be changed");
		}		
		if (application == null) {
			throw new IllegalArgumentException("Application cannot be null");
		}
		Application.instance = application;
	}
813078
public static function setInstance($instance = "") {
		
		if (empty($instance) || !method_exists($instance,'addGlobal')) {
			Console::writeError("please set the instance");
		}
		
		self::$instance = $instance;

	}
183161
public void setInstanceTypes(java.util.Collection<String> instanceTypes) {
        if (instanceTypes == null) {
            this.instanceTypes = null;
            return;
        }

        this.instanceTypes = new com.amazonaws.internal.SdkInternalList<String>(instanceTypes);
    }
846576
private synchronized void initialize() {
        Iterator types = EntityTypesLocator.getEntityTypes().getAllEntityTypes();
        String factoryName = null;

        while (types.hasNext()) {
            Class type = (Class) types.next();
            if (type != Object.class) {
                String factoryKey =
                        "org.apereo.portal.services.EntityNameFinderService.NameFinderFactory.implementation_"
                                + type.getName();
                try {
                    factoryName = PropertiesManager.getProperty(factoryKey);
                } catch (Exception runtime) {
                    String dMsg =
                            "EntityNameFinderService.initialize(): "
                                    + "could not find property for "
                                    + type.getName()
                                    + " factory.";
                    log.debug(dMsg);
                }
                if (factoryName != null) {
                    try {
                        IEntityNameFinderFactory factory =
                                (IEntityNameFinderFactory) Class.forName(factoryName).newInstance();
                        getNameFinders().put(type, factory.newFinder());
                    } catch (Exception e) {
                        String eMsg =
                                "EntityNameFinderService.initialize(): "
                                        + "Could not instantiate finder for "
                                        + type.getName()
                                        + ": ";
                        log.error(eMsg, e);
                    }
                }
            }
        }
        setInitialized(true);
    }
583593
public static void populate(Object instance, Map<String, Object> values) {
		try {
			BeanUtilsBean beanUtilBean = new BeanUtilsBean();
			for (String key : values.keySet()) {
				Object value = values.get(key);
				beanUtilBean.setProperty(instance, key, value);
			}
		} catch (Exception e) {
			JKExceptionUtil.handle(e);
		}
	}
639806
public static void setInstance(Cache cache) throws GuildWars2Exception {
		if (instance != null)
			throw new GuildWars2Exception(ErrorCode.Other, "Instance already initialized");
		instance = new GuildWars2(cache);
	}