Class ExecutableDescriptorImpl

java.lang.Object
org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
org.hibernate.validator.internal.metadata.descriptor.ExecutableDescriptorImpl
All Implemented Interfaces:
ConstructorDescriptor, ElementDescriptor, ExecutableDescriptor, MethodDescriptor, Serializable

public class ExecutableDescriptorImpl extends ElementDescriptorImpl implements ConstructorDescriptor, MethodDescriptor
Describes a validated constructor or method.
Author:
Gunnar Morling
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: ExecutableDescriptor
      Returns the method name in case this descriptor represents a method or the non-qualified name of the declaring class in case this descriptor represents a constructor.
      Specified by:
      getName in interface ExecutableDescriptor
      Returns:
      the name of the executable represented by this descriptor
    • getParameterDescriptors

      public List<ParameterDescriptor> getParameterDescriptors()
      Description copied from interface: ExecutableDescriptor
      Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.
      Specified by:
      getParameterDescriptors in interface ExecutableDescriptor
      Returns:
      a list of descriptors representing this executable's parameters; an empty list will be returned if this executable has no parameters, but never null
    • getReturnValueDescriptor

      public ReturnValueDescriptor getReturnValueDescriptor()
      Description copied from interface: ExecutableDescriptor
      Returns a descriptor for this executable's return value.

      An executable without return value will return a descriptor representing void. This descriptor will have no constraint associated.

      Specified by:
      getReturnValueDescriptor in interface ExecutableDescriptor
      Returns:
      a descriptor for this executable's return value
    • hasConstrainedParameters

      public boolean hasConstrainedParameters()
      Description copied from interface: ExecutableDescriptor
      Returns true if the executable parameters are constrained either:
      • because of a constraint on at least one of the parameters
      • because of a cascade on at least one of the parameters (via Valid)
      • because of at least one cross-parameter constraint

      Also returns false if there is no parameter.

      Specified by:
      hasConstrainedParameters in interface ExecutableDescriptor
      Returns:
      true if the executable parameters are constrained
    • hasConstrainedReturnValue

      public boolean hasConstrainedReturnValue()
      Description copied from interface: ExecutableDescriptor
      Returns true if the executable return value is constrained either:
      • because of a constraint on the return value
      • because validation is cascaded on the return value (via Valid)

      Also returns false if there is no return value.

      Specified by:
      hasConstrainedReturnValue in interface ExecutableDescriptor
      Returns:
      true if the executable return value is constrained
    • getCrossParameterDescriptor

      public CrossParameterDescriptor getCrossParameterDescriptor()
      Description copied from interface: ExecutableDescriptor
      Returns a descriptor containing the cross-parameter constraints of this executable.
      Specified by:
      getCrossParameterDescriptor in interface ExecutableDescriptor
      Returns:
      a descriptor containing the cross-parameter constraints of this executable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isGetter

      public boolean isGetter()