Interface TypeElementPropertyDescriptor

All Known Implementing Classes:
TypeElementPropertyDescriptorImpl

public interface TypeElementPropertyDescriptor
Describes 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 Details

    • 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 empty Set if none are present.
      Returns:
      Set of 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, false otherwise
    • getConstrainedContainerElementTypes

      List<TypeElementConstraintDescriptor<?>> getConstrainedContainerElementTypes()
      If this element is of a container type, e.g. List or Map, a set of descriptors of those container element types is returned, which are constrained or marked with Valid. 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 with Valid.