Class ParameterMetaData.Builder
java.lang.Object
org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
org.hibernate.validator.internal.metadata.aggregated.ParameterMetaData.Builder
- Enclosing class:
- ParameterMetaData
-
Field Summary
Fields inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
constraintCreationContext -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(Class<?> beanClass, ConstrainedParameter constrainedParameter, ConstraintCreationContext constraintCreationContext, ExecutableParameterNameProvider parameterNameProvider) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(ConstrainedElement constrainedElement) Whether this builder allows to add the given element or not.voidadd(ConstrainedElement constrainedElement) Adds the given element to this builder.build()Creates a new, read-onlyConstraintMetaDataobject with all constraint information related to the method or property represented by this builder.Methods inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
adaptConstraints, adaptOriginsAndImplicitGroups, getBeanClass, getContainerElementConstraints, getDirectConstraints, isCascading
-
Constructor Details
-
Builder
public Builder(Class<?> beanClass, ConstrainedParameter constrainedParameter, ConstraintCreationContext constraintCreationContext, ExecutableParameterNameProvider parameterNameProvider)
-
-
Method Details
-
accepts
Description copied from class:MetaDataBuilderWhether this builder allows to add the given element or not. This is the case if the specified element relates to the same property or method with which this builder was instantiated.- Specified by:
acceptsin classMetaDataBuilder- Parameters:
constrainedElement- The element to check.- Returns:
trueif the given element can be added to this builder,falseotherwise.
-
add
Description copied from class:MetaDataBuilderAdds the given element to this builder. It must be checked withMetaDataBuilder.accepts(ConstrainedElement)before, whether this is allowed or not.- Overrides:
addin classMetaDataBuilder- Parameters:
constrainedElement- The element to add.
-
build
Description copied from class:MetaDataBuilderCreates a new, read-onlyConstraintMetaDataobject with all constraint information related to the method or property represented by this builder.- Specified by:
buildin classMetaDataBuilder- Returns:
- A
ConstraintMetaDataobject.
-