Class ClassMetaData.Builder
java.lang.Object
org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
org.hibernate.validator.internal.metadata.aggregated.ClassMetaData.Builder
- Enclosing class:
- ClassMetaData
-
Field Summary
Fields inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
constraintCreationContext
-
Constructor Summary
ConstructorDescriptionBuilder
(Class<?> beanClass, ConstrainedType constrainedType, ConstraintCreationContext constraintCreationContext) -
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(ConstrainedElement constrainedElement) Whether this builder allows to add the given element or not.final void
add
(ConstrainedElement constrainedElement) Adds the given element to this builder.build()
Creates a new, read-onlyConstraintMetaData
object 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, ConstrainedType constrainedType, ConstraintCreationContext constraintCreationContext)
-
-
Method Details
-
accepts
Description copied from class:MetaDataBuilder
Whether 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:
accepts
in classMetaDataBuilder
- Parameters:
constrainedElement
- The element to check.- Returns:
true
if the given element can be added to this builder,false
otherwise.
-
add
Description copied from class:MetaDataBuilder
Adds the given element to this builder. It must be checked withMetaDataBuilder.accepts(ConstrainedElement)
before, whether this is allowed or not.- Overrides:
add
in classMetaDataBuilder
- Parameters:
constrainedElement
- The element to add.
-
build
Description copied from class:MetaDataBuilder
Creates a new, read-onlyConstraintMetaData
object with all constraint information related to the method or property represented by this builder.- Specified by:
build
in classMetaDataBuilder
- Returns:
- A
ConstraintMetaData
object.
-