Package javax.validation

Examples of javax.validation.ValidationProviderResolver


    assertTrue( factory instanceof TCKValidationProvider.DummyValidatorFactory );
  }

  @Test
  public void testFailingCustomResolver() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        return new ArrayList<ValidationProvider<?>>();
      }
    };
View Full Code Here


    private ValidationProviderResolver defaultResolver;
    private ValidationProviderResolver resolver;

    public Configuration<?> configure() {
      ValidationProviderResolver aResolver = this.resolver == null
          ? getDefaultValidationProviderResolver() : this.resolver;

      List<ValidationProvider<?>> resolvers;
      try {
        resolvers = aResolver.getValidationProviders();
      } catch (RuntimeException re) {
        throw new ValidationException(
            "Unable to get available provider resolvers.", re);
      }

      if (resolvers.size() == 0) {
        // FIXME looks like an assertion error almost
        throw new ValidationException("Unable to find a default provider");
      }

      Configuration<?> config;
      try {
        config = aResolver.getValidationProviders().get(0).createGenericConfiguration(
            this);
      } catch (RuntimeException re) {
        throw new ValidationException("Unable to instantiate Configuration.",
            re);
      }
View Full Code Here

TOP

Related Classes of javax.validation.ValidationProviderResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.