Class ExecutableMetaData
java.lang.Object
org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData
- All Implemented Interfaces:
Iterable<MetaConstraint<?>>,ConstraintMetaData
An aggregated view of the constraint related meta data for a given method or
constructors and in (case of methods) all the methods in the inheritance
hierarchy which it overrides or implements.
Instances are retrieved by creating a ExecutableMetaData.Builder and adding all required
ConstrainedExecutable objects to it. Instances are read-only after
creation.
Identity is solely based on the method's name and parameter types, hence sets and similar collections of this type may only be created in the scope of one Java type.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionasDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) Returns this meta data object's corresponding representation in the descriptor model.booleanSet<MetaConstraint<?>>Returns the cross-parameter constraints declared for the represented method or constructor.getKind()Returns thekindof this meta data object.getParameterMetaData(int parameterIndex) Returns meta data for the specified parameter of the represented executable.Class<?>[]Returns the signature(s) of the method represented by this meta data object, based on the represented executable's name and its parameter types.inthashCode()toString()Methods inherited from class org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
asContainerElementTypeDescriptors, asDescriptors, getAllConstraints, getContainerElementsConstraints, getDirectConstraints, getName, getType, isCascading, isConstrained, iteratorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getParameterMetaData
Returns meta data for the specified parameter of the represented executable.- Parameters:
parameterIndex- the index of the parameter- Returns:
- Meta data for the specified parameter. Will never be
null.
-
getParameterTypes
-
getSignatures
Returns the signature(s) of the method represented by this meta data object, based on the represented executable's name and its parameter types.- Returns:
- The signatures of this meta data object. Will only contain more than one element in case the represented method represents a sub-type method overriding a super-type method using a generic type parameter in its parameters.
-
getCrossParameterConstraints
Returns the cross-parameter constraints declared for the represented method or constructor.- Returns:
- the cross-parameter constraints declared for the represented
method or constructor. May be empty but will never be
null.
-
getValidatableParametersMetaData
-
getReturnValueMetaData
-
asDescriptor
public ExecutableDescriptorImpl asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) Description copied from interface:ConstraintMetaDataReturns this meta data object's corresponding representation in the descriptor model.- Parameters:
defaultGroupSequenceRedefined- Whether the bean hosting the represented element has a redefined default group sequence or not.defaultGroupSequence- The default group sequence of the bean hosting the represented element.- Returns:
- This meta data object's corresponding descriptor model
representation. Implementations should return a specific sub type
of
ElementDescriptor.
-
getKind
Description copied from interface:ConstraintMetaDataReturns thekindof this meta data object.- Returns:
- The
kindof this meta data object.
-
toString
- Overrides:
toStringin classAbstractConstraintMetaData
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractConstraintMetaData
-
equals
- Overrides:
equalsin classAbstractConstraintMetaData
-