Adds a class to run on app startup. Class names are stored as a string separated by commas.
352052
public SelendroidCapabilities addBootstrapClass(String className) {
    String currentClassNames = getBootstrapClassNames();
    if (currentClassNames == null || currentClassNames.isEmpty()) {
      setCapability(BOOTSTRAP_CLASS_NAMES, className);
    } else {
      setCapability(BOOTSTRAP_CLASS_NAMES, currentClassNames + "," + className);
    }
    return this;
  }
444754
public static synchronized void init ()
    {
        // only initialize ourselves once
        if (_keys != null) {
            return;
        } else {
            _keys = new ArrayList<Class<?>>();
            _values = new ArrayList<String>();
        }

        // first try loading the properties file without a leading slash
        ClassLoader cld = ExceptionMap.class.getClassLoader();
        InputStream config = ConfigUtil.getStream(PROPS_NAME, cld);
        if (config == null) {
            log.warning("Unable to load " + PROPS_NAME + " from CLASSPATH.");

        } else {
            // otherwise process ye old config file.
            try {
                // we'll do some serious jiggery pokery to leverage the parsing
                // implementation provided by java.util.Properties. god bless
                // method overloading
                final ArrayList<String> classes = new ArrayList<String>();
                Properties loader = new Properties() {
                    @Override public Object put (Object key, Object value) {
                        classes.add((String)key);
                        _values.add((String)value);
                        return key;
                    }
                };
                loader.load(config);

                // now cruise through and resolve the exceptions named as
                // keys and throw out any that don't appear to exist
                for (int i = 0; i < classes.size(); i++) {
                    String exclass = classes.get(i);
                    try {
                        Class<?> cl = Class.forName(exclass);
                        // replace the string with the class object
                        _keys.add(cl);

                    } catch (Throwable t) {
                        log.warning("Unable to resolve exception class.", "class", exclass,
                                    "error", t);
                        _values.remove(i);
                        i--; // back on up a notch
                    }
                }

            } catch (IOException ioe) {
                log.warning("Error reading exception mapping file: " + ioe);
            }
        }
    }
419548
public static void initializeClass(Class clazz) {
		try {
			Class.forName(clazz.getName(), true, Thread.currentThread().getContextClassLoader());
		}
		catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		}
	}
294089
public Class<?> loadClassFrom(String name, AbstractClassLoader first) throws ClassNotFoundException {
		// try on the system one
		try { return AppClassLoader.class.getClassLoader().loadClass(name); }
		catch (ClassNotFoundException e) { /* not found. */ }
		Class<?> c = null;
		// check it is not loaded on one of the library
		for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		c = cl.isLoaded(name);
    		if (c != null) return c;
    	}
    	// try with the first one
    	if (first != null) {
    		try {
    			c = first.loadClassInLibrary(name);
    			if (c != null) return c;
    		} catch (FileNotFoundException e) {
    			// not found
    		} catch (IOException e) {
    			throw new ClassNotFoundException(e.getMessage());
    		}
    	}
    	// then, try on other libraries
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		if (cl == first) continue;
    		try {
    			c = cl.loadClassInLibrary(name);
    			if (c != null) return c;
    		} catch (FileNotFoundException e) {
    			// not found
    		} catch (IOException e) {
    			throw new ClassNotFoundException(e.getMessage());
    		}
    	}
		StringBuilder msg = new StringBuilder(512);
		msg.append("Class not found: ").append(name);
		msg.append("\r\nFrom class loader: ").append(first);
		msg.append("\r\nlibraries currently registered:");
		for (int i = 0; i < libs.size(); i++)
			msg.append("\r\n - ").append(libs.get(i).toString());
		throw new ClassNotFoundException(msg.toString());
	}

	/** Load a resource. */
	@SuppressWarnings("resource")
	public IO.Readable getResourceIO(String name, byte priority) {
		if (name.length() == 0) return null;
		if (name.charAt(0) == '/') name = name.substring(1);
		IO.Readable io = null;
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
   			try { io = cl.open(name, priority); }
   			catch (IOException e) { /* ignore */ }
    		if (io != null) return io;
    	}
       	// then try on the core one
        InputStream in = AppClassLoader.class.getClassLoader().getResourceAsStream(name);
        if (in == null) return null;
        return new IOFromInputStream(in, name, Threading.getUnmanagedTaskManager(), priority);
	}
