public AnnotationMetaDataProvider(ConstraintHelper constraintHelper, ParameterNameProvider parameterNameProvider, AnnotationProcessingOptions annotationProcessingOptions) { this.constraintHelper = constraintHelper; this.parameterNameProvider = parameterNameProvider; this.annotationProcessingOptions = annotationProcessingOptions; configuredBeans = new ConcurrentReferenceHashMap<Class<?>, BeanConfiguration<?>>( DEFAULT_INITIAL_CAPACITY, SOFT, SOFT ); }
public ValidatorMessager(final ResourceBundleLocator userResourceBundleLocator, final ResourceBundleLocator contributorResourceBundleLocator, final boolean cacheMessages) { this.defaultLocale = Locale.getDefault(); if (userResourceBundleLocator == null) { this.userResourceBundleLocator = new ValidatorBundleLocator(USER_VALIDATION_MESSAGES); } else { this.userResourceBundleLocator = userResourceBundleLocator; } if (contributorResourceBundleLocator == null) { this.contributorResourceBundleLocator = new ValidatorBundleLocator("ContributorValidationMessages", (ClassLoader) null, true); } else { this.contributorResourceBundleLocator = contributorResourceBundleLocator; } this.defaultResourceBundleLocator = new ValidatorBundleLocator("org.hibernate.validator.ValidationMessages"); this.cachingEnabled = cacheMessages; if (this.cachingEnabled) { this.resolvedMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); this.tokenizedParameterMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); this.tokenizedELMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); } else { this.resolvedMessages = null; this.tokenizedParameterMessages = null; this.tokenizedELMessages = null; } }
public ValidatorImpl(ConstraintValidatorFactory constraintValidatorFactory, MessageInterpolator messageInterpolator, TraversableResolver traversableResolver, BeanMetaDataManager beanMetaDataManager, ParameterNameProvider parameterNameProvider, TimeProvider timeProvider, TypeResolutionHelper typeResolutionHelper, List<ValidatedValueUnwrapper<?>> validatedValueHandlers, ConstraintValidatorManager constraintValidatorManager, boolean failFast) { this.constraintValidatorFactory = constraintValidatorFactory; this.messageInterpolator = messageInterpolator; this.traversableResolver = traversableResolver; this.beanMetaDataManager = beanMetaDataManager; this.parameterNameProvider = parameterNameProvider; this.timeProvider = timeProvider; this.typeResolutionHelper = typeResolutionHelper; this.validatedValueHandlers = validatedValueHandlers; this.constraintValidatorManager = constraintValidatorManager; this.failFast = failFast; validationOrderGenerator = new ValidationOrderGenerator(); this.accessibleMembers = new ConcurrentReferenceHashMap<Member, Member>( 100, ReferenceType.SOFT, ReferenceType.SOFT ); }
public ValidatorMessager(final ResourceBundleLocator userResourceBundleLocator, final ResourceBundleLocator contributorResourceBundleLocator, final boolean cacheMessages) { this.defaultLocale = Locale.getDefault(); if (userResourceBundleLocator == null) { this.userResourceBundleLocator = new ValidatorBundleLocator(USER_VALIDATION_MESSAGES); } else { this.userResourceBundleLocator = userResourceBundleLocator; } if (contributorResourceBundleLocator == null) { this.contributorResourceBundleLocator = new ValidatorBundleLocator("ContributorValidationMessages", (ClassLoader) null, true); } else { this.contributorResourceBundleLocator = contributorResourceBundleLocator; } this.defaultResourceBundleLocator = new ValidatorBundleLocator("org.hibernate.validator.ValidationMessages"); this.cachingEnabled = cacheMessages; if (this.cachingEnabled) { this.resolvedMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); this.tokenizedParameterMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); this.tokenizedELMessages = new ConcurrentReferenceHashMap(100, 0.75F, 16, ConcurrentReferenceHashMap.ReferenceType.SOFT, ConcurrentReferenceHashMap.ReferenceType.SOFT, EnumSet.noneOf(ConcurrentReferenceHashMap.Option.class)); } else { this.resolvedMessages = null; this.tokenizedParameterMessages = null; this.tokenizedELMessages = null; } }
this.resolvedMessages = new ConcurrentReferenceHashMap<LocalizedMessage, String>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, EnumSet.noneOf( ConcurrentReferenceHashMap.Option.class ) ); this.tokenizedParameterMessages = new ConcurrentReferenceHashMap<String, List<Token>>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, EnumSet.noneOf( ConcurrentReferenceHashMap.Option.class ) ); this.tokenizedELMessages = new ConcurrentReferenceHashMap<String, List<Token>>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR,
this.resolvedMessages = new ConcurrentReferenceHashMap<LocalizedMessage, String>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, EnumSet.noneOf( ConcurrentReferenceHashMap.Option.class ) ); this.tokenizedParameterMessages = new ConcurrentReferenceHashMap<String, List<Token>>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, EnumSet.noneOf( ConcurrentReferenceHashMap.Option.class ) ); this.tokenizedELMessages = new ConcurrentReferenceHashMap<String, List<Token>>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR,
this.beanMetaDataCache = new ConcurrentReferenceHashMap<>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR,
this.beanMetaDataCache = new ConcurrentReferenceHashMap<Class<?>, BeanMetaData<?>>( DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR,