org.hibernate.validator.metadata.location
Class BeanConstraintLocation
java.lang.Object
org.hibernate.validator.metadata.location.BeanConstraintLocation
- All Implemented Interfaces:
- ConstraintLocation
public class BeanConstraintLocation
- extends Object
- implements ConstraintLocation
A ConstraintLocation
implementation that represents either a bean (in case of class-level
constraints), a field or a getter method (in case of property-level constraints).
- Author:
- Hardy Ferentschik, Gunnar Morling
BeanConstraintLocation
public BeanConstraintLocation(Class<?> beanClass)
BeanConstraintLocation
public BeanConstraintLocation(Class<?> beanClass,
Member member)
- Parameters:
beanClass
- The class in which the constraint is defined onmember
- The member on which the constraint is defined on, null
if it is a class constraint}
getBeanClass
public Class<?> getBeanClass()
- Specified by:
getBeanClass
in interface ConstraintLocation
getMember
public Member getMember()
getPropertyName
public String getPropertyName()
- Returns:
- The JavaBeans name of the field/property the constraint was placed on.
null
if this is a
class level constraint.
typeOfAnnotatedElement
public Type typeOfAnnotatedElement()
- Description copied from interface:
ConstraintLocation
- Returns the type of the element at this constraint location. Depending
on the concrete implementation this might be the type of an annotated bean, method parameter etc.
- Specified by:
typeOfAnnotatedElement
in interface ConstraintLocation
- Returns:
- The type of the element at this constraint location.
getElementType
public ElementType getElementType()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved