Creates a factory to create a DOM4JHandle instance for a dom4j document.
@return	the factory
324192
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ Document.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return Document.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
          (ContentHandle<C>) new DOM4JHandle() : null;
        return handle;
      }
    };
  }
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;
   }
21598
public synchronized XMLInputFactory getXMLInputFactory() {
		XMLInputFactory inputFactory = (XMLInputFactory) factoryRef.get();
		if (inputFactory == null) {
			inputFactory = createInputFactory();
			factoryRef = new SoftReference(inputFactory);
		}
		return inputFactory;
	}
1210671
public static TensorFactory getFactory() {
    return new TensorFactory() {
      @Override
      public TensorBuilder getBuilder(int[] dimNums, int[] dimSizes) {
        return new DenseTensorBuilder(dimNums, dimSizes);
      }
    };
  }
772850
protected SSLServerSocketFactory createFactory() 
    	throws Exception
    {
        SSLContext context;
        if (_provider == null) {
			context = SSLContext.getInstance(_protocol);
		} else {
			context = SSLContext.getInstance(_protocol, _provider);
		}

        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(_algorithm);        
        KeyStore keyStore = KeyStore.getInstance(_keystoreType);
        keyStore.load(Resource.newResource(_keystore).getInputStream(), _password.toString().toCharArray());
        keyManagerFactory.init(keyStore,_keypassword.toString().toCharArray());
        
        context.init(keyManagerFactory.getKeyManagers(), null, new java.security.SecureRandom());

        return context.getServerSocketFactory();
    }
817242
public ResourceFactory createChild() {
        ResourceFactory child = new ResourceFactory(this);
        this.chidren.add(new WeakReference<>(child));
        return child;
    }
784807
public static <K, V> Factory<OffHeapBufferStorageEngine<K, V>> createFactory(final PointerSize width, final PageSource source, final int pageSize, final Portability<? super K> keyPortability, final Portability<? super V> valuePortability, final boolean thief, final boolean victim) {
    return () -> new OffHeapBufferStorageEngine<>(width, source, pageSize, keyPortability, valuePortability, thief, victim);
  }
664788
function createFactory() {
    return function Stamp(options) {
      var i = Stamp[_compose] || {};
      // Next line was optimized for most JS VMs. Please, be careful here!
      var obj = {__proto__: i[_methods]};

      var inits = i[_initializers], args = slice.apply(arguments);
      var initializer, returnedValue;

      var tmp = i[_deepProperties];
      if (tmp) merge(obj, tmp);
      tmp = i[_properties];
      if (tmp) assign(obj, tmp);
      tmp = i[_propertyDescriptors];
      if (tmp) defineProperties(obj, tmp);

      if (!inits || !inits[_length]) return obj;

      if (options === _undefined) options = {};
      for (i = 0; i < inits[_length];) {
        initializer = inits[i++];
        if (isFunction(initializer)) {
          returnedValue = initializer.call(obj, options,
            {instance: obj, stamp: Stamp, args: args});
          obj = returnedValue === _undefined ? obj : returnedValue;
        }
      }

      return obj;
    };
  }
314572
private static synchronized DocumentBuilder getDocumentFactory()
    {
        if (documentBuilder == null)
        {
            final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setIgnoringElementContentWhitespace(true);
            try
            {
                documentBuilderFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true);
            }
            catch (final ParserConfigurationException exception)
            {
                Verbose.exception(exception);
            }
            try
            {
                documentBuilder = documentBuilderFactory.newDocumentBuilder();
                documentBuilder.setErrorHandler(null);
            }
            catch (final ParserConfigurationException exception)
            {
                throw new LionEngineException(exception);
            }
        }
        return documentBuilder;
    }
636604
private synchronized static XPathFactory createXPathFactory() {
        XPathFactory factory = null;

        // read system property and see if there is a factory set
        Properties properties = System.getProperties();
        for (Map.Entry<Object, Object> prop : properties.entrySet()) {
            String key = (String) prop.getKey();
            if (key.startsWith(XPathFactory.DEFAULT_PROPERTY_NAME)) {
                String uri = key.indexOf(":") > 0 ? key.substring(key.indexOf(":") + 1) : null;
                if (uri != null) {
                    try {
                        factory = XPathFactory.newInstance(uri);
                    } catch (XPathFactoryConfigurationException e) {
                        log.warn("Failed to instantiate xpath factory", e);
                        factory = XPathFactory.newInstance();
                    }
                    log.info("Created xpath factory {} using system property {} with value {}", factory, key, uri);
                }
            }
        }

        if (factory == null) {
            factory = XPathFactory.newInstance();
            log.info("Created default xpath factory {}", factory);
        }

        return factory;
    }
1097305
public static FormInputHandler create() {
		return new FormInputHandler(WebElementFinder.create().noLogging(true), null, null, null, null, null, null, null, null);
	}
580850
public List<FacesConfigFactoryType<WebFacesConfigDescriptor>> getAllFactory()
   {
      List<FacesConfigFactoryType<WebFacesConfigDescriptor>> list = new ArrayList<FacesConfigFactoryType<WebFacesConfigDescriptor>>();
      List<Node> nodeList = model.get("factory");
      for(Node node: nodeList)
      {
         FacesConfigFactoryType<WebFacesConfigDescriptor>  type = new FacesConfigFactoryTypeImpl<WebFacesConfigDescriptor>(this, "factory", model, node);
         list.add(type);
      }
      return list;
   }
239405
private static void createFactoryInstance() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createFactoryInstance");
    try {
      Class cls = Class.forName(JS_MESSAGE_HANDLE_FACTORY_CLASS);
      instance = (JsMessageHandleFactory) cls.newInstance();
    }
    catch (Exception e) {
      FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.JsMessageHandleFactory.createFactoryInstance", "133");
      SibTr.error(tc,"UNABLE_TO_CREATE_HANDLEFACTORY_CWSIF0031",e);
      NoClassDefFoundError ncdfe = new NoClassDefFoundError(e.getMessage());
      ncdfe.initCause(e);
      throw ncdfe;
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createFactoryInstance");
  }
1168796
public static FormatFactory factory()
    {

        return new FormatFactory()
        {
            @Override
            public Format getFormat(String name, String args, Locale locale)
            {
                Map<String, Format> mt = FormatTables.get(name);
                Preconditions.checkArgument(mt != null, "There's no format instance for [%s]", name);

                Format m = mt.get((args == null || args.length() < 1) ? FormatNames.DEFAULT : args);
                Preconditions.checkArgument(m != null, "There's no signature in [%s] for the given args [%s]", name,
                        args);

                return ((ConfigurableFormat) m).withLocale(locale);
            }
        };

    }
428011
private static <T> ServiceBindingBuilder<T> newFactoryBinder(final Factory<T> factory) {
        return BindingBuilderFactory.newFactoryBinder(factory);
    }
889623
protected QueryFactory<T> getQueryFactory() {
        if (queryFactory == null) {
            queryFactory = new QueryFactory<>(getEntityClass(), getEntityManager());
        }

        return queryFactory;
    }
1091662
protected BindingFactory createWebBindings() {
		final BindingFactory factory = new BindingFactory(getClass().getName());
		for (final AbstractSubCodeBuilderFragment subFragment : this.subFragments) {
			subFragment.generateWebBindings(factory);
		}
		return factory;
	}