get singelton instance of the CFML Engine

@param factory
@return CFMLEngine
504124
public static synchronized CFMLEngine getInstance(CFMLEngineFactory factory, BundleCollection bc) {
	if (engine == null) {
	    if (SystemUtil.getLoaderVersion() < 6.0D) {
		// windows needs 6.0 because restart is not working with older versions
		if (SystemUtil.isWindows())
		    throw new RuntimeException("You need to update a newer lucee.jar to run this version, you can download the latest jar from http://download.lucee.org.");
		else if (SystemUtil.getLoaderVersion() < 5.8D)
		    throw new RuntimeException("You need to update your lucee.jar to run this version, you can download the latest jar from http://download.lucee.org.");
		else if (SystemUtil.getLoaderVersion() < 5.9D)
		    SystemOut.printDate("To use all features Lucee provides, you need to update your lucee.jar, you can download the latest jar from http://download.lucee.org.");
	    }
	    engine = new CFMLEngineImpl(factory, bc);

	}
	return engine;
    }
675034
@Override
    public GeldbetragFactory getFactory() {
        return new GeldbetragFactory().setCurrency(currency).setNumber(betrag).setContext(context);
    }
121102
private function getViewFactory(): Factory
    {
        if ($this->factory) {
            return $this->factory;
        }

        $resolver = new EngineResolver();
        $resolver->register("blade", function () {
            $blade = $this->getCompiler();
            return new CompilerEngine($blade);
        });

        $this->factory = new Factory($resolver, $this->getViewFinder(), new Dispatcher());

        return $this->factory;
    }
488218
private static SerializerFactory getInstance() {
    if (instance == null) {
      String className = JacksonSerializerFactory.class.getName();
      try {
        className = System.getProperty(SERIALIZER_FACTORY_CLASS_NAME);
      } catch (Exception e) {
      }

      if (className != null) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        try {
          Class<?> clazz = loader.loadClass(className);
          instance = (SerializerFactory) clazz.newInstance();
        } catch (Exception e) {
          throw new IllegalArgumentException("Error instantiating serializer factory.");
        }
      } else {
        instance = new JacksonSerializerFactory();
      }
    }
    return instance;
  }
632963
public static synchronized JmsFactoryFactory getInstance() throws JMSException
  {
  	
  	if (tcInt.isEntryEnabled())
      Tr.entry(tcInt, "getInstance");

    if (instance == null)
    {
      

      try
      {
        Class cls =
          Class.forName(ApiJmsConstants.CONNFACTORY_FACTORY_CLASS);
        instance = (JmsFactoryFactory) cls.newInstance();

      } catch (Exception e)
      {
        // No FFDC code needed
      	if (tcInt.isDebugEnabled())
          Tr.debug(tcInt, "Unable to instantiate JmsFactoryFactory", e);
        if (tcInt.isEntryEnabled())
          Tr.exit(tcInt, "getInstance");
          
        instance = null;
              
        JMSException jmse = new JMSException(nls.getFormattedMessage("UNABLE_TO_CREATE_FACTORY_CWSIA0001",
        																			new Object[] {"JmsFactoryFactoryImpl", "sib.api.jmsImpl.jar"},
        																			"!!!Unable to instantiate JmsFactoryFactoryImpl"));
        jmse.setLinkedException(e);
        jmse.initCause(e);
        throw jmse;

      }

    }//if

		if (tcInt.isEntryEnabled())
      Tr.exit(tcInt, "getInstance");
      
		// If we get this far, then the instance is initialized, since an exception would
		// have been thrown if it was not.
    return instance;
  }
563338
public Object get(String name, ObjectFactory<?> factory) {
		ThreadScopeContext context = ThreadScopeContextHolder.getContext();

		Object result = context.getBean(name);
		if (null == result) {
			result = factory.getObject();
			context.setBean(name, result);
		}
		return result;
	}
