org.hibernate.validator.cfg.context.impl
Class ConfiguredConstraint<A extends Annotation,L extends ConstraintLocation>

java.lang.Object
  extended by org.hibernate.validator.cfg.context.impl.ConfiguredConstraint<A,L>

public class ConfiguredConstraint<A extends Annotation,L extends ConstraintLocation>
extends Object

Represents a programmatically configured constraint and meta-data related to its location (bean type etc.).

Author:
Gunnar Morling

Method Summary
static
<A extends Annotation>
ConfiguredConstraint<A,MethodConstraintLocation>
forParameter(ConstraintDef<?,A> constraint, Method method, int parameterIndex)
           
static
<A extends Annotation>
ConfiguredConstraint<A,BeanConstraintLocation>
forProperty(ConstraintDef<?,A> constraint, Class<?> beanType, Member member)
           
static
<A extends Annotation>
ConfiguredConstraint<A,MethodConstraintLocation>
forReturnValue(ConstraintDef<?,A> constraint, Method method)
           
static
<A extends Annotation>
ConfiguredConstraint<A,BeanConstraintLocation>
forType(ConstraintDef<?,A> constraint, Class<?> beanType)
           
 ConstraintDef<?,A> getConstraint()
           
 Class<A> getConstraintType()
           
 L getLocation()
           
 Map<String,Object> getParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forType

public static <A extends Annotation> ConfiguredConstraint<A,BeanConstraintLocation> forType(ConstraintDef<?,A> constraint,
                                                                                            Class<?> beanType)

forProperty

public static <A extends Annotation> ConfiguredConstraint<A,BeanConstraintLocation> forProperty(ConstraintDef<?,A> constraint,
                                                                                                Class<?> beanType,
                                                                                                Member member)

forParameter

public static <A extends Annotation> ConfiguredConstraint<A,MethodConstraintLocation> forParameter(ConstraintDef<?,A> constraint,
                                                                                                   Method method,
                                                                                                   int parameterIndex)

forReturnValue

public static <A extends Annotation> ConfiguredConstraint<A,MethodConstraintLocation> forReturnValue(ConstraintDef<?,A> constraint,
                                                                                                     Method method)

getConstraint

public ConstraintDef<?,A> getConstraint()

getLocation

public L getLocation()

getConstraintType

public Class<A> getConstraintType()

getParameters

public Map<String,Object> getParameters()


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved