Class PropertyDescriptorImpl
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
-
- org.hibernate.validator.internal.metadata.descriptor.PropertyDescriptorImpl
-
- All Implemented Interfaces:
CascadableDescriptor,ContainerDescriptor,ElementDescriptor,PropertyDescriptor,Serializable
public class PropertyDescriptorImpl extends ElementDescriptorImpl implements PropertyDescriptor
Describes a validated property.- Author:
- Emmanuel Bernard, Hardy Ferentschik, Guillaume Smet
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
-
-
Constructor Summary
Constructors Constructor Description PropertyDescriptorImpl(Type returnType, String propertyName, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean cascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence, Set<GroupConversionDescriptor> groupConversions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ContainerElementTypeDescriptor>getConstrainedContainerElementTypes()If this element is of a container type, e.g.Set<GroupConversionDescriptor>getGroupConversions()Returns the group conversions configured for this element.StringgetPropertyName()Name of the property according to the Java Bean specification.booleanisCascaded()Whether this element is marked for cascaded validation or not.StringtoString()-
Methods inherited from class org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.validation.metadata.ElementDescriptor
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
-
-
-
-
Constructor Detail
-
PropertyDescriptorImpl
public PropertyDescriptorImpl(Type returnType, String propertyName, Set<ConstraintDescriptorImpl<?>> constraints, Set<ContainerElementTypeDescriptor> constrainedContainerElementTypes, boolean cascaded, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence, Set<GroupConversionDescriptor> groupConversions)
-
-
Method Detail
-
getPropertyName
public String getPropertyName()
Description copied from interface:PropertyDescriptorName of the property according to the Java Bean specification.- Specified by:
getPropertyNamein interfacePropertyDescriptor- Returns:
- property name
-
getConstrainedContainerElementTypes
public Set<ContainerElementTypeDescriptor> getConstrainedContainerElementTypes()
Description copied from interface:ContainerDescriptorIf this element is of a container type, e.g.ListorMap, a set of descriptors of those container element types is returned, which are constrained or marked withValid. 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.
- Specified by:
getConstrainedContainerElementTypesin interfaceContainerDescriptor- Returns:
- 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 withValid.
-
isCascaded
public boolean isCascaded()
Description copied from interface:CascadableDescriptorWhether this element is marked for cascaded validation or not.- Specified by:
isCascadedin interfaceCascadableDescriptor- Returns:
true, if this element is marked for cascaded validation,falseotherwise
-
getGroupConversions
public Set<GroupConversionDescriptor> getGroupConversions()
Description copied from interface:CascadableDescriptorReturns the group conversions configured for this element.- Specified by:
getGroupConversionsin interfaceCascadableDescriptor- Returns:
- a set containing this element's group conversions; an empty set
may be returned if no conversions are configured but never
null
-
-