Gets a singleton serializer factory instance.

@return The current serializer factory instance.
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;
  }
1150901
public static ReflectionUtil getInstance() {

    if (instance == null) {
      ReflectionUtilImpl impl = null;
      synchronized (ReflectionUtilImpl.class) {
        if (instance == null) {
          impl = new ReflectionUtilImpl();
          instance = impl;
        }
      }
      if (impl != null) {
        // static access is generally discouraged, cyclic dependency forces this ugly initialization to
        // prevent deadlock.
        impl.initialize();
      }
    }
    return instance;
  }
129946
public FacesConfigFactoryType<FacesConfigType<T>> getOrCreateFactory()
   {
      List<Node> nodeList = childNode.get("factory");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFactoryTypeImpl<FacesConfigType<T>>(this, "factory", childNode, nodeList.get(0));
      }
      return createFactory();
   }
1071475
public static EnglishLemmatizer getInstance() {
      if (INSTANCE == null) {
         synchronized (EnglishLemmatizer.class) {
            if (INSTANCE != null) {
               return INSTANCE;
            }
            INSTANCE = new EnglishLemmatizer();
         }
      }
      return INSTANCE;
   }
621892
public static NlsBundleFactory getBundleFactory() {

    if (bundleFactory == null) {
      synchronized (NlsAccess.class) {
        if (bundleFactory == null) {
          NlsBundleFactoryImpl impl = new NlsBundleFactoryImpl();
          impl.initialize();
        }
      }
    }
    return bundleFactory;
  }
428423
public static NormalizerSerializer getDefault() {
        if (defaultSerializer == null) {
            defaultSerializer = new NormalizerSerializer().addStrategy(new StandardizeSerializerStrategy())
                    .addStrategy(new MinMaxSerializerStrategy())
                    .addStrategy(new MultiStandardizeSerializerStrategy())
                    .addStrategy(new MultiMinMaxSerializerStrategy())
                    .addStrategy(new ImagePreProcessingSerializerStrategy())
                    .addStrategy(new MultiHybridSerializerStrategy());
        }
        return defaultSerializer;
    }
846808
public static JsonUtil getInstance() {

    if (instance == null) {
      synchronized (JsonUtilImpl.class) {
        if (instance == null) {
          JsonUtilImpl impl = new JsonUtilImpl();
          impl.initialize();
        }
      }
    }
    return instance;
  }
1368803
private static JaxbJsonSerializer<Map<String, String>> getPropsSerializer() {
        return new JaxbJsonSerializer<>((Class<Map<String, String>>) (Object)
            new HashMap<String, String>().getClass());
    }
1226643
public function getSerializer()
    {
        if (! $this->serializer || ! ($this->serializer instanceof Serializer)) {
            $this->serializer = Serializer::getInstance();
        }

        return $this->serializer;
    }
852448
@SuppressWarnings("unchecked")
    public static <T> Serializer<T> unsafeGetSerializer(SerializerFactory serializerFactory,
                                                        SerializerDefinition serializerDefinition) {
        return (Serializer<T>) serializerFactory.getSerializer(serializerDefinition);
    }
162813
public static ThreadManager getInstance() {
        if (thisClass == null) {
            thisClass = new ThreadManager();

            String useInheritableThreadLocalString = SSLConfigManager.getInstance().getGlobalProperty(Constants.SSLPROP_USE_INHERITABLE_THREAD_LOCAL);
            if (useInheritableThreadLocalString != null && (useInheritableThreadLocalString.equalsIgnoreCase("true") || useInheritableThreadLocalString.equalsIgnoreCase("yes"))) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "useInheritableThreadLocal is enabled.");
                useInheritableThreadLocal = true;
            }
        }

        return thisClass;
    }
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;
  }
227546
public static JoseFactory instance() {
        if (instance == null) {
            synchronized (JoseFactory.class) {
                if (instance != null) {
                    return instance;
                }

                ClassLoader cl = AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> Thread.currentThread().getContextClassLoader());
                if (cl == null) {
                    cl = JoseFactory.class.getClassLoader();
                }

                JoseFactory newInstance = loadSpi(cl);

                if (newInstance == null && cl != JoseFactory.class.getClassLoader()) {
                    cl = JoseFactory.class.getClassLoader();
                    newInstance = loadSpi(cl);
                }
                if (newInstance == null) {
                    newInstance = new DefaultJoseFactory();
                }

                instance = newInstance;
            }
        }

        return instance;
    }
1124557
public final MessageSerializer getDefaultSerializer() {
        // Construct a default serializer if we don't have one
        if (null == this.defaultSerializer) {
            // Don't grab a lock unless we absolutely need it
            synchronized(this) {
                // Now we have a lock, double check there's still no serializer
                // and create one if so.
                if (null == this.defaultSerializer) {
                    // As the serializers are intended to be immutable, creating
                    // two due to a race condition should not be a problem, however
                    // to be safe we ensure only one exists for each network.
                    this.defaultSerializer = getSerializer(false);
                }
            }
        }
        return defaultSerializer;
    }
508114
public FactoryFactory build() {
        return new FactoryFactory(
                getJceProvider(),
                getHttpClient(),
                getKeyCache(),
                getApiBaseURL(),
                getApiIdentifier(),
                getRequestExpireSeconds(),
                offsetTTL,
                currentPublicKeyTTL,
                entityKeyMap
        );

    }
629317
public static ResourceScanner getInstance() {
		if(INSTANCE == null) {
			synchronized(ResourceScanner.class) {
				if(INSTANCE == null) {
					INSTANCE = new ResourceScanner();
				}
			}
		}
		
		return INSTANCE;
	}
806651
public static <T> Serializer<T> dummySerializer() {
        return new Serializer<T>() {
            @Override
            public void write(PrimitivO output, T object) {
                throw new RuntimeException("Dummy serializer.");
            }

            @Override
            public T read(PrimitivI input) {
                throw new RuntimeException("Dummy serializer.");
            }

            @Override
            public boolean isReference() {
                return true;
            }

            @Override
            public boolean handlesReference() {
                return false;
            }
        };
    }