Get the singleton.

@return the event bus
963498
public static EventBus get() {
		if (EventBus.instance == null) {
			EventBus.instance = new EventBus();
		}
		return EventBus.instance;
	}
983277
public <H extends EventHandler> H getHandler(GwtEvent.Type<H> type, int index) {
		return this.eventBus.superGetHandler(type, index);
	}
81678
public function getEventDispatcher()
    {
        if (null === $this->eventDispatcher) {
            $this->eventDispatcher = new Dispatcher\ResourceEventDispatcher();
            $this->eventDispatcher->setConfigurationRegistry($this->getConfigurationRegistry());
            $this->eventDispatcher->setEventQueue($this->getEventQueue());
        }

        return $this->eventDispatcher;
    }
296937
public String getBus()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getBus");
    
    String bus = aliasDest.getBus();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getBus", bus);
    
    return bus;
  }
515967
static public function singleton()
    {
        if (! self::$_singleton) {
            global $CA_CONFIG;
            self::$_singleton = self::probe($CA_CONFIG ? $CA_CONFIG : array());
        }
        return self::$_singleton;
    }
1117790
public F getInstance() {
		return getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, TimeZone.getDefault(), Locale.getDefault());
	}
793100
private static ConcurrentPropagationService getInstance() {
    if (instance == null) {
      synchronized (ConcurrentPropagationService.class) {
        if (instance == null) {
          instance = new ConcurrentPropagationService();
        }
      }
    }
    return instance;
  }
1218573
public function getEventBus()
    {
        if ($this->eventBus) {
            return $this->eventBus;
        }

        if (isset(static::$staticEventBus) && static::$staticEventBus) {
            return static::$staticEventBus;
        }

        if (!$this->eventBus) {
            $this->eventBus = Bus::instance();
        }
        return $this->eventBus;
    }
1011001
public static EventEngine getEventService() {
        HttpDispatcher f = instance.get().get();
        if (f != null)
            return f.eventSvc;

        return null;
    }
1149491
public static ArchTaskExecutor getInstance() {
        if (sInstance != null) {
            return sInstance;
        }
        synchronized (ArchTaskExecutor.class) {
            if (sInstance == null) {
                sInstance = new ArchTaskExecutor();
            }
        }
        return sInstance;
    }
523927
public synchronized static Lifecycle get() {
        if(INSTANCE==null) {
            Lifecycle instance;
            String p = SystemProperties.getString("hudson.lifecycle");
            if(p!=null) {
                try {
                    ClassLoader cl = Jenkins.getInstance().getPluginManager().uberClassLoader;
                    instance = (Lifecycle)cl.loadClass(p).newInstance();
                } catch (InstantiationException e) {
                    InstantiationError x = new InstantiationError(e.getMessage());
                    x.initCause(e);
                    throw x;
                } catch (IllegalAccessException e) {
                    IllegalAccessError x = new IllegalAccessError(e.getMessage());
                    x.initCause(e);
                    throw x;
                } catch (ClassNotFoundException e) {
                    NoClassDefFoundError x = new NoClassDefFoundError(e.getMessage());
                    x.initCause(e);
                    throw x;
                }
            } else {
                if(Functions.isWindows()) {
                    instance = new Lifecycle() {
                        @Override
                        public void verifyRestartable() throws RestartNotSupportedException {
                            throw new RestartNotSupportedException(
                                    "Default Windows lifecycle does not support restart.");
                        }
                    };
                } else if (System.getenv("SMF_FMRI")!=null && System.getenv("SMF_RESTARTER")!=null) {
                    // when we are run by Solaris SMF, these environment variables are set.
                    instance = new SolarisSMFLifecycle();
                } else {
                    // if run on Unix, we can do restart
                    try {
                        instance = new UnixLifecycle();
                    } catch (final IOException e) {
                        LOGGER.log(Level.WARNING, "Failed to install embedded lifecycle implementation",e);
                        instance = new Lifecycle() {
                            @Override
                            public void verifyRestartable() throws RestartNotSupportedException {
                                throw new RestartNotSupportedException(
                                        "Failed to install embedded lifecycle implementation, so cannot restart: " + e, e);
                            }
                        };
                    }
                }
            }
            assert instance != null;
            INSTANCE = instance;
        }

        return INSTANCE;
    }
272294
public function getEvent()
    {
        if (null === $this->event) {
            $this->setEvent(new AdapterChainEvent);
            $this->event->setTarget($this);
        }

        return $this->event;
    }
275913
public synchronized EventBus once(Class<? extends EventObject> eventType, OnceEventListenerBase listener) {
        if (null != onceBus) {
            onceBus.bind(eventType, listener);
        } else {
            bind(eventType, listener);
        }
        return this;
    }
1007568
public WeldEvent<Object> event() {
        checkIsRunning();
        if (event == null) {
            synchronized (this) {
                if (event == null) {
                    event = beanManager().event();
                }
            }
        }
        return event;
    }
1143582
public synchronized EventAgent getEventAgent() {
    if (this.eventAgent == null) {
      if (isService) {
        this.eventAgent =
            new EventAgent(
                this.serviceName,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version,
                this.serviceKey);
      } else {
        this.eventAgent =
            new EventAgent(
                this.username,
                this.password,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version);
      }
    }
    return this.eventAgent;
  }
961872
@SuppressWarnings("unchecked")
    public static <E> ServiceRegistry<E> getInstance() {
        if (instance == null) {
            synchronized (ServiceRegistry.class) {
                if (instance == null) {
                    instance = new ServiceRegistry<E>();
                }
            }
        }
        return instance;
    }
521750
public static SystemUtil getInstance() {

    if (instance == null) {
      synchronized (SystemUtilImpl.class) {
        if (instance == null) {
          instance = new SystemUtilImpl();
        }
      }
    }
    return instance;
  }