Interface TypeElementPropertyDescriptor
-
- All Known Implementing Classes:
TypeElementPropertyDescriptorImpl
public interface TypeElementPropertyDescriptorDescribes a TypeElement property hosting validation constraints.Constraints placed on the attribute and the getter of a given property are all referenced.
- Author:
- Manfred Tremmel
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getPropertyName
String getPropertyName()
Name of the property according to the Java Bean specification.- Returns:
- property name
-
getElementType
TypeMirror getElementType()
get element type.- Returns:
- the statically defined returned type
-
getConstraintDescriptors
List<TypeElementConstraintDescriptor<?>> getConstraintDescriptors()
Returns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.- Returns:
Setof constraint descriptors for this element
-
isCascaded
boolean isCascaded()
Whether this element is marked for cascaded validation or not.- Returns:
true, if this element is marked for cascaded validation,falseotherwise
-
getConstrainedContainerElementTypes
List<TypeElementConstraintDescriptor<?>> getConstrainedContainerElementTypes()
If 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.
- 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.
-
-