Class ReturnValueMetaData
java.lang.Object
org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
org.hibernate.validator.internal.metadata.aggregated.ReturnValueMetaData
- All Implemented Interfaces:
Iterable<MetaConstraint<?>>,ConstraintMetaData,Cascadable,Validatable
public class ReturnValueMetaData
extends AbstractConstraintMetaData
implements Validatable, Cascadable
Represents the constraint related meta data of the return value of a method
or constructor.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.validator.internal.metadata.facets.Cascadable
Cascadable.Builder -
Constructor Summary
ConstructorsConstructorDescriptionReturnValueMetaData(Type type, Set<MetaConstraint<?>> constraints, Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends this cascadable element to the given path.asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) Returns this meta data object's corresponding representation in the descriptor model.Returns the cascaded elements of this validatable, e.g.Returns the data type of this cascadable, e.g.Returns cascading metadata of this cascadable element.Returns the constraint location kind of the cascadable.getKind()Returns thekindof this meta data object.Returns the value of this cacadable from the given parent.booleanReturnstrueif this validatable has at least one cascadable element,falseotherwise.Methods inherited from class org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
asContainerElementTypeDescriptors, asDescriptors, equals, getAllConstraints, getContainerElementsConstraints, getDirectConstraints, getName, getType, hashCode, isCascading, isConstrained, iterator, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ReturnValueMetaData
public ReturnValueMetaData(Type type, Set<MetaConstraint<?>> constraints, Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData)
-
-
Method Details
-
getCascadables
Description copied from interface:ValidatableReturns the cascaded elements of this validatable, e.g. the properties of a bean or the parameters of a method annotated with@Valid.- Specified by:
getCascadablesin interfaceValidatable- Returns:
- The cascaded elements of this validatable.
-
hasCascadables
public boolean hasCascadables()Description copied from interface:ValidatableReturnstrueif this validatable has at least one cascadable element,falseotherwise.- Specified by:
hasCascadablesin interfaceValidatable
-
getConstraintLocationKind
Description copied from interface:CascadableReturns the constraint location kind of the cascadable.- Specified by:
getConstraintLocationKindin interfaceCascadable- Returns:
- Returns the constraint location kind of the cascadable.
-
asDescriptor
public ReturnValueDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) Description copied from interface:ConstraintMetaDataReturns this meta data object's corresponding representation in the descriptor model.- Specified by:
asDescriptorin interfaceConstraintMetaData- 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.
-
getValue
Description copied from interface:CascadableReturns the value of this cacadable from the given parent.- Specified by:
getValuein interfaceCascadable
-
getCascadableType
Description copied from interface:CascadableReturns the data type of this cascadable, e.g. the type of a bean property or the return type of a method.- Specified by:
getCascadableTypein interfaceCascadable- Returns:
- This cascadable type.
-
appendTo
Description copied from interface:CascadableAppends this cascadable element to the given path.- Specified by:
appendToin interfaceCascadable
-
getCascadingMetaData
Description copied from interface:CascadableReturns cascading metadata of this cascadable element. Also contains the cascading metadata of the potential container element types.- Specified by:
getCascadingMetaDatain interfaceCascadable
-
getKind
Description copied from interface:ConstraintMetaDataReturns thekindof this meta data object.- Specified by:
getKindin interfaceConstraintMetaData- Returns:
- The
kindof this meta data object.
-