if (!(getIntent().getExtras().isEmpty())) { Bundle gotid = getIntent().getExtras(); identifier = gotid.getString("key"); new Setup().execute(identifier); }
var Setup = function () { var that = this; this.x = 60; } Setup.prototype.Loop = function () { console.log(this.x); // 1: returns 'undefined' console.log(Setup.x); // 2: returns 'undefined' console.log(hi.x); // 3: returns '60' console.log(that.x); // 4: returns '60' } var hi = new Setup();
Begin begin = new Begin(); Setup setup = new Setup(); begin.setSetup(setup); setup.setBegin(begin);
DefaultSetup() { boolean onSameServer = Setup.appAndAdminOnSameServer(); Customization appCustomization = new Customization("main", My.custom(), Conf.ROOT); Customization adminCustomization = onSameServer ? appCustomization : new Customization("admin", My.custom(), Conf.ROOT); HttpRoutesImpl appRoutes = new HttpRoutesImpl("main", appCustomization); HttpRoutesImpl adminRoutes = onSameServer ? appRoutes : new HttpRoutesImpl("admin", adminCustomization); on = new Setup("main", MAIN_ZONE, IoC.defaultContext(), Setup.MAIN_CFG, appCustomization, appRoutes); admin = new Setup("admin", ADMIN_ZONE, IoC.defaultContext(), Setup.ADMIN_CFG, adminCustomization, adminRoutes); Setup.instances.add(on); Setup.instances.add(admin); initDefaults(); }
public static Setup create(String name) { IoCContext ioc = IoC.createContext().name(name); Config config = Conf.section(name); Customization customization = new Customization(name, My.custom(), config); HttpRoutesImpl routes = new HttpRoutesImpl(name, customization); Setup setup = new Setup(name, "main", ioc, config, customization, routes); instances.add(setup); return setup; }