219411
private static JsJmsMessageFactoryImpl getJmsFactory() {
    if (jmsFactory == null) {
      try {
        jmsFactory = (JsJmsMessageFactoryImpl)JsJmsMessageFactory.getInstance();
      } catch (Exception e) {
        /* A Console error message will have been written for the underlying problem */
        FFDCFilter.processException(e, "<clinit>", "116");
      }
    }
    return jmsFactory;
  }
1127435
public static ScriptFactory getScriptFactory() {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    if (processEngineConfiguration != null) {
      return processEngineConfiguration.getScriptFactory();
    }
    else {
      return new ScriptFactory();
    }
  }
683845
public static synchronized RenderEngine getInstance() {
    //availableEngines = null;
    if (null == availableEngines) {
      availableEngines = new HashMap();
    }

    if (!availableEngines.containsKey(DEFAULT)) {
      RenderEngine engine = new BaseRenderEngine();
      availableEngines.put(engine.getName(), engine);
    }

    return (RenderEngine) availableEngines.get(DEFAULT);
  }
873009
public List<FacesConfigFactoryType<FacesConfigType<T>>> getAllFactory()
   {
      List<FacesConfigFactoryType<FacesConfigType<T>>> list = new ArrayList<FacesConfigFactoryType<FacesConfigType<T>>>();
      List<Node> nodeList = childNode.get("factory");
      for(Node node: nodeList)
      {
         FacesConfigFactoryType<FacesConfigType<T>>  type = new FacesConfigFactoryTypeImpl<FacesConfigType<T>>(this, "factory", childNode, node);
         list.add(type);
      }
      return list;
   }
430244
public static TransformerFactory getTF() {
        TransformerFactory tf = threadTF.get();
        if (tf == null) {
            tf = TransformerFactory.newInstance();
            threadTF.set(tf);
        }
        return tf;
    }
735423
private static function getPuliFactory()
    {
        if (null === self::$puliFactory) {
            if (!defined('PULI_FACTORY_CLASS')) {
                throw new PuliUnavailableException('Puli Factory is not available');
            }

            $puliFactoryClass = PULI_FACTORY_CLASS;

            if (!ClassDiscovery::safeClassExists($puliFactoryClass)) {
                throw new PuliUnavailableException('Puli Factory class does not exist');
            }

            self::$puliFactory = new $puliFactoryClass();
        }

        return self::$puliFactory;
    }
381609
private static void createFactoryInstance()
  {
    if (tc.isEntryEnabled())
      tc.entry(cclass, "createFactoryInstance");

    try
    {
      Class cls = Class.forName(MATCHING_CLASS_NAME);
      instance = (Matching) cls.newInstance();
    }
    catch (Exception e)
    {
      // No FFDC Code Needed.
      // FFDC driven by wrapper class.
      FFDC.processException(cclass,
        "com.ibm.ws.sib.matchspace.Matching.createFactoryInstance",
        e,
        "1:94:1.18");
//TODO: trace.error  
//      tc.error(cclass, "UNABLE_TO_CREATE_MATCHING_INSTANCE_CWSIH0007E", e);

      createException = e;
    }
    
    if (tc.isEntryEnabled())
      tc.exit(cclass, "createFactoryInstance");
  }
300753
@Override
    public ChannelPipelineFactory getPipelineFactory()
    {
        return new ChannelPipelineFactory()
        {
            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
552734
public static function getEngine()
    {
        if (self::$nb_engine === null) {
            self::$nb_engine = new CNabuEngine();
            self::$nb_engine->init();
        }

        return self::$nb_engine;
    }
1285338
@SuppressWarnings("unchecked")
    public static <T> IDomainFactory<T> getFactory(Class<T> clazz) {
        for (IDomainFactory<?> factory : instance) {
            String alias = factory.getAlias(clazz);
            
            if (alias != null) {
                return (IDomainFactory<T>) factory;
            }
        }
        
        throw new IllegalArgumentException("Domain class has no registered factory: " + clazz.getName());
    }
393206
public final function getFactory()
    {
        $calledClass = get_called_class();
        if (empty(self::$factories[$calledClass])) {
            self::$factories[$calledClass] = $this->getDefaultFactory();
        }

        return self::$factories[$calledClass];
    }