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

public Class PropertyDescriptorImpl

extends ElementDescriptorImpl
implements PropertyDescriptor
Class Inheritance
All Implemented Interfaces
jakarta.validation.metadata.PropertyDescriptor, 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, .PropertyDescriptor, org.hibernate.validator.internal.util.CollectionHelper, org.hibernate.validator.internal.util.stereotypes.Immutable

Describes a validated property.
Authors
Emmanuel Bernard, Hardy Ferentschik, Guillaume Smet

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
PropertyDescriptorImpl(Type returnType, String propertyName, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean cascaded, 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 String
getPropertyName()

Implements jakarta.validation.metadata.PropertyDescriptor.getPropertyName.

Name of the property according to the Java Bean specification.
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
propertyNameback to summary
private final String propertyName

Constructor Detail

PropertyDescriptorImplback to summary
public PropertyDescriptorImpl(Type returnType, String propertyName, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean cascaded, 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
getPropertyNameback to summary
public String getPropertyName()

Implements jakarta.validation.metadata.PropertyDescriptor.getPropertyName.

Doc from jakarta.validation.metadata.PropertyDescriptor.getPropertyName.

Name of the property according to the Java Bean specification.

Returns:String

property 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