public static class ExecutableMetaData.Builder extends MetaDataBuilder
ExecutableMetaData
instances.constraintHelper
Constructor and Description |
---|
Builder(Class<?> beanClass,
ConstrainedExecutable constrainedExecutable,
ConstraintHelper constraintHelper,
ExecutableHelper executableHelper,
MethodValidationConfiguration methodValidationConfiguration)
Creates a new builder based on the given executable meta data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(ConstrainedElement constrainedElement)
Whether this builder allows to add the given element or not.
|
void |
add(ConstrainedElement constrainedElement)
Adds the given element to this builder.
|
ExecutableMetaData |
build()
Creates a new, read-only
ConstraintMetaData object with all
constraint information related to the method or property represented by
this builder. |
adaptOriginsAndImplicitGroups, getBeanClass, getConstraints, getGroupConversions, isCascading, unwrapMode
public Builder(Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintHelper constraintHelper, ExecutableHelper executableHelper, MethodValidationConfiguration methodValidationConfiguration)
constrainedExecutable
- The base executable for this builder. This is the lowest
executable with a given signature within a type hierarchy.constraintHelper
- the constraint helperexecutableHelper
- the executable helperbeanClass
- the bean classmethodValidationConfiguration
- configuration instance for method validation behaviourpublic 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.public ExecutableMetaData 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 © 2017 JBoss by Red Hat. All rights reserved.