Top Description Fields Constructors Methods
org.hibernate.validator.internal.metadata.descriptor

public Class ParameterDescriptorImpl

extends ElementDescriptorImpl
implements ParameterDescriptor
Class Inheritance
All Implemented Interfaces
jakarta.validation.metadata.ParameterDescriptor, jakarta.validation.metadata.ContainerDescriptor, jakarta.validation.metadata.CascadableDescriptor, jakarta.validation.metadata.ElementDescriptor
Imports
java.lang.reflect.Type, java.util.List, .Set, jakarta.validation.metadata.ContainerElementTypeDescriptor, .GroupConversionDescriptor, .ParameterDescriptor, org.hibernate.validator.internal.util.CollectionHelper, org.hibernate.validator.internal.util.stereotypes.Immutable

Describes a validated method parameter.
Authors
Gunnar Morling, Hardy Ferentschik, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final boolean
private final Set<ContainerElementTypeDescriptor>
private final Set<GroupConversionDescriptor>
private final int
private final String

Constructor Summary

AccessConstructor and Description
public
ParameterDescriptorImpl(Type type, int index, String name, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean isCascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence, Set<GroupConversionDescriptor> groupConversions)

Method Summary

Modifier and TypeMethod and Description
public Set<ContainerElementTypeDescriptor>
getConstrainedContainerElementTypes()

Implements jakarta.validation.metadata.ContainerDescriptor.getConstrainedContainerElementTypes.

If this element is of a container type, e.g. List or Map, a set of descriptors of those container element types is returned, which are constrained or marked with Valid.
public Set<GroupConversionDescriptor>
getGroupConversions()

Implements jakarta.validation.metadata.CascadableDescriptor.getGroupConversions.

Returns the group conversions configured for this element.
public int
getIndex()

Implements jakarta.validation.metadata.ParameterDescriptor.getIndex.

Returns this parameter's index within the parameter array of the method or constructor holding it.
public String
getName()

Implements jakarta.validation.metadata.ParameterDescriptor.getName.

Returns this parameter's name as retrieved by the current parameter name resolver.
public boolean
isCascaded()

Implements jakarta.validation.metadata.CascadableDescriptor.isCascaded.

Whether this element is marked for cascaded validation or not.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl:
findConstraintsgetConstraintDescriptorsgetElementClasshasConstraints

Field Detail

cascadedback to summary
private final boolean cascaded
constrainedContainerElementTypesback to summary
private final Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes
Annotations
@Immutable
groupConversionsback to summary
private final Set<GroupConversionDescriptor> groupConversions
Annotations
@Immutable
indexback to summary
private final int index
nameback to summary
private final String name

Constructor Detail

ParameterDescriptorImplback to summary
public ParameterDescriptorImpl(Type type, int index, String name, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean isCascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence, Set<GroupConversionDescriptor> groupConversions)

Method Detail

getConstrainedContainerElementTypesback to summary
public Set<ContainerElementTypeDescriptor> getConstrainedContainerElementTypes()

Implements jakarta.validation.metadata.ContainerDescriptor.getConstrainedContainerElementTypes.

Doc from jakarta.validation.metadata.ContainerDescriptor.getConstrainedContainerElementTypes.

If this element is of a container type, e.g. List or Map, a set of descriptors of those container element types is returned, which are constrained or marked with Valid. A container element type is constrained, if it hosts at least one constraint.

In the context of properties and method return values, container element types of super-types are considered.

Returns:Set<ContainerElementTypeDescriptor>

the set of descriptors representing the container element types that are constrained or are marked with Valid. An empty set will be returned if this element is not of a container type or is of a container type but there are no container element types hosting constraints or marked with Valid.

Annotations
@Override
getGroupConversionsback to summary
public Set<GroupConversionDescriptor> getGroupConversions()

Implements jakarta.validation.metadata.CascadableDescriptor.getGroupConversions.

Doc from jakarta.validation.metadata.CascadableDescriptor.getGroupConversions.

Returns the group conversions configured for this element.

Returns:Set<GroupConversionDescriptor>

a set containing this element's group conversions; an empty set may be returned if no conversions are configured but never null

Annotations
@Override
getIndexback to summary
public int getIndex()

Implements jakarta.validation.metadata.ParameterDescriptor.getIndex.

Doc from jakarta.validation.metadata.ParameterDescriptor.getIndex.

Returns this parameter's index within the parameter array of the method or constructor holding it.

Returns:int

this parameter's index

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.validation.metadata.ParameterDescriptor.getName.

Doc from jakarta.validation.metadata.ParameterDescriptor.getName.

Returns this parameter's name as retrieved by the current parameter name resolver.

Returns:String

this parameter's name

Annotations
@Override
isCascadedback to summary
public boolean isCascaded()

Implements jakarta.validation.metadata.CascadableDescriptor.isCascaded.

Doc from jakarta.validation.metadata.CascadableDescriptor.isCascaded.

Whether this element is marked for cascaded validation or not.

Returns:boolean

true, if this element is marked for cascaded validation, false otherwise

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override