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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder -
Constructor Summary
ConstructorsConstructorDescriptionExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence) -
Method Summary
Modifier and TypeMethodDescriptionReturns a descriptor containing the cross-parameter constraints of this executable.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 a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.Returns a descriptor for this executable's return value.booleanReturnstrueif 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 constraintbooleanReturnstrueif the executable return value is constrained either: because of a constraint on the return value because validation is cascaded on the return value (viaValid)booleanisGetter()toString()Methods inherited from class org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
findConstraints, getConstraintDescriptors, getElementClass, hasConstraintsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.validation.metadata.ElementDescriptor
getElementClassMethods inherited from interface jakarta.validation.metadata.ExecutableDescriptor
findConstraints, getConstraintDescriptors, hasConstraints
-
Constructor Details
-
ExecutableDescriptorImpl
public ExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence)
-
-
Method Details
-
getName
Description copied from interface:ExecutableDescriptorReturns 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:
getNamein interfaceExecutableDescriptor- Returns:
- the name of the executable represented by this descriptor
-
getParameterDescriptors
Description copied from interface:ExecutableDescriptorReturns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.- Specified by:
getParameterDescriptorsin interfaceExecutableDescriptor- 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
Description copied from interface:ExecutableDescriptorReturns 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:
getReturnValueDescriptorin interfaceExecutableDescriptor- Returns:
- a descriptor for this executable's return value
-
hasConstrainedParameters
public boolean hasConstrainedParameters()Description copied from interface:ExecutableDescriptorReturnstrueif 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.- Specified by:
hasConstrainedParametersin interfaceExecutableDescriptor- Returns:
trueif the executable parameters are constrained
-
hasConstrainedReturnValue
public boolean hasConstrainedReturnValue()Description copied from interface:ExecutableDescriptorReturnstrueif 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.- Specified by:
hasConstrainedReturnValuein interfaceExecutableDescriptor- Returns:
trueif the executable return value is constrained
-
getCrossParameterDescriptor
Description copied from interface:ExecutableDescriptorReturns a descriptor containing the cross-parameter constraints of this executable.- Specified by:
getCrossParameterDescriptorin interfaceExecutableDescriptor- Returns:
- a descriptor containing the cross-parameter constraints of this executable
-
toString
-
isGetter
public boolean isGetter()
-