Package jakarta.validation.metadata
Interface ExecutableDescriptor
- 
- All Superinterfaces:
 ElementDescriptor
- All Known Subinterfaces:
 ConstructorDescriptor,MethodDescriptor
public interface ExecutableDescriptor extends ElementDescriptor
Provides the common functionality ofMethodDescriptorandConstructorDescriptor.- Since:
 - 1.1
 - Author:
 - Gunnar Morling
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface jakarta.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ElementDescriptor.ConstraintFinderfindConstraints()Returns a finder that will always return an emptySet.java.util.Set<ConstraintDescriptor<?>>getConstraintDescriptors()Returns an emptySet.CrossParameterDescriptorgetCrossParameterDescriptor()Returns a descriptor containing the cross-parameter constraints of this executable.java.lang.StringgetName()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.java.util.List<ParameterDescriptor>getParameterDescriptors()Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.ReturnValueDescriptorgetReturnValueDescriptor()Returns a descriptor for this executable's return value.booleanhasConstrainedParameters()Returnstrueif 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 (viaValid) because of at least one cross-parameter constraintbooleanhasConstrainedReturnValue()Returnstrueif the executable return value is constrained either: because of a constraint on the return value because validation is cascaded on the return value (viaValid)booleanhasConstraints()Returnsfalse.- 
Methods inherited from interface jakarta.validation.metadata.ElementDescriptor
getElementClass 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getName
java.lang.String 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:
 - the name of the executable represented by this descriptor
 
 
- 
getParameterDescriptors
java.util.List<ParameterDescriptor> getParameterDescriptors()
Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.- 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 
 
- 
getCrossParameterDescriptor
CrossParameterDescriptor getCrossParameterDescriptor()
Returns a descriptor containing the cross-parameter constraints of this executable.- Returns:
 - a descriptor containing the cross-parameter constraints of this executable
 
 
- 
getReturnValueDescriptor
ReturnValueDescriptor 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:
 - a descriptor for this executable's return value
 
 
- 
hasConstrainedParameters
boolean hasConstrainedParameters()
Returnstrueif 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
falseif there is no parameter.- Returns:
 trueif the executable parameters are constrained
 
- 
hasConstrainedReturnValue
boolean hasConstrainedReturnValue()
Returnstrueif 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
falseif there is no return value.- Returns:
 trueif the executable return value is constrained
 
- 
hasConstraints
boolean hasConstraints()
Returnsfalse.An executable per se does not host constraints, use
getParameterDescriptors(),getCrossParameterDescriptor()andgetReturnValueDescriptor()to discover constraints.- Specified by:
 hasConstraintsin interfaceElementDescriptor- Returns:
 false
 
- 
getConstraintDescriptors
java.util.Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Returns an emptySet.An executable per se does not host constraints, use
getParameterDescriptors(),getCrossParameterDescriptor()andgetReturnValueDescriptor()to discover constraints.- Specified by:
 getConstraintDescriptorsin interfaceElementDescriptor- Returns:
 - an empty 
Set 
 
- 
findConstraints
ElementDescriptor.ConstraintFinder findConstraints()
Returns a finder that will always return an emptySet.An executable per se does not host constraints, use
getParameterDescriptors(),getCrossParameterDescriptor()andgetReturnValueDescriptor()to discover constraints.- Specified by:
 findConstraintsin interfaceElementDescriptor- Returns:
 ConstraintFinderobject
 
 - 
 
 -