Top Description Inners Fields Constructors Methods
org.hibernate.validator.internal.metadata.aggregated

public Class ParameterMetaData

extends AbstractConstraintMetaData
implements Cascadable
Class Inheritance
All Implemented Interfaces
org.hibernate.validator.internal.metadata.facets.Cascadable
Imports
java.lang.reflect.Type, java.util.List, .Set, jakarta.validation.ElementKind, jakarta.validation.metadata.ParameterDescriptor, org.hibernate.validator.internal.engine.ConstraintCreationContext, org.hibernate.validator.internal.engine.path.PathImpl, org.hibernate.validator.internal.metadata.core.MetaConstraint, org.hibernate.validator.internal.metadata.descriptor.ParameterDescriptorImpl, org.hibernate.validator.internal.metadata.facets.Cascadable, org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind, org.hibernate.validator.internal.metadata.raw.ConstrainedElement, .ConstrainedElement.ConstrainedElementKind, .ConstrainedParameter, org.hibernate.validator.internal.properties.Callable, org.hibernate.validator.internal.util.ExecutableParameterNameProvider

An aggregated view of the constraint related meta data for a single method parameter.
Authors
Gunnar Morling, Hardy Ferentschik

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final CascadingMetaData
private final int

Constructor Summary

AccessConstructor and Description
private
ParameterMetaData(int index, String name, Type type, Set<MetaConstraint<?>> constraints, Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData)

Method Summary

Modifier and TypeMethod and Description
public void
appendTo(PathImpl path)

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.appendTo.

Appends this cascadable element to the given path.
public ParameterDescriptor
asDescriptor(boolean
Whether the bean hosting the represented element has a redefined default group sequence or not.
defaultGroupSequenceRedefined
,
List<Class<?>>
The default group sequence of the bean hosting the represented element.
defaultGroupSequence
)

Implements org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.asDescriptor.

Returns this meta data object's corresponding representation in the descriptor model.
public Type
getCascadableType()

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadableType.

Returns the data type of this cascadable, e.g. the type of a bean property or the return type of a method.
public CascadingMetaData
getCascadingMetaData()

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadingMetaData.

Returns cascading metadata of this cascadable element.
public ConstraintLocation.ConstraintLocationKind
public int
public ElementKind
public Object
getValue(Object parent)

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getValue.

Returns the value of this cacadable from the given parent.
Inherited from org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData:
asContainerElementTypeDescriptorsasDescriptorsequalsgetAllConstraintsgetContainerElementsConstraintsgetDirectConstraintsgetNamegetTypehashCodeisCascadingisConstrainediteratortoString

Field Detail

cascadingMetaDataback to summary
private final CascadingMetaData cascadingMetaData
indexback to summary
private final int index

Constructor Detail

ParameterMetaDataback to summary
private ParameterMetaData(int index, String name, Type type, Set<MetaConstraint<?>> constraints, Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData)

Method Detail

appendToback to summary
public void appendTo(PathImpl path)

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.appendTo.

Doc from org.hibernate.validator.internal.metadata.facets.Cascadable.appendTo.

Appends this cascadable element to the given path.

Annotations
@Override
asDescriptorback to summary
public ParameterDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)

Implements org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.asDescriptor.

Doc from org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.asDescriptor.

Returns this meta data object's corresponding representation in the descriptor model.

Parameters
defaultGroupSequenceRedefined:boolean

Whether the bean hosting the represented element has a redefined default group sequence or not.

defaultGroupSequence:List<Class<?>>

The default group sequence of the bean hosting the represented element.

Returns:ParameterDescriptor

This meta data object's corresponding descriptor model representation. Implementations should return a specific sub type of ElementDescriptor.

Annotations
@Override
getCascadableTypeback to summary
public Type getCascadableType()

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadableType.

Doc from org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadableType.

Returns the data type of this cascadable, e.g. the type of a bean property or the return type of a method.

Returns:Type

This cascadable type.

Annotations
@Override
getCascadingMetaDataback to summary
public CascadingMetaData getCascadingMetaData()

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadingMetaData.

