org.hibernate.validator.metadata
Class BeanMetaConstraint<A extends java.lang.annotation.Annotation>
java.lang.Object
org.hibernate.validator.metadata.MetaConstraint<A>
org.hibernate.validator.metadata.BeanMetaConstraint<A>
public class BeanMetaConstraint<A extends java.lang.annotation.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
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BeanMetaConstraint
public BeanMetaConstraint(ConstraintDescriptorImpl<A> constraintDescriptor,
java.lang.Class<?> beanClass,
java.lang.reflect.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 java.lang.annotation.Annotation>
getValue
public java.lang.Object getValue(java.lang.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 © 2011 Oracle Corporation. All Rights Reserved.