Validator with respect to the Jakarta Bean Validation
specification section 5.6.5. In particular:
"Out of the box, a conforming Bean Validation provider must throw a ConstraintDeclarationException when discovering that any of these rules are violated. In addition providers may implement alternative, potentially more liberal, approaches for handling constrained methods in inheritance hierarchies. Possible means for activating such alternative behavior include provider-specific configuration properties or annotations. Note that client code relying on such alternative behavior is not portable between Bean Validation providers."
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private Set |
| Access | Constructor and Description |
|---|---|
| private | MethodValidationConfiguration(boolean allowOverridingMethodAlterParameterConstraint, boolean allowMultipleCascadedValidationOnReturnValues, boolean allowParallelMethodsDefineParameterConstraints)
|
| Modifier and Type | Method and Description |
|---|---|
| private static Set | buildConfiguredRuleSet(boolean allowOverridingMethodAlterParameterConstraint, boolean allowMultipleCascadedValidationOnReturnValues, boolean allowParallelMethodsDefineParameterConstraints)
|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public Set | Returns: a set of method configuration rules based on this configuration stateReturn an unmodifiable Set of MethodConfigurationRule that are to be enforced based on the configuration. |
| public int | |
| public boolean | Returns: true if more than one return value within a class hierarchy can be marked for cascaded
validation, false otherwise.
|
| public boolean | Returns: true if more than one return value within a class hierarchy can be marked for cascaded
validation, false otherwise.
|
| public boolean | Returns: true if constraints on methods in parallel class hierarchy are allowed, false otherwise.
|
| allowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| private boolean allowMultipleCascadedValidationOnReturnValues | |
| allowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
| private boolean allowOverridingMethodAlterParameterConstraint | |
| allowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
| private boolean allowParallelMethodsDefineParameterConstraints | |
| configuredRuleSet | back to summary |
|---|---|
| private Set<MethodConfigurationRule> configuredRuleSet
| |
| MethodValidationConfiguration | back to summary |
|---|---|
| private MethodValidationConfiguration(boolean allowOverridingMethodAlterParameterConstraint, boolean allowMultipleCascadedValidationOnReturnValues, boolean allowParallelMethodsDefineParameterConstraints) | |
| buildConfiguredRuleSet | back to summary |
|---|---|
| private static Set | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getConfiguredRuleSet | back to summary |
|---|---|
| public Set Return an unmodifiable Set of MethodConfigurationRule that are to be enforced based on the configuration.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isAllowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
public boolean isAllowMultipleCascadedValidationOnReturnValues()
| |
| isAllowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
public boolean isAllowOverridingMethodAlterParameterConstraint()
| |
| isAllowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
public boolean isAllowParallelMethodsDefineParameterConstraints()
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public MethodValidationConfiguration. | Returns: this following the chaining method patternflag determining whether validation will allow multiple cascaded validation on return values. allow)Define whether more than one constraint on a return value may be marked for cascading validation are allowed. |
| public MethodValidationConfiguration. | Returns: this following the chaining method patternflag determining whether validation will allow overriding to alter parameter constraints. allow)Define whether overriding methods that override constraints should throw a |
| public MethodValidationConfiguration. | Returns: this following the chaining method patternflag determining whether validation will allow parameter constraints in parallel hierarchies allow)Define whether parallel methods that define constraints should throw a |
| public MethodValidationConfiguration | |
| public boolean | |
| public boolean | |
| public boolean |
| allowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| private boolean allowMultipleCascadedValidationOnReturnValues | |
| allowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
| private boolean allowOverridingMethodAlterParameterConstraint | |
| allowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
| private boolean allowParallelMethodsDefineParameterConstraints | |
| Builder | back to summary |
|---|---|
| public Builder() | |
| Builder | back to summary |
|---|---|
| public Builder(MethodValidationConfiguration template) | |
| allowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| public MethodValidationConfiguration. Define whether more than one constraint on a return value may be marked for cascading validation are allowed.
The default value is
| |
| allowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
| public MethodValidationConfiguration. Define whether overriding methods that override constraints should throw a "In sub types (be it sub classes/interfaces or interface implementations), no parameter constraints may be declared on overridden or implemented methods, nor may parameters be marked for cascaded validation. This would pose a strengthening of preconditions to be fulfilled by the caller."
| |
| allowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
| public MethodValidationConfiguration. Define whether parallel methods that define constraints should throw a
| |
| build | back to summary |
|---|---|
| public MethodValidationConfiguration build() | |
| isAllowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| public boolean isAllowMultipleCascadedValidationOnReturnValues() | |
| isAllowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
| public boolean isAllowOverridingMethodAlterParameterConstraint() | |
| isAllowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
| public boolean isAllowParallelMethodsDefineParameterConstraints() | |