Class ExecutableMetaData.Builder
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
-
- org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData.Builder
-
- Enclosing class:
- ExecutableMetaData
public static class ExecutableMetaData.Builder extends MetaDataBuilder
Creates newExecutableMetaDatainstances.- Author:
- Gunnar Morling, Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
-
-
Field Summary
-
Fields inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
constraintCreationContext
-
-
Constructor Summary
Constructors Constructor Description Builder(Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintCreationContext constraintCreationContext, ExecutableHelper executableHelper, ExecutableParameterNameProvider parameterNameProvider, MethodValidationConfiguration methodValidationConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(ConstrainedElement constrainedElement)Whether this builder allows to add the given element or not.voidadd(ConstrainedElement constrainedElement)Adds the given element to this builder.ExecutableMetaDatabuild()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 Detail
-
Builder
public Builder(Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintCreationContext constraintCreationContext, ExecutableHelper executableHelper, ExecutableParameterNameProvider parameterNameProvider, MethodValidationConfiguration methodValidationConfiguration)
-
-
Method Detail
-
accepts
public boolean accepts(ConstrainedElement constrainedElement)
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
public final void add(ConstrainedElement constrainedElement)
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
public ExecutableMetaData 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.
-
-