Gets the name provider factory.
<p>
The name provider is a pluggable instance factory that supplies the
names of each DateTimeZone.

@return the provider
421396
public static NameProvider getNameProvider() {
        NameProvider nameProvider = cNameProvider.get();
        if (nameProvider == null) {
            nameProvider = getDefaultNameProvider();
            if (!cNameProvider.compareAndSet(null, nameProvider)) {
                nameProvider = cNameProvider.get();
            }
        }
        return nameProvider;
    }
1340284
public PeriodBuilder getPeriodBuilder() {
    if (builder == null) {
      builder = ps.newPeriodBuilderFactory()
          .setLocale(localeName)
          .setTimeZone(timeZone)
          .getSingleUnitBuilder();
    }
    return builder;
  }
794371
public <T> T getOnce(final Class<T> clazz, final String name)
	{
		return new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz).get();
	}
209056
public static TimeZone getTimeZone(String name)
    {
        TimeZone ret = null;
        if(timezones != null)
        {
            for(int i = 0; i < timezones.length && ret == null; i++)
            {
                if(timezones[i].getName().equals(name))
                    ret = timezones[i].getTimeZone();
            }
        }
        return ret;
    }
933885
public static SPIProvider getInstance()
   {
      if (me == null)
      {
         final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
         me = SPIProviderResolver.getInstance(cl).getProvider();
      }
      return me;
   }
807843
@Override
	public final Reference getReference() throws NamingException
    {
    	Reference ref = new Reference(getClass().getName(),JNDIObjectFactory.class.getName(),null);
    	ref.add(new StringRefAddr("providerURL",getProviderURL()));
    	if (clientID != null)
    		ref.add(new StringRefAddr("clientID",clientID));
    	
    	return ref;
    }
355273
public TimeZone getTimeZone()
    {
        if ( fDateFormat != null ) {
            // Here we clone, like other getters here, but unlike
            // DateFormat.getTimeZone() and Calendar.getTimeZone()
            // which return the TimeZone from the Calendar's zone variable
            return (TimeZone)(fDateFormat.getTimeZone().clone());
        }
        // If fDateFormat is null (unexpected), return default timezone.
        return TimeZone.getDefault();
    }
1195005
public static BeanManager getBeanManager() {
        BeanManager mgr = getBeanManagerFromJndi();
        if (mgr == null) {
            ServiceLoader<BeanManagerProvider> loader = ServiceLoader
                .load(BeanManagerProvider.class);
            Iterator<BeanManagerProvider> it = loader.iterator();

            while (mgr == null && it.hasNext()) {
                BeanManagerProvider provider = it.next();
                mgr = provider.getBeanManager();
            }
        }

        return mgr;
    }
816651
static <T,X extends T> T createProviderForClass(final PluggableService<T> service, final Class<X> cls) throws PluginException,
            ProviderCreationException {
        debug("Try loading provider " + cls.getName());
        if(!(service instanceof JavaClassProviderLoadable)){
            return null;
        }
        JavaClassProviderLoadable<T> loadable = (JavaClassProviderLoadable<T>) service;
        final Plugin annotation = getPluginMetadata(cls);

        final String pluginname = annotation.name();

        if (!loadable.isValidProviderClass(cls)) {
            throw new PluginException("Class " + cls.getName() + " was not a valid plugin class for service: " 
                    + service.getName() + ". Expected class " + cls.getName() + ", with a public constructor with no parameter");
        }
        debug("Succeeded loading plugin " + cls.getName() + " for service: " + service.getName());
        return loadable.createProviderInstance(cls, pluginname);
    }
1090071
static SLF4JServiceProvider getProvider() {
        if (INITIALIZATION_STATE == UNINITIALIZED) {
            synchronized (LoggerFactory.class) {
                if (INITIALIZATION_STATE == UNINITIALIZED) {
                    INITIALIZATION_STATE = ONGOING_INITIALIZATION;
                    performInitialization();
                }
            }
        }
        switch (INITIALIZATION_STATE) {
        case SUCCESSFUL_INITIALIZATION:
            return PROVIDER;
        case NOP_FALLBACK_INITIALIZATION:
            return NOP_FALLBACK_FACTORY;
        case FAILED_INITIALIZATION:
            throw new IllegalStateException(UNSUCCESSFUL_INIT_MSG);
        case ONGOING_INITIALIZATION:
            // support re-entrant behavior.
            // See also http://jira.qos.ch/browse/SLF4J-97
            return SUBST_PROVIDER;
        }
        throw new IllegalStateException("Unreachable code");
    }
1032033
protected synchronized static SAXParserFactory getSaxFactory()
    {
        if (sSaxFactory == null) {
            sSaxFactory = SAXParserFactory.newInstance();
            sSaxFactory.setNamespaceAware(true); 
        }
        return sSaxFactory;
    }
1333091
public Class getJavaClass()
  {
    try {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      
      return Class.forName(getName(), false, loader);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
725864
public java.lang.String getProvider() {
    java.lang.Object ref = provider_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      provider_ = s;
      return s;
    }
  }
1255631
protected ConnectionFactory retrieveConnectionFactory(String name) throws JMSException {
        if (name == null && defaultConnectionFactory != null) {
            return defaultConnectionFactory; // injected
        }
        else {
            try {
                // autowiring did not occur
                return (ConnectionFactory)SpringAppContext.getInstance().getBean(name);
            }
            catch (Exception ex) {
                logger.severeException(ex.getMessage(), ex);
                throw new JMSException("JMS ConnectionFactory not found: " + name);
            }
        }
    }
210295
public Reference getReference() throws NamingException
   {
      Reference ref =
         new Reference(BindableRepositoryImpl.class.getName(), BindableRepositoryFactory.class.getName(), null);
      ref.add(new StringRefAddr(BindableRepositoryFactory.REPOSITORYNAME_ADDRTYPE, delegatee.getConfiguration()
         .getName()));
      return ref;
   }
425753
public static Lookup get() {
        if (LOOKUP != null) {
            return LOOKUP;
        }
        synchronized (Lookup.class) {
            // allow for override of the Lookup.class
            String overrideClassName = System.getProperty(Lookup.class.getName());
            ClassLoader l = Thread.currentThread().getContextClassLoader();
            try {
                if (overrideClassName != null && !"".equals(overrideClassName)) {
                    LOOKUP = (Lookup) Class.forName(overrideClassName, true, l).newInstance();
                } else {
                    LOOKUP = new Lookup();
                }
            } catch (Exception e) {
                // ignore
            }
            // ServiceLoader and CDI are used by defaults, important that
            // CDI is used first so that beans are enabled for injection
            CdiLookup cdiLookup = new CdiLookup();
            LOOKUP.lookupProviders.add(cdiLookup);
            ServiceLoaderLookup serviceLoaderLookup = new ServiceLoaderLookup();
            LOOKUP.lookupProviders.add(serviceLoaderLookup);
            // Use ServiceLoader to find other LookupProviders
            Collection<LookupProvider> providers = serviceLoaderLookup
                    .lookupAll(LookupProvider.class);
            LOOKUP.lookupProviders.addAll(providers);
        }

        return LOOKUP;
    }
758213
protected Provider<String> getPUNameProvider() {
        final String puName = settings.getDatabaseSettings().getPersistenceUnit();

        return Providers.<String>of(puName == null ? "croquet" : puName);
    }