public static class PropertyMetaData.Builder extends MetaDataBuilder
constraintHelper, typeResolutionHelper, valueExtractorManager
Constructor and Description |
---|
Builder(Class<?> beanClass,
ConstrainedExecutable constrainedMethod,
ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager) |
Builder(Class<?> beanClass,
ConstrainedField constrainedField,
ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager) |
Builder(Class<?> beanClass,
ConstrainedType constrainedType,
ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(ConstrainedElement constrainedElement)
Whether this builder allows to add the given element or not.
|
protected Set<MetaConstraint<?>> |
adaptConstraints(ConstrainedElement constrainedElement,
Set<MetaConstraint<?>> constraints)
Allows specific sub-classes to customize the retrieved constraints.
|
void |
add(ConstrainedElement constrainedElement)
Adds the given element to this builder.
|
PropertyMetaData |
build()
Creates a new, read-only
ConstraintMetaData object with all
constraint information related to the method or property represented by
this builder. |
adaptOriginsAndImplicitGroups, getBeanClass, getContainerElementConstraints, getDirectConstraints, isCascading
public Builder(Class<?> beanClass, ConstrainedField constrainedField, ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager)
public Builder(Class<?> beanClass, ConstrainedType constrainedType, ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager)
public Builder(Class<?> beanClass, ConstrainedExecutable constrainedMethod, ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager)
public boolean accepts(ConstrainedElement constrainedElement)
MetaDataBuilder
accepts
in class MetaDataBuilder
constrainedElement
- The element to check.true
if the given element can be added to this
builder, false
otherwise.public final void add(ConstrainedElement constrainedElement)
MetaDataBuilder
MetaDataBuilder.accepts(ConstrainedElement)
before, whether this is allowed or
not.add
in class MetaDataBuilder
constrainedElement
- The element to add.protected Set<MetaConstraint<?>> adaptConstraints(ConstrainedElement constrainedElement, Set<MetaConstraint<?>> constraints)
MetaDataBuilder
adaptConstraints
in class MetaDataBuilder
public PropertyMetaData build()
MetaDataBuilder
ConstraintMetaData
object with all
constraint information related to the method or property represented by
this builder.build
in class MetaDataBuilder
ConstraintMetaData
object.Copyright © 2021 JBoss by Red Hat. All rights reserved.