Class TypeElementPropertyDescriptorImpl
java.lang.Object
de.knightsoftnet.validators.annotation.processor.TypeElementPropertyDescriptorImpl
- All Implemented Interfaces:
TypeElementPropertyDescriptor
public class TypeElementPropertyDescriptorImpl
extends Object
implements TypeElementPropertyDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionTypeElementPropertyDescriptorImpl(Element typeElement, DeclaredType beanType, ProcessingEnvironment processingEnv, org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind constraintLocationKind) constructor. -
Method Summary
Modifier and TypeMethodDescriptionIf this element is of a container type, e.g.Returns all constraint descriptors for this element in the class hierarchy or an emptySetif none are present.get element type.Name of the property according to the Java Bean specification.booleanWhether this element is marked for cascaded validation or not.
-
Constructor Details
-
TypeElementPropertyDescriptorImpl
public TypeElementPropertyDescriptorImpl(Element typeElement, DeclaredType beanType, ProcessingEnvironment processingEnv, org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind constraintLocationKind) constructor.- Parameters:
typeElement- the element to get data from.beanType- declared type of the bean to get data fromprocessingEnv- to get utility for elements and typesconstraintLocationKind- where annotation is located
-
-
Method Details
-
getPropertyName
Description copied from interface:TypeElementPropertyDescriptorName of the property according to the Java Bean specification.- Specified by:
getPropertyNamein interfaceTypeElementPropertyDescriptor- Returns:
- property name
-
getElementType
Description copied from interface:TypeElementPropertyDescriptorget element type.- Specified by:
getElementTypein interfaceTypeElementPropertyDescriptor- Returns:
- the statically defined returned type
-
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
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.
-