public final class ParameterConstraintMappingContextImpl extends CascadableConstraintMappingContextImplBase<ParameterConstraintMappingContext> implements ParameterConstraintMappingContext
groupConversions, isCascading
mapping
Constructor and Description |
---|
ParameterConstraintMappingContextImpl(ExecutableConstraintMappingContextImpl executableContext,
int parameterIndex) |
Modifier and Type | Method and Description |
---|---|
ConstrainedParameter |
build(ConstraintHelper constraintHelper,
ParameterNameProvider parameterNameProvider) |
ParameterConstraintMappingContext |
constraint(ConstraintDef<?,?> definition)
Adds a new constraint.
|
ConstructorConstraintMappingContext |
constructor(Class<?>... parameterTypes)
Selects a constructor to which the next operations shall apply.
|
CrossParameterConstraintMappingContext |
crossParameter()
Selects the cross-parameter element of a method or constructor as target for the next constraint declaration
operations.
|
protected ConstraintDescriptorImpl.ConstraintType |
getConstraintType()
Returns the type of constraints hosted on the element configured by this creational context.
|
protected ParameterConstraintMappingContext |
getThis()
Returns this object, narrowed down to the specific sub-type.
|
MethodConstraintMappingContext |
method(String name,
Class<?>... parameterTypes)
Selects a method to which the next operations shall apply.
|
ParameterConstraintMappingContext |
parameter(int index)
Changes the parameter for which added constraints apply.
|
ReturnValueConstraintMappingContext |
returnValue()
Selects the current method's return value as the target for the next operations.
|
addGroupConversion, convertGroup, getGroupConversions, isCascading, valid
addConstraint, getConstraintMapping, getConstraints, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
type
convertGroup, valid
public ParameterConstraintMappingContextImpl(ExecutableConstraintMappingContextImpl executableContext, int parameterIndex)
protected ParameterConstraintMappingContext getThis()
CascadableConstraintMappingContextImplBase
getThis
in class CascadableConstraintMappingContextImplBase<ParameterConstraintMappingContext>
public ParameterConstraintMappingContext constraint(ConstraintDef<?,?> definition)
Constrainable
constraint
in interface Constrainable<ParameterConstraintMappingContext>
definition
- The constraint to add.public ParameterConstraintMappingContext parameter(int index)
ParameterTarget
parameter
in interface ParameterTarget
index
- The parameter index.public CrossParameterConstraintMappingContext crossParameter()
CrossParameterTarget
crossParameter
in interface CrossParameterTarget
public ReturnValueConstraintMappingContext returnValue()
ReturnValueTarget
returnValue
in interface ReturnValueTarget
public ConstructorConstraintMappingContext constructor(Class<?>... parameterTypes)
ConstructorTarget
Until this method is called constraints apply on class level. After calling this method constraints apply to the specified constructor.
A given constructor may only be configured once.
constructor
in interface ConstructorTarget
parameterTypes
- The constructor parameter types.public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes)
MethodTarget
Until this method is called constraints apply on class level. After calling this method constraints apply to the specified method.
A given method may only be configured once.
method
in interface MethodTarget
name
- The method name.parameterTypes
- The method parameter types.public ConstrainedParameter build(ConstraintHelper constraintHelper, ParameterNameProvider parameterNameProvider)
protected ConstraintDescriptorImpl.ConstraintType getConstraintType()
ConstraintMappingContextImplBase
getConstraintType
in class ConstraintMappingContextImplBase
Copyright © 2007-2013 Red Hat, Inc. All Rights Reserved