Class ElementDescriptorImpl
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
-
- All Implemented Interfaces:
ElementDescriptor,Serializable
- Direct Known Subclasses:
BeanDescriptorImpl,ClassDescriptorImpl,ContainerElementTypeDescriptorImpl,CrossParameterDescriptorImpl,ExecutableDescriptorImpl,ParameterDescriptorImpl,PropertyDescriptorImpl,ReturnValueDescriptorImpl
public abstract class ElementDescriptorImpl extends Object implements ElementDescriptor, Serializable
Describes a validated element (class, field or property).- Author:
- Emmanuel Bernard, Hardy Ferentschik, Gunnar Morling
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
-
-
Constructor Summary
Constructors Constructor Description ElementDescriptorImpl(Type type, Set<ConstraintDescriptorImpl<?>> constraintDescriptors, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementDescriptor.ConstraintFinderfindConstraints()Finds constraints and potentially restricts them to certain criteria.Set<ConstraintDescriptor<?>>getConstraintDescriptors()Returns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.Class<?>getElementClass()booleanhasConstraints()
-
-
-
Constructor Detail
-
ElementDescriptorImpl
public ElementDescriptorImpl(Type type, Set<ConstraintDescriptorImpl<?>> constraintDescriptors, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
-
-
Method Detail
-
hasConstraints
public final boolean hasConstraints()
- Specified by:
hasConstraintsin interfaceElementDescriptor- Returns:
- returns
trueif at least one constraint declaration is present for this element in the class hierarchy,falseotherwise
-
getElementClass
public final Class<?> getElementClass()
- Specified by:
getElementClassin interfaceElementDescriptor- Returns:
- the statically defined returned type
-
getConstraintDescriptors
public final Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Description copied from interface:ElementDescriptorReturns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.- Specified by:
getConstraintDescriptorsin interfaceElementDescriptor- Returns:
Setof constraint descriptors for this element
-
findConstraints
public final ElementDescriptor.ConstraintFinder findConstraints()
Description copied from interface:ElementDescriptorFinds constraints and potentially restricts them to certain criteria.- Specified by:
findConstraintsin interfaceElementDescriptor- Returns:
ConstraintFinderobject
-
-