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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
-
-
Constructor Summary
Constructors Constructor Description ExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CrossParameterDescriptorgetCrossParameterDescriptor()Returns a descriptor containing the cross-parameter constraints of this executable.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.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)booleanisGetter()StringtoString()-
Methods inherited from class org.hibernate.validator.internal.metadata.descriptor.ElementDescriptorImpl
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.validation.metadata.ElementDescriptor
getElementClass
-
Methods inherited from interface jakarta.validation.metadata.ExecutableDescriptor
findConstraints, getConstraintDescriptors, hasConstraints
-
-
-
-
Constructor Detail
-
ExecutableDescriptorImpl
public ExecutableDescriptorImpl(Type returnType, String name, Set<ConstraintDescriptorImpl<?>> crossParameterConstraints, ReturnValueDescriptor returnValueDescriptor, List<ParameterDescriptor> parameters, boolean defaultGroupSequenceRedefined, boolean isGetter, List<Class<?>> defaultGroupSequence)
-
-
Method Detail
-
getName
public String 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
public List<ParameterDescriptor> 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
public ReturnValueDescriptor 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
public CrossParameterDescriptor 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
-
isGetter
public boolean isGetter()
-
-