975599
def start_class(self, class_):
        
        matches = filter(lambda svc: isinstance(svc, class_), self)
        if not matches:
            svc = class_()
            self.register(svc)
            matches = [svc]
        map(self.start, matches)
        return matches
545419
def onStart(self, *args, **kwarg):
        
        with transactUI(self):
            config = self.navbar.getActiveConfig()
            config.resetErrors()
            if config.isValid():
                self.clientRunner.run(self.buildCliString())
                self.showConsole()
            else:
                config.displayErrors()
                self.Layout()
1228643
public <T> Launch<T> newLaunch(Class<? extends T> programClass)
			throws LaunchException {
		return newLaunch(programClass, null);
	}
1273951
def init_default(self):
        
        import f311
        if self.default_filename is None:
            raise RuntimeError("Class '{}' has no default filename".format(self.__class__.__name__))
        fullpath = f311.get_default_data_path(self.default_filename, class_=self.__class__)
        self.load(fullpath)
        self.filename = None
463764
public static synchronized void init(String[] args, String... extraArgs) {
		AppStarter.startUp(args, extraArgs);

		status = AppStatus.INITIALIZING;

		// no implicit classpath scanning here
		boot();
	}
287080
public function appInit()
    {
        $this->pageStart();

        if ('oxstart' == \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId() || $this->isAdmin()) {
            return;
        }

        $oSystemEventHandler = $this->_getSystemEventHandler();
        $oSystemEventHandler->onShopStart();
    }
335821
public void postClassLoaderInit()
  {
    // bartender.setLocalShard(pod.getNode(podNode));
    ServiceManagerBuilderAmp builder = ServicesAmp.newManager();
    builder.name(EnvLoader.getEnvironmentName());
    
    BartenderSystem bartender = BartenderSystem.current();
    if (bartender != null) {
      PodBartender pod = bartender.findActivePod(getPodName());
    
      Objects.requireNonNull(pod);
    
      int podNode = _builder.getPodNode();
      bartender.setLocalPod(pod);
      //builder.setPodNode(new ServiceNodeImpl(pod.getNode(podNode)));
    }
    
    /*
    //builder.setJournalMaxCount(_builder.getJournalMaxCount());
    builder.setJournalDelay(_builder.getJournalDelay());
    // XXX: config timing issue
    builder.debug(_builder.isDebug());
    builder.debugQueryTimeout(_builder.getDebugQueryTimeout());
    builder.autoStart(false);
    */
    _ampManager = builder.start();

    /*
    if (_controller.getConfigException() != null) {
      setAmpConfigException(_controller.getConfigException());
    }
    else if (_configException != null) {
      setAmpConfigException(_configException);
    }
    */
   
    Amp.contextManager(_ampManager);
    
    /*
    _ampManager.run(()->{
      EmbedBuilder embedBuilder = new EmbedBuilder();
      embedBuilder.scanClassLoader();
      embedBuilder.build();
    });
    */
  }
236208
public void start() {

        ClassDoc[] classDocs = mRootDoc.getClasses();

        for (int i = 0; i < classDocs.length; i++) {

            ClassDoc classDoc = classDocs[i];
            if (!accept(classDoc)) {
                continue;
            }

            try {
                generateBeanInfo(classDoc);
            }
            catch (RuntimeException e) {
                throw e;
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException(e.toString());
            }
        }
    }
