Initialize the instance.
@param application the application context.
507357
public static synchronized void initialize(Application application) {
		if (sHelper != null) {
			Log.v(TAG, "already initialized");
		}
		sHelper = new TypefaceHelper(application);
	}
828416
def init_app(application):
    
    config = {k: v for k, v in application.config.items() if k in SCHEMA}

    kwargs = {'autorefresh': application.debug}

    kwargs.update((k[11:].lower(), v) for k, v in config.items())

    instance = whitenoise.WhiteNoise(application.wsgi_app, **kwargs)

    instance.add_files(application.static_folder, application.static_url_path)

    if not hasattr(application, 'extensions'):
        application.extensions = {}

    application.extensions['whitenoise'] = instance

    application.wsgi_app = instance
234420
public void init(PageContext pageContext) {

        ServletContext servCtx = pageContext.getServletContext();
        ServletConfig servConfig = pageContext.getServletConfig();

        init(servCtx, servConfig);
    }
1322890
@Override
    public void setApplicationContext(ApplicationContext appContext) throws BeansException {
        if (this.appContext != null) {
            throw new ApplicationContextException("Attempt to reinitialize application context.");
        }
        
        this.appContext = appContext;
    }
1130617
public void addToApplications(final Application application) {
		if (null == getApplications()) {
			setApplications(new java.util.TreeSet<Application>());
		}
		getApplications().add(application);
	}
900283
public void initialize(HttpContext context)
    {
        if (_context==null)
            _context=context;
        else if (_context!=context)
            throw new IllegalStateException("Can't initialize handler for different context");
    }
93114
static void init() {
        contextMap = null;
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        disableAll = managerProps.getBooleanProperty(DISABLE_ALL);
        useStack = !(managerProps.getBooleanProperty(DISABLE_STACK) || disableAll);
        useMap = !(managerProps.getBooleanProperty(DISABLE_MAP) || disableAll);

        contextStack = new Log4jv2ThreadContextStack(useStack);
        contextMap = new Log4jv2ThreadContextMap();
    }
33661
@Override
    public void initializeApplication(ApplicationDefinition oldAppDef,
                                      ApplicationDefinition appDef) {
        checkServiceState();
        Tenant tenant = Tenant.getTenant(appDef);
        m_olap.createApplication(tenant, appDef.getAppName());
    }
377125
public function initialize()
    {
        //The global dispatcher

        //state the application is initialized;
        //register aliases as class mocks such that static calls on mock map to instance calls;
        $this->createAliasMock(
            array_merge(
                $this->aliases, [
                    "route" => 'Budkit\Routing\Router', //this such that we can call Route::add to add router;
                    'controller' => 'Budkit\Routing\Controller',
                    'view' => 'Budkit\View\Display'
                ]
            )
        );

        //Trigger the app initialise event;
        $this->observer->trigger(new Event("app.init", $this));
    }
1261083
public static void initialize(
      Context context,
      @Nullable ImagePipelineConfig imagePipelineConfig,
      @Nullable DraweeConfig draweeConfig) {
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.beginSection("Fresco#initialize");
    }
    if (sIsInitialized) {
      FLog.w(
          TAG,
          "Fresco has already been initialized! `Fresco.initialize(...)` should only be called "
              + "1 single time to avoid memory leaks!");
    } else {
      sIsInitialized = true;
    }
    try {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.beginSection("Fresco.initialize->SoLoader.init");
      }
      SoLoader.init(context, 0);
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
      }
    } catch (IOException e) {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
      }
      throw new RuntimeException("Could not initialize SoLoader", e);
    }
    // we should always use the application context to avoid memory leaks
    context = context.getApplicationContext();
    if (imagePipelineConfig == null) {
      ImagePipelineFactory.initialize(context);
    } else {
      ImagePipelineFactory.initialize(imagePipelineConfig);
    }
    initializeDrawee(context, draweeConfig);
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.endSection();
    }
  }
1341325
def init_app(application):
    
    for code in werkzeug.exceptions.default_exceptions:
        application.register_error_handler(code, handle_http_exception)
1231674
@Override
    public void initializeApplication(ApplicationDefinition oldAppDef,
                                      ApplicationDefinition appDef) {
        checkServiceState();
        verifyApplicationCFs(oldAppDef, appDef);
    }
825796
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		this.applicationContext = applicationContext;

		if (servletContext == null)
			if (applicationContext instanceof WebApplicationContext) {
				servletContext = ((WebApplicationContext) applicationContext).getServletContext();
				if (servletContext == null) {
					System.err.print("this class only fit for Spring Web Application");
					return;
				}

			}

		// start up jdon
		AppContextWrapper acw = new ServletContextWrapper(servletContext);
		ContainerFinder containerFinder = new ContainerFinderImp();
		containerWrapper = containerFinder.findContainer(acw);

	}
584517
@Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        propertyProvider = new PropertyProvider(applicationContext);
        conversionService = DefaultConversionService.getSharedInstance();
        wireParams(this);
        afterInitialized();
    }
589607
public void initialized(AppContextWrapper context) {
		ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME);
		if (cb != null)
			return;
		try {
			synchronized (context) {
				cb = containerBuilderContext.createContainerBuilder(context);
				context.setAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME, cb);
				Debug.logVerbose("[JdonFramework] Initialize the container OK ..");
			}
		} catch (Exception e) {
			Debug.logError("[JdonFramework] initialized error: " + e, module);
		}
	}
1064673
public function initialize(ApplicationInterface $application)
    {

        // load the servlet manager with the session settings configured in web.xml
        /** @var \AppserverIo\Psr\Servlet\ServletContextInterface|\AppserverIo\Psr\Application\ManagerInterface $servletManager */
        $servletManager = $application->search(ServletContextInterface::IDENTIFIER);

        // load the settings, set the default session save path
        $sessionSettings = $this->getSessionSettings();
        $sessionSettings->setSessionSavePath($application->getSessionDir());

        // if we've session parameters defined in our servlet context
        if ($servletManager->hasSessionParameters()) {
            // we want to merge the session settings from the servlet context
            $sessionSettings->mergeServletContext($servletManager);
        }
    }
283472
protected void onInit(Holo config, Bundle savedInstanceState) {
        if (mInited) {
            throw new IllegalStateException("This instance was already inited");
        }
        mInited = true;
        if (config == null) {
            config = createConfig(savedInstanceState);
        }
        if (config == null) {
            config = Holo.defaultConfig();
        }
        onPreInit(config, savedInstanceState);
        if (!config.ignoreApplicationInstanceCheck && !(getApplication() instanceof Application)) {
            boolean throwError = true;
            if (config.allowMockApplicationInstance) {
                try {
                    throwError = !(getApplication() instanceof MockApplication);
                    if (!throwError) {
                        Log.w("HoloEverywhere", "Application instance is MockApplication. Wow. Let's begin tests...");
                    }
                } catch (Exception e) {
                }
            }
            if (throwError) {
                String text = "Application instance isn't HoloEverywhere.\n";
                if (getApplication().getClass() == android.app.Application.class) {
                    text += "Put attr 'android:name=\"org.holoeverywhere.app.Application\"'" +
                            " in <application> tag of AndroidManifest.xml";
                } else {
                    text += "Please sure that you extend " + getApplication().getClass() +
                            " from a org.holoeverywhere.app.Application";
                }
                throw new IllegalStateException(text);
            }
        }
        getLayoutInflater().setFragmentActivity(this);
        if (this instanceof Activity) {
            final Activity activity = (Activity) this;
            ThemeManager.applyTheme(activity, mLastThemeResourceId == 0);
            if (!config.ignoreThemeCheck && ThemeManager.getThemeType(this) == ThemeManager.INVALID) {
                throw new HoloThemeException(activity);
            }
            TypedArray a = obtainStyledAttributes(new int[]{android.R.attr.windowActionBarOverlay, R.attr.windowActionBarOverlay});
            if (a.getBoolean(0, false) || a.getBoolean(1, false)) {
                supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
            }
            a.recycle();
            a = obtainStyledAttributes(new int[]{android.R.attr.windowActionModeOverlay, R.attr.windowActionBarOverlay});
            if (a.getBoolean(0, false) || a.getBoolean(1, false)) {
                supportRequestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
            }
            a.recycle();
        }
        onPostInit(config, savedInstanceState);
        lockAttaching();
    }