org.hibernate.validator.metadata
Class BeanMetaConstraint<A extends Annotation>
java.lang.Object
org.hibernate.validator.metadata.MetaConstraint<A>
org.hibernate.validator.metadata.BeanMetaConstraint<A>
public class BeanMetaConstraint<A extends Annotation>
- extends MetaConstraint<A>
A MetaConstraint
implementation that represents a field,
property-level or class level constraint and allows the unified handling of
these constraints.
- Author:
- Gunnar Morling
BeanMetaConstraint
public BeanMetaConstraint(ConstraintDescriptorImpl<A> constraintDescriptor,
Class<?> beanClass,
Member member)
- Creates a new
BeanMetaConstraint
.
- Parameters:
constraintDescriptor
- The descriptor for this constraint.beanClass
- The type hosting this constraint.member
- The field or getter method hosting this constraint if this is
not a class-level constraint, otherwise null.
getLocation
public BeanConstraintLocation getLocation()
- Returns the location of this constraint.
- Overrides:
getLocation
in class MetaConstraint<A extends Annotation>
getValue
public Object getValue(Object o)
- Parameters:
o
- the object from which to retrieve the value.
- Returns:
- Returns the value for this constraint from the specified object. Depending on the type either the value itself
is returned of method or field access is used to access the value.
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved