org.hibernate.validator.internal.cfg.context
Class ReturnValueConstraintMappingContextImpl
java.lang.Object
org.hibernate.validator.internal.cfg.context.ConstraintMappingContextImplBase
org.hibernate.validator.internal.cfg.context.ReturnValueConstraintMappingContextImpl
- All Implemented Interfaces:
- Cascadable<ReturnValueConstraintMappingContext>, Constrainable<ReturnValueConstraintMappingContext>, MethodTarget, ParameterTarget, ReturnValueConstraintMappingContext, TypeTarget
public final class ReturnValueConstraintMappingContextImpl
- extends ConstraintMappingContextImplBase
- implements ReturnValueConstraintMappingContext
Constraint mapping creational context which allows to configure the constraints for one method return value.
- Author:
- Hardy Ferentschik, Gunnar Morling, Kevin Pollet (C) 2011 SERLI
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hibernate.validator.cfg.context.TypeTarget |
type |
ReturnValueConstraintMappingContextImpl
public ReturnValueConstraintMappingContextImpl(Class<?> beanClass,
Method method,
ConstraintMappingContext mapping)
constraint
public ReturnValueConstraintMappingContext constraint(ConstraintDef<?,?> definition)
- Description copied from interface:
Constrainable
- Adds a new constraint.
- Specified by:
constraint in interface Constrainable<ReturnValueConstraintMappingContext>
- Parameters:
definition - The constraint to add.
- Returns:
- The current creational context following the method chaining pattern.
valid
public ReturnValueConstraintMappingContext valid()
- Marks the current property as cascadable.
- Specified by:
valid in interface Cascadable<ReturnValueConstraintMappingContext>
- Returns:
- Returns itself for method chaining.
parameter
public ParameterConstraintMappingContext parameter(int index)
- Changes the parameter for which added constraints apply.
- Specified by:
parameter in interface ParameterTarget
- Parameters:
index - The parameter index.
- Returns:
- Returns a new
ConstraintsForTypeMethodElement instance allowing method chaining.
Copyright © 2007-2013 Red Hat, Inc. All Rights Reserved