Class ParameterDescriptorImpl

java.lang.Object
org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
org.hibernate.validator.internal.metadata.descriptor.ParameterDescriptorImpl
All Implemented Interfaces:
CascadableDescriptor, ContainerDescriptor, ElementDescriptor, ParameterDescriptor, Serializable

public class ParameterDescriptorImpl extends ElementDescriptorImpl implements ParameterDescriptor
Describes a validated method parameter.
Author:
Gunnar Morling, Hardy Ferentschik, Guillaume Smet
See Also:
  • Constructor Details

  • Method Details

    • getIndex

      public int getIndex()
      Description copied from interface: ParameterDescriptor
      Returns this parameter's index within the parameter array of the method or constructor holding it.
      Specified by:
      getIndex in interface ParameterDescriptor
      Returns:
      this parameter's index
    • getConstrainedContainerElementTypes

      public Set<ContainerElementTypeDescriptor> getConstrainedContainerElementTypes()
      Description copied from interface: ContainerDescriptor
      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.

      Specified by:
      getConstrainedContainerElementTypes in interface ContainerDescriptor
      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.
    • getName

      public String getName()
      Description copied from interface: ParameterDescriptor
      Returns this parameter's name as retrieved by the current parameter name resolver.
      Specified by:
      getName in interface ParameterDescriptor
      Returns:
      this parameter's name
    • isCascaded

      public boolean isCascaded()
      Description copied from interface: CascadableDescriptor
      Whether this element is marked for cascaded validation or not.
      Specified by:
      isCascaded in interface CascadableDescriptor
      Returns:
      true, if this element is marked for cascaded validation, false otherwise
    • getGroupConversions

      public Set<GroupConversionDescriptor> getGroupConversions()
      Description copied from interface: CascadableDescriptor
      Returns the group conversions configured for this element.
      Specified by:
      getGroupConversions in interface CascadableDescriptor
      Returns:
      a set containing this element's group conversions; an empty set may be returned if no conversions are configured but never null
    • toString

      public String toString()
      Overrides:
      toString in class Object