453764
protected void addAsFirst(NonDelayedClassInfo classInfo) {
        String methodName = "addAsFirst";
        boolean doLog = tc.isDebugEnabled();
        String useHashText = (doLog ? getHashText() : null);
        String useClassHashText = (doLog ? classInfo.getHashText() : null);

        if (doLog) {
            logLinks(methodName, classInfo);
        }

        if (firstClassInfo == null) {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to empty",
                                                  new Object[] { useHashText, useClassHashText }));
            }

            firstClassInfo = classInfo;

            lastClassInfo = classInfo;

            // last == first
            // lastClassInfoName == firstClassInfoName

            // first.next remains null
            // first.prev remains null

        } else if (firstClassInfo == lastClassInfo) {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to singleton [ {2} ]",
                                                  new Object[] { useHashText, useClassHashText, firstClassInfo.getHashText() }));
            }

            firstClassInfo = classInfo;

            firstClassInfo.setNextClassInfo(lastClassInfo);
            lastClassInfo.setPriorClassInfo(classInfo);

            // last != first
            // lastClassInfoName != firstClassInfoName

            // first.prev == null
            // first.next == last

            // last.prev == first
            // last.next == null

        } else {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to multitude [ {2} ]",
                                                  new Object[] { useHashText,
                                                                useClassHashText,
                                                                firstClassInfo.getHashText() }));
            }

            classInfo.setNextClassInfo(firstClassInfo);

            firstClassInfo.setPriorClassInfo(classInfo);

            firstClassInfo = classInfo;

            if (classInfos.size() > ClassInfoCache.classInfoCacheLimit) {
                NonDelayedClassInfo oldLastClassInfo = lastClassInfo;
                String lastClassName = lastClassInfo.getName();
                classInfos.remove(lastClassName);

                discardRef(lastClassName); // No current use for the old last class name; discard it.

                lastClassInfo = oldLastClassInfo.getPriorClassInfo();

                lastClassInfo.setNextClassInfo(null);

                // oldLastClassInfo.setNextClassInfo(null);
                oldLastClassInfo.setPriorClassInfo(null);

                if (doLog) {
                    Tr.debug(tc, MessageFormat.format("[ {0} ] new last [ {1} ] displaces [ {2} ]",
                                                      new Object[] { useHashText,
                                                                    lastClassInfo.getHashText(),
                                                                    oldLastClassInfo.getHashText() }));
                }

                DelayedClassInfo delayedClassInfo = oldLastClassInfo.getDelayedClassInfo();
                if (delayedClassInfo != null) {
                    if (doLog) {
                        Tr.debug(tc, MessageFormat.format("[ {0} ] Clearing link on displaced [ {1} ]",
                                                          new Object[] { useHashText, oldLastClassInfo.getHashText() }));
                    }

                    delayedClassInfo.setClassInfo(null);
                    oldLastClassInfo.setDelayedClassInfo(null);
                }
            }
        }
    }
730818
public void init(MainApplication app, String strKey)
    {
        m_app = app;
        if (strKey == null)
            strKey = Constants.BLANK;
        m_strKey = strKey;  // + "\\";
        m_app.addUserProperties(this);
    }
121332
public static void initClass() {

        // registers a factory for creating new instances of this widget
        CmsWidgetFactoryRegistry.instance().registerFactory(WIDGET_TYPE, new I_CmsFormWidgetFactory() {

            /**
             * @see org.opencms.gwt.client.ui.input.form.I_CmsFormWidgetFactory#createWidget(java.util.Map, com.google.common.base.Optional)
             */
            public I_CmsFormWidget createWidget(Map<String, String> widgetParams, Optional<String> defaultValue) {

                String cfg = widgetParams.get("v");
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(cfg)) {
                    // something went wrong, fall back to text box
                    return new CmsTextBox();
                } else {
                    return new CmsTinyMCEWidget(decode(cfg));
                }
            }

            private String decode(String string) {

                StringBuffer result = new StringBuffer();
                for (String num : string.split(",")) {
                    result.append((char)(Integer.parseInt(num)));
                }
                return result.toString();
            }
        });
    }
848502
public static ApplicationContext run(Class cls, String... args) {
        return run(new Class[]{cls}, args);
    }
762773
function addClass(elem, value) {
        if (value && typeof value === "string") {
            var classNames = (elem.className + ' ' + value).split(/\s+/);
            var setClass = ' ';

            each(classNames, function (className) {
                if (setClass.indexOf(' ' + className + ' ') < 0) {
                    setClass += className + ' ';
                }
            });

            elem.className = setClass.slice(1, -1);
        }
    }