org.hibernate.validator.cfg.context.impl
Class ParameterConstraintMappingContextImpl
java.lang.Object
org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
org.hibernate.validator.cfg.context.impl.ParameterConstraintMappingContextImpl
- All Implemented Interfaces:
- Cascadable<ParameterConstraintMappingContext>, Constrainable<ParameterConstraintMappingContext>, MethodTarget, ParameterConstraintMappingContext, ParameterTarget, ReturnValueTarget, TypeTarget
public final class ParameterConstraintMappingContextImpl
- extends ConstraintMappingContextImplBase
- implements ParameterConstraintMappingContext
Constraint mapping creational context which allows to configure the constraints for one method parameter.
- Author:
- Hardy Ferentschik, Gunnar Morling, Kevin Pollet - SERLI - (kevin.pollet@serli.com)
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 |
ParameterConstraintMappingContextImpl
public ParameterConstraintMappingContextImpl(Class<?> beanClass,
Method method,
int parameterIndex,
ConstraintMappingContext mapping)
constraint
public ParameterConstraintMappingContext constraint(ConstraintDef<?,?> definition)
- Description copied from interface:
Constrainable
- Adds a new constraint.
- Specified by:
constraint
in interface Constrainable<ParameterConstraintMappingContext>
- Parameters:
definition
- The constraint to add.
- Returns:
- The current creational context following the method chaining pattern.
valid
public ParameterConstraintMappingContext valid()
- Marks the currently selected method parameter as cascadable.
- Specified by:
valid
in interface Cascadable<ParameterConstraintMappingContext>
- 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.
returnValue
public ReturnValueConstraintMappingContext returnValue()
- Defines constraints on the return value of the current method.
- Specified by:
returnValue
in interface ReturnValueTarget
- Returns:
- Returns a new
ConstraintsForTypeMethodElement
instance allowing method chaining.
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved