Creates a new {@link HibernateValidatorConfiguration} with the base custom unwrappers registered.
346098
public static HibernateValidatorConfiguration newConfiguration() {
        return Validation
            .byProvider(HibernateValidator.class)
            .configure()
            .addValueExtractor(GuavaOptionalValueExtractor.DESCRIPTOR.getValueExtractor());
    }
182841
@Override
  protected Configuration doConfigure(InputStream stream, String resourceName) throws HibernateException {
    try {
      ErrorLogger errorLogger = new ErrorLogger(resourceName);
      SAXReader reader = xmlHelper.createSAXReader(errorLogger, getEntityResolver());
      reader.setValidation(false);
      Document document = reader.read(new InputSource(stream));
      if (errorLogger.hasErrors()) { throw new MappingException("invalid configuration",
          errorLogger.getErrors().get(0)); }
      doConfigure(document);
    } catch (DocumentException e) {
      throw new HibernateException("Could not parse configuration: " + resourceName, e);
    } finally {
      try {
        stream.close();
      } catch (IOException ioe) {
        logger.error("Could not close input stream for {}", resourceName);
      }
    }
    return this;
  }
910084
private Validator getDefaultValidator(final FacesContext context) throws FacesException {
        if (!beanValidationPresent) {
            return null;
        }

        ValidatorFactory validatorFactory;
        Object cachedObject = context.getExternalContext().getApplicationMap().get(BeanValidator.VALIDATOR_FACTORY_KEY);
        if (cachedObject instanceof ValidatorFactory) {
            validatorFactory = (ValidatorFactory) cachedObject;
        } else {
            try {
                validatorFactory = Validation.buildDefaultValidatorFactory();
            } catch (ValidationException e) {
                throw new FacesException("Could not build a default Bean Validator factory", e);
            }
            context.getExternalContext().getApplicationMap().put(BeanValidator.VALIDATOR_FACTORY_KEY, validatorFactory);
        }
        return validatorFactory.getValidator();
    }
839808
private JawrApplicationConfigManager initApplicationConfigManager() {

		JawrApplicationConfigManager appConfigMgr = (JawrApplicationConfigManager) servletContext
				.getAttribute(JawrConstant.JAWR_APPLICATION_CONFIG_MANAGER);
		if (appConfigMgr == null) {
			appConfigMgr = new JawrApplicationConfigManager();
			servletContext.setAttribute(JawrConstant.JAWR_APPLICATION_CONFIG_MANAGER, appConfigMgr);
		}

		// Create the config manager for the current Request Handler
		JawrConfigManager configMgr = new JawrConfigManager(this, jawrConfig.getConfigProperties());

		// Initialize the jawrApplicationConfigManager
		if (resourceType.equals(JawrConstant.JS_TYPE)) {
			appConfigMgr.setJsMBean(configMgr);
		} else if (resourceType.equals(JawrConstant.CSS_TYPE)) {
			appConfigMgr.setCssMBean(configMgr);
		} else {
			appConfigMgr.setBinaryMBean(configMgr);
		}
		return appConfigMgr;
	}
643449
@Nonnull
  public static <T> UBLTRValidatorBuilder <T> create (@Nonnull final Class <T> aClass)
  {
    return new UBLTRValidatorBuilder <> (aClass);
  }
654582
@Nonnull
  public static <T> UBL22ValidatorBuilder <T> create (@Nonnull final Class <T> aClass)
  {
    return new UBL22ValidatorBuilder<> (aClass);
  }
382719
public BinderConfiguration createStateBinderConfiguration(final List<String> properties) {
        val binder = new BinderConfiguration();
        properties.forEach(p -> binder.addBinding(new BinderConfiguration.Binding(p, null, true)));
        return binder;
    }
964079
public Builder newBuilder() {
        return new Builder()
                .name(name)
                .type(dbColumnType)
                .size(size)
                .addConstraints(columnConstraints)
                .autoInc(autoInc)
                .defaultValue(defaultValue);
    }
503971
private GeneralValidator<DPO, RI, RO, RHI> build() {
        // Create validator
        GeneralValidator<DPO, RI, RO, RHI> validator = new GeneralValidator<DPO, RI, RO, RHI>();

        // Add triggers
        for (Trigger trigger : addedTriggers) {
            validator.addTrigger(trigger);
        }

        // Add data providers
        for (DataProvider<DPO> dataProvider : addedDataProviders) {
            validator.addDataProvider(dataProvider);
        }

        // Map data providers output to rules input
        validator.setDataProviderToRuleMappingStrategy(dataProviderToRuleMapping);
        validator.setRuleInputTransformers(addedRuleInputTransformers);

        // Add rules
        for (Rule<RI, RO> rule : addedRules) {
            validator.addRule(rule);
        }

        // Map rules output to result handlers input
        validator.setRuleToResultHandlerMappingStrategy(ruleToResultHandlerMapping);
        validator.setResultHandlerInputTransformers(addedResultHandlerInputTransformers);

        // Add result handlers
        for (ResultHandler<RHI> resultHandler : addedResultHandlers) {
            validator.addResultHandler(resultHandler);
        }

        return validator;
    }
598409
public FacesConfigValidatorType<FacesConfigType<T>> getOrCreateValidator()
   {
      List<Node> nodeList = childNode.get("validator");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigValidatorTypeImpl<FacesConfigType<T>>(this, "validator", childNode, nodeList.get(0));
      }
      return createValidator();
   }
1352950
public static IJavaBatchCompiler newDefaultJavaBatchCompiler() {
		try {
			synchronized (SarlBatchCompiler.class) {
				if (defaultJavaBatchCompiler == null) {
					final ImplementedBy annotation = IJavaBatchCompiler.class.getAnnotation(ImplementedBy.class);
					assert annotation != null;
					final Class<?> type = annotation.value();
					assert type != null;
					defaultJavaBatchCompiler = type.asSubclass(IJavaBatchCompiler.class);
				}
				return defaultJavaBatchCompiler.newInstance();
			}
		} catch (Exception exception) {
			throw new RuntimeException(exception);
		}
	}
129689
protected WSJdbcResultSet createWrapper(ResultSet rsetImpl) {
        // If the childWrapper is null, and the childWrappers is null or 
        // empty, set the result set to childWrapper;
        // Otherwise, add the result set to childWrappers
        WSJdbcResultSet rsetWrapper;
        if (childWrapper == null && (childWrappers == null || childWrappers.isEmpty())) {
            childWrapper = rsetWrapper = mcf.jdbcRuntime.newResultSet(rsetImpl, this);
            if (TraceComponent.isAnyTracingEnabled() &&  tc.isDebugEnabled())
                Tr.debug(tc, "Set the result set to child wrapper"); 
        } else {
            if (childWrappers == null) 
                childWrappers = new ArrayList<Wrapper>(5); 
            rsetWrapper = mcf.jdbcRuntime.newResultSet(rsetImpl, this);
            childWrappers.add(rsetWrapper);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Add the result set to child wrappers list."); 
        }

        return rsetWrapper;
    }
134957
@Nonnull
  public static <T> EbInterfaceValidator <T> create (@Nonnull final Class <T> aClass)
  {
    return new EbInterfaceValidator <> (aClass);
  }
1315444
@Nonnull
  public static <T> UBL21ValidatorBuilder <T> create (@Nonnull final Class <T> aClass)
  {
    return new UBL21ValidatorBuilder <> (aClass);
  }
277700
protected EnumMatcher<EnumerationValue> createEnumMatcher() {
        if (_mappedEnumsProperty instanceof EnumerationProvider) {
            return new DefaultEnumMatcher((EnumerationProvider) _mappedEnumsProperty);
        } else {
            @SuppressWarnings("unchecked") final Class<? extends Enum<?>> baseType =
                    (Class<? extends Enum<?>>) _mappedEnumsProperty.getBaseType();
            final EnumerationProvider prov = EnumerationValue.providerFromEnumClass(baseType);
            return new DefaultEnumMatcher(prov);
        }
    }
267217
@Override
    public Plugin create(final PluginWrapper pluginWrapper) {
        String pluginClassName = pluginWrapper.getDescriptor().getPluginClass();
        log.debug("Create instance for plugin '{}'", pluginClassName);

        Class<?> pluginClass;
        try {
            pluginClass = pluginWrapper.getPluginClassLoader().loadClass(pluginClassName);
        } catch (ClassNotFoundException e) {
            log.error(e.getMessage(), e);
            return null;
        }

        // once we have the class, we can do some checks on it to ensure
        // that it is a valid implementation of a plugin.
        int modifiers = pluginClass.getModifiers();
        if (Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers)
                || (!Plugin.class.isAssignableFrom(pluginClass))) {
            log.error("The plugin class '{}' is not valid", pluginClassName);
            return null;
        }

        // create the plugin instance
        try {
            Constructor<?> constructor = pluginClass.getConstructor(PluginWrapper.class);
            return (Plugin) constructor.newInstance(pluginWrapper);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }

        return null;
    }
1092250
private function createConfigWrapper(): ConfigWrapper
    {
        $factory = new LazyLoadingValueHolderFactory();
        $initializer = function (&$wrappedObject, LazyLoadingInterface $proxy, $method, array $parameters, &$initializer) {
            $initializer = null;
            $wrappedObject = new ConfigWrapper($this->aggregator->getConfig());

            return true;
        };

        return $factory->createProxy(ConfigWrapper::class, $initializer);
    }