Class TypeElementPropertyDescriptorImpl
- java.lang.Object
-
- de.knightsoftnet.validators.annotation.processor.TypeElementPropertyDescriptorImpl
-
- All Implemented Interfaces:
TypeElementPropertyDescriptor
public class TypeElementPropertyDescriptorImpl extends Object implements TypeElementPropertyDescriptor
-
-
Constructor Summary
Constructors Constructor Description TypeElementPropertyDescriptorImpl(Element typeElement, Elements elementUtils, org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind constraintLocationKind)constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TypeElementConstraintDescriptor<?>>getConstrainedContainerElementTypes()If this element is of a container type, e.g.List<TypeElementConstraintDescriptor<?>>getConstraintDescriptors()Returns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.TypeMirrorgetElementType()get element type.StringgetPropertyName()Name of the property according to the Java Bean specification.booleanisCascaded()Whether this element is marked for cascaded validation or not.
-
-
-
Constructor Detail
-
TypeElementPropertyDescriptorImpl
public TypeElementPropertyDescriptorImpl(Element typeElement, Elements elementUtils, org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind constraintLocationKind)
constructor.- Parameters:
typeElement- the element to get data from.elementUtils- utility for elements
-
-
Method Detail
-
getPropertyName
public String getPropertyName()
Description copied from interface:TypeElementPropertyDescriptorName of the property according to the Java Bean specification.- Specified by:
getPropertyNamein interfaceTypeElementPropertyDescriptor- Returns:
- property name
-
getElementType
public TypeMirror getElementType()
Description copied from interface:TypeElementPropertyDescriptorget element type.- Specified by:
getElementTypein interfaceTypeElementPropertyDescriptor- Returns:
- the statically defined returned type
-
getConstraintDescriptors
public List<TypeElementConstraintDescriptor<?>> getConstraintDescriptors()
Description copied from interface:TypeElementPropertyDescriptorReturns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.- Specified by:
getConstraintDescriptorsin interfaceTypeElementPropertyDescriptor- Returns:
Setof constraint descriptors for this element
-
isCascaded
public boolean isCascaded()
Description copied from interface:TypeElementPropertyDescriptorWhether this element is marked for cascaded validation or not.- Specified by:
isCascadedin interfaceTypeElementPropertyDescriptor- Returns:
true, if this element is marked for cascaded validation,falseotherwise
-
getConstrainedContainerElementTypes
public List<TypeElementConstraintDescriptor<?>> getConstrainedContainerElementTypes()
Description copied from interface:TypeElementPropertyDescriptorIf 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 interfaceTypeElementPropertyDescriptor- 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.
-
-