Doc from org.hibernate.validator.internal.metadata.facets.Cascadable.getCascadingMetaData.

Returns cascading metadata of this cascadable element. Also contains the cascading metadata of the potential container element types.

Annotations
@Override
getConstraintLocationKindback to summary
public ConstraintLocation.ConstraintLocationKind getConstraintLocationKind()

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getConstraintLocationKind.

Doc from org.hibernate.validator.internal.metadata.facets.Cascadable.getConstraintLocationKind.

Returns the constraint location kind of the cascadable.

Returns:ConstraintLocation.ConstraintLocationKind

Returns the constraint location kind of the cascadable.

Annotations
@Override
getIndexback to summary
public int getIndex()
getKindback to summary
public ElementKind getKind()

Implements org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.getKind.

Doc from org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData.getKind.

Returns the kind of this meta data object.

Returns:ElementKind

The kind of this meta data object.

Annotations
@Override
getValueback to summary
public Object getValue(Object parent)

Implements org.hibernate.validator.internal.metadata.facets.Cascadable.getValue.

Doc from org.hibernate.validator.internal.metadata.facets.Cascadable.getValue.

Returns the value of this cacadable from the given parent.

Annotations
@Override
org.hibernate.validator.internal.metadata.aggregated back to summary

public Class ParameterMetaData.Builder

extends MetaDataBuilder
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Callable
private CascadingMetaDataBuilder
private final int
private final ExecutableParameterNameProvider
private final Type
Inherited from org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder:
constraintCreationContext

Constructor Summary

AccessConstructor and Description
public
Builder(Class<?> beanClass, ConstrainedParameter constrainedParameter, ConstraintCreationContext constraintCreationContext, ExecutableParameterNameProvider parameterNameProvider)

Method Summary

Modifier and TypeMethod and Description
public boolean
accepts(ConstrainedElement
The element to check.
constrainedElement
)

Implements abstract org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.accepts.

Whether this builder allows to add the given element or not.
public void
add(ConstrainedElement
The element to add.
constrainedElement
)

Overrides org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.add.

Adds the given element to this builder.
public ParameterMetaData
build()

Implements abstract org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.build.

Creates a new, read-only ConstraintMetaData object with all constraint information related to the method or property represented by this builder.
Inherited from org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder:
adaptConstraintsadaptOriginsAndImplicitGroupsgetBeanClassgetContainerElementConstraintsgetDirectConstraintsisCascading

Field Detail

callableForNameRetrievalback to summary
private Callable callableForNameRetrieval
cascadingMetaDataBuilderback to summary
private CascadingMetaDataBuilder cascadingMetaDataBuilder
parameterIndexback to summary
private final int parameterIndex
parameterNameProviderback to summary
private final ExecutableParameterNameProvider parameterNameProvider
parameterTypeback to summary
private final Type parameterType

Constructor Detail

Builderback to summary
public Builder(Class<?> beanClass, ConstrainedParameter constrainedParameter, ConstraintCreationContext constraintCreationContext, ExecutableParameterNameProvider parameterNameProvider)

Method Detail

acceptsback to summary
public boolean accepts(ConstrainedElement constrainedElement)

Implements abstract org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.accepts.

Doc from org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.accepts.

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.

Parameters
constrainedElement:ConstrainedElement

The element to check.

Returns:boolean

true if the given element can be added to this builder, false otherwise.

Annotations
@Override
addback to summary
public void add(ConstrainedElement constrainedElement)

Overrides org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.add.

Doc from org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.add.

Adds the given element to this builder. It must be checked with accepts(ConstrainedElement) before, whether this is allowed or not.

Parameters
constrainedElement:ConstrainedElement

The element to add.

Annotations
@Override
buildback to summary
public ParameterMetaData build()

Implements abstract org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.build.

Doc from org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder.build.

Creates a new, read-only ConstraintMetaData object with all constraint information related to the method or property represented by this builder.

Returns:ParameterMetaData

A ConstraintMetaData object.

Annotations
@Override