GenericBootstrapImpl state = new GenericBootstrapImpl();
public T configure() { if (providerClass == null) throw new ValidationException("No resolver provided"); // create a default resolver if not supplied by providerResolver() GenericBootstrapImpl impl = new GenericBootstrapImpl(); if ( vpResolver == null ) vpResolver = impl.getDefaultValidationProviderResolver(); else impl.providerResolver(vpResolver); // check each provider discovered by the resolver for (ValidationProvider<?> vProvider : vpResolver.getValidationProviders()) { if (providerClass.isAssignableFrom(vProvider.getClass())) { // Create a ValidationProvider<T> from the above bootstrap impl // and configurationType return providerClass.cast(vProvider).createSpecializedConfiguration(impl); } } // throw a Spec required exception throw new ValidationException("No provider found for " + providerClass); } }
public T configure() { if (providerClass == null) throw new ValidationException("No resolver provided"); // create a default resolver if not supplied by providerResolver() GenericBootstrapImpl impl = new GenericBootstrapImpl(); if ( vpResolver == null ) vpResolver = impl.getDefaultValidationProviderResolver(); else impl.providerResolver(vpResolver); // check each provider discovered by the resolver for (ValidationProvider<?> vProvider : vpResolver.getValidationProviders()) { if (providerClass.isAssignableFrom(vProvider.getClass())) { // Create a ValidationProvider<T> from the above bootstrap impl // and configurationType return providerClass.cast(vProvider).createSpecializedConfiguration(impl); } } // throw a Spec required exception throw new ValidationException("No provider found for " + providerClass); } }
GenericBootstrapImpl state = new GenericBootstrapImpl();
GenericBootstrapImpl state = new GenericBootstrapImpl(); if ( resolver == null ) { resolver = state.getDefaultValidationProviderResolver();
GenericBootstrapImpl state = new GenericBootstrapImpl();
GenericBootstrapImpl state = new GenericBootstrapImpl(); if ( resolver == null ) { resolver = state.getDefaultValidationProviderResolver();
GenericBootstrapImpl state = new GenericBootstrapImpl(); if ( resolver == null ) { resolver = state.getDefaultValidationProviderResolver();
GenericBootstrapImpl state = new GenericBootstrapImpl(); if ( resolver == null ) { resolver = state.getDefaultValidationProviderResolver();
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Build a <code>Configuration</code>. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exsist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic <code>Configuration</code> * compliant with the bootstrap state provided. */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }
/** * Builds a {@link Configuration}. The provider list is resolved * using the strategy provided to the bootstrap state. * <pre> * Configuration<?> configuration = Validation * .byDefaultProvider() * .providerResolver( new MyResolverStrategy() ) * .configure(); * ValidatorFactory factory = configuration.buildValidatorFactory(); * </pre> * The provider can be specified in the XML configuration. If the XML * configuration does not exist or if no provider is specified, * the first available provider will be returned. * * @return instance building a generic {@code Configuration} * compliant with the bootstrap state provided */ public static GenericBootstrap byDefaultProvider() { return new GenericBootstrapImpl(); }