org.hibernate.validator.metadata.location
Class BeanConstraintLocation
java.lang.Object
org.hibernate.validator.metadata.location.BeanConstraintLocation
- All Implemented Interfaces:
- ConstraintLocation
public class BeanConstraintLocation
- extends java.lang.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
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BeanConstraintLocation
public BeanConstraintLocation(java.lang.Class<?> beanClass)
BeanConstraintLocation
public BeanConstraintLocation(java.lang.Class<?> beanClass,
java.lang.reflect.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 java.lang.Class<?> getBeanClass()
- Specified by:
getBeanClass in interface ConstraintLocation
getMember
public java.lang.reflect.Member getMember()
getPropertyName
public java.lang.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 java.lang.reflect.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 java.lang.annotation.ElementType getElementType()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011 Oracle Corporation. All Rights Reserved.