| Modifier and Type | Class and Description |
|---|---|
| private static class | ConstraintHelper.ValidatorDescriptorMap
A type-safe wrapper around a concurrent map from constraint types to associated validator classes. |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final ConcurrentMap | |
| public static final String | |
| private static final String | |
| private Boolean | |
| private static final String | |
| private Boolean | |
| private static final Log | |
| public static final String | |
| private final ConcurrentMap | |
| public static final String | |
| private static final List | |
| public static final String | |
| private final ConstraintHelper. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | |
| public < the type of the annotation A extends Annotation> List | Returns: A list with matching validator descriptors.The annotation of interest. annotationType, ValidationTarget The target, either annotated element or parameters. validationTarget)Returns those validator descriptors for the given constraint annotation matching the given target. |
| public static ConstraintHelper | |
| public static ConstraintHelper | |
| public < the type of the annotation A extends Annotation> List | Returns: The validator classes for the given type.The constraint annotation type. annotationType)Returns the constraint validator classes for the given constraint annotation type, as retrieved from
|
| public static Set | |
| public < the type of the annotation A extends Annotation> List | Returns: A list of constraint annotations, may be empty but nevernull.the multi-value constraint annotation from which to retrieve the contained constraints multiValueConstraint)Returns the constraints which are part of the given multi-value constraint. |
| private <A extends Annotation> List | Returns: A list with the default validators as retrieved fromConstraint#validatedBy() or the list of validators for
built-in constraints.The constraint annotation type. annotationType)Returns the default validators for the given constraint type. |
| private boolean | |
| private static boolean | |
| public boolean | Returns: true if the annotation fulfills the above conditions, false otherwise.The annotation type to test. annotationType)Checks whether the specified annotation is a valid constraint annotation. |
| public boolean | |
| private boolean | |
| public boolean | |
| private boolean | |
| public boolean | Returns: true if the specified annotation is a multi value constraints, false
otherwise.the annotation type to check. annotationType)Checks whether a given annotation is a multi value constraint or not. |
| private static <A extends Annotation> void | putBuiltinConstraint(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType)
|
| private static <A extends Annotation> void | putBuiltinConstraint(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType, Class<? extends ConstraintValidator<A, ?>> validatorType)
|
| private static <A extends Annotation> void | putBuiltinConstraints(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType, List<Class<? extends ConstraintValidator<A, ?>>> validatorTypes)
|
| public < the type of the annotation A extends Annotation> void | putValidatorDescriptors(Class<A>
The constraint annotation type annotationType, List<ConstraintValidatorDescriptor<A>> The validator descriptors to register validatorDescriptors, boolean Whether already-registered validators should be kept or not keepExistingClasses)Registers the given validator descriptors with the given constraint annotation type. |
| private static <T> T | run(PrivilegedAction<T> action)
Runs the given privileged action, using a privileged block if required. |
| private boolean | supportsValidationTarget(ConstraintValidatorDescriptor<?> validatorDescriptor, ValidationTarget target)
|
| enabledBuiltinConstraints | back to summary |
|---|---|
| private final Map<Class<? extends Annotation>, List<? extends ConstraintValidatorDescriptor<?>>> enabledBuiltinConstraints
| |
| externalConstraints | back to summary |
|---|---|
| private final ConcurrentMap<Class<? extends Annotation>, Boolean> externalConstraints | |
| GROUPS | back to summary |
|---|---|
| public static final String GROUPS | |
| JAVA_MONEY_CLASS_NAME | back to summary |
|---|---|
| private static final String JAVA_MONEY_CLASS_NAME | |
| javaMoneyInClasspath | back to summary |
|---|---|
| private Boolean javaMoneyInClasspath | |
| JODA_TIME_CLASS_NAME | back to summary |
|---|---|
| private static final String JODA_TIME_CLASS_NAME | |
| jodaTimeInClassPath | back to summary |
|---|---|
| private Boolean jodaTimeInClassPath | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| MESSAGE | back to summary |
|---|---|
| public static final String MESSAGE | |
| multiValueConstraints | back to summary |
|---|---|
| private final ConcurrentMap<Class<? extends Annotation>, Boolean> multiValueConstraints | |
| PAYLOAD | back to summary |
|---|---|
| public static final String PAYLOAD | |
| SUPPORTED_VALID_METHODS | back to summary |
|---|---|
| private static final List<String> SUPPORTED_VALID_METHODS | |
| VALIDATION_APPLIES_TO | back to summary |
|---|---|
| public static final String VALIDATION_APPLIES_TO | |
| validatorDescriptors | back to summary |
|---|---|
| private final ConstraintHelper. | |
| ConstraintHelper | back to summary |
|---|---|
private ConstraintHelper(Set<BuiltinConstraint> enabledBuiltinConstraints)
| |
| assertGroupsParameterExists | back to summary |
|---|---|
| private void assertGroupsParameterExists(Class<? extends Annotation> annotationType) | |
| assertMessageParameterExists | back to summary |
|---|---|
| private void assertMessageParameterExists(Class<? extends Annotation> annotationType) | |
| assertNoParameterStartsWithValid | back to summary |
|---|---|
| private void assertNoParameterStartsWithValid(Class<? extends Annotation> annotationType) | |
| assertPayloadParameterExists | back to summary |
|---|---|
| private void assertPayloadParameterExists(Class<? extends Annotation> annotationType) | |
| assertValidationAppliesToParameterSetUpCorrectly | back to summary |
|---|---|
| private void assertValidationAppliesToParameterSetUpCorrectly(Class<? extends Annotation> annotationType) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| findValidatorDescriptors | back to summary |
|---|---|
| public <A extends Annotation> List Returns those validator descriptors for the given constraint annotation matching the given target.
| |
| forAllBuiltinConstraints | back to summary |
|---|---|
| public static ConstraintHelper forAllBuiltinConstraints() | |
| forBuiltinConstraints | back to summary |
|---|---|
| public static ConstraintHelper forBuiltinConstraints(Set<String> enabledConstraints) | |
| getAllValidatorDescriptors | back to summary |
|---|---|
| public <A extends Annotation> List Returns the constraint validator classes for the given constraint annotation type, as retrieved from
| |
| getBuiltinConstraints | back to summary |
|---|---|
| public static Set | |
| getConstraintsFromMultiValueConstraint | back to summary |
|---|---|
| public <A extends Annotation> List Returns the constraints which are part of the given multi-value constraint.
Invoke
| |
| getDefaultValidatorDescriptors | back to summary |
|---|---|
| private <A extends Annotation> List Returns the default validators for the given constraint type.
| |
| isBuiltinConstraint | back to summary |
|---|---|
| private boolean isBuiltinConstraint(Class<? extends Annotation> annotationType) | |
| isClassPresent | back to summary |
|---|---|
| private static boolean isClassPresent(String className) | |
| isConstraintAnnotation | back to summary |
|---|---|
| public boolean isConstraintAnnotation(Class<? extends Annotation> annotationType) Checks whether the specified annotation is a valid constraint annotation. A constraint annotation has to fulfill the following conditions:
| |
| isConstraintComposition | back to summary |
|---|---|
| public boolean isConstraintComposition(Class<? extends Annotation> annotationType) | |
| isJavaMoneyInClasspath | back to summary |
|---|---|
| private boolean isJavaMoneyInClasspath() | |
| isJdkAnnotation | back to summary |
|---|---|
| public boolean isJdkAnnotation(Class<? extends Annotation> annotation) | |
| isJodaTimeInClasspath | back to summary |
|---|---|
| private boolean isJodaTimeInClasspath() | |
| isMultiValueConstraint | back to summary |
|---|---|
| public boolean isMultiValueConstraint(Class<? extends Annotation> annotationType) Checks whether a given annotation is a multi value constraint or not.
| |
| putBuiltinConstraint | back to summary |
|---|---|
| private static <A extends Annotation> void putBuiltinConstraint(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType) | |
| putBuiltinConstraint | back to summary |
|---|---|
| private static <A extends Annotation> void putBuiltinConstraint(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType, Class<? extends ConstraintValidator<A, ?>> validatorType) | |
| putBuiltinConstraints | back to summary |
|---|---|
| private static <A extends Annotation> void putBuiltinConstraints(Map<Class<? extends Annotation>, List<ConstraintValidatorDescriptor<?>>> validators, Class<A> constraintType, List<Class<? extends ConstraintValidator<A, ?>>> validatorTypes) | |
| putValidatorDescriptors | back to summary |
|---|---|
| public <A extends Annotation> void putValidatorDescriptors(Class<A> annotationType, List<ConstraintValidatorDescriptor<A>> validatorDescriptors, boolean keepExistingClasses) Registers the given validator descriptors with the given constraint annotation type.
| |
| run | back to summary |
|---|---|
| private static <T> T run(PrivilegedAction<T> action) Runs the given privileged action, using a privileged block if required. Note This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.
| |
| supportsValidationTarget | back to summary |
|---|---|
| private boolean supportsValidationTarget(ConstraintValidatorDescriptor<?> validatorDescriptor, ValidationTarget target) | |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private <A extends Annotation> List | computeIfAbsent(Class<A> annotationType, Function<? super Class<A>, List<ConstraintValidatorDescriptor<A>>> mappingFunction)
|
| private <A extends Annotation> void |
| constraintValidatorDescriptors | back to summary |
|---|---|
| private final ConcurrentMap<Class<? extends Annotation>, List<? extends ConstraintValidatorDescriptor<?>>> constraintValidatorDescriptors | |
| ValidatorDescriptorMap | back to summary |
|---|---|
| private ValidatorDescriptorMap() | |
| computeIfAbsent | back to summary |
|---|---|
| private <A extends Annotation> List | |
| put | back to summary |
|---|---|
| private <A extends Annotation> void put(Class<A> annotationType, List<ConstraintValidatorDescriptor<A>> validatorDescriptors) | |