Top Description Fields Constructors Methods
org.hibernate.validator.internal.metadata.descriptor

public Class ExecutableDescriptorImpl

extends ElementDescriptorImpl
implements ConstructorDescriptor, MethodDescriptor
Class Inheritance
All Implemented Interfaces
jakarta.validation.metadata.MethodDescriptor, jakarta.validation.metadata.ExecutableDescriptor, jakarta.validation.metadata.ElementDescriptor, jakarta.validation.metadata.ConstructorDescriptor
Imports
java.lang.reflect.Type, java.util.Collections, .List, .Set, jakarta.validation.metadata.ConstructorDescriptor, .CrossParameterDescriptor, .MethodDescriptor, .ParameterDescriptor, .ReturnValueDescriptor, org.hibernate.validator.internal.util.CollectionHelper, org.hibernate.validator.internal.util.stereotypes.Immutable

Describes a validated constructor or method.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
private final CrossParameterDescriptor
private final boolean
private final String
private final List<ParameterDescriptor>
private final ReturnValueDescriptor

Constructor Summary

AccessConstructor and Description
public
ExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence)

Method Summary

Modifier and TypeMethod and Description
public CrossParameterDescriptor
getCrossParameterDescriptor()

Implements jakarta.validation.metadata.ExecutableDescriptor.getCrossParameterDescriptor.

Returns a descriptor containing the cross-parameter constraints of this executable.
public String
getName()

Implements jakarta.validation.metadata.ExecutableDescriptor.getName.

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.
public List<ParameterDescriptor>
getParameterDescriptors()

Implements jakarta.validation.metadata.ExecutableDescriptor.getParameterDescriptors.

Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.
public ReturnValueDescriptor
getReturnValueDescriptor()

Implements jakarta.validation.metadata.ExecutableDescriptor.getReturnValueDescriptor.

Returns a descriptor for this executable's return value.
public boolean
hasConstrainedParameters()

Implements jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedParameters.

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
public boolean
hasConstrainedReturnValue()

Implements jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedReturnValue.

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)
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl:
findConstraintsgetConstraintDescriptorsgetElementClasshasConstraints

Field Detail

crossParameterDescriptorback to summary
private final CrossParameterDescriptor crossParameterDescriptor
isGetterback to summary
private final boolean isGetter
nameback to summary
private final String name
parametersback to summary
private final List<ParameterDescriptor> parameters
Annotations
@Immutable
returnValueDescriptorback to summary
private final ReturnValueDescriptor returnValueDescriptor

Constructor Detail

ExecutableDescriptorImplback to summary
public ExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence)

Method Detail

getCrossParameterDescriptorback to summary
public CrossParameterDescriptor getCrossParameterDescriptor()

Implements jakarta.validation.metadata.ExecutableDescriptor.getCrossParameterDescriptor.

Doc from jakarta.validation.metadata.ExecutableDescriptor.getCrossParameterDescriptor.

Returns a descriptor containing the cross-parameter constraints of this executable.

Returns:CrossParameterDescriptor

a descriptor containing the cross-parameter constraints of this executable

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.validation.metadata.ExecutableDescriptor.getName.

Doc from jakarta.validation.metadata.ExecutableDescriptor.getName.

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.

Returns:String

the name of the executable represented by this descriptor

Annotations
@Override
getParameterDescriptorsback to summary
public List<ParameterDescriptor> getParameterDescriptors()

Implements jakarta.validation.metadata.ExecutableDescriptor.getParameterDescriptors.

Doc from jakarta.validation.metadata.ExecutableDescriptor.getParameterDescriptors.

Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.

Returns:List<ParameterDescriptor>

a list of descriptors representing this executable's parameters; an empty list will be returned if this executable has no parameters, but never null

Annotations
@Override
getReturnValueDescriptorback to summary
public ReturnValueDescriptor getReturnValueDescriptor()

Implements jakarta.validation.metadata.ExecutableDescriptor.getReturnValueDescriptor.

Doc from jakarta.validation.metadata.ExecutableDescriptor.getReturnValueDescriptor.

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.

Returns:ReturnValueDescriptor

a descriptor for this executable's return value

Annotations
@Override
hasConstrainedParametersback to summary
public boolean hasConstrainedParameters()

Implements jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedParameters.

Doc from jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedParameters.

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.

Returns:boolean

true if the executable parameters are constrained

Annotations
@Override
hasConstrainedReturnValueback to summary
public boolean hasConstrainedReturnValue()

Implements jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedReturnValue.

Doc from jakarta.validation.metadata.ExecutableDescriptor.hasConstrainedReturnValue.

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.

Returns:boolean

true if the executable return value is constrained

Annotations
@Override
isGetterback to summary
public boolean isGetter()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override