org.hibernate.validator.metadata.location
Class BeanConstraintLocation

java.lang.Object
  extended by 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

Constructor Summary
BeanConstraintLocation(Class<?> beanClass)
           
BeanConstraintLocation(Class<?> beanClass, Member member)
           
 
Method Summary
 boolean equals(Object o)
           
 Class<?> getBeanClass()
           
 ElementType getElementType()
           
 Member getMember()
           
 String getPropertyName()
           
 int hashCode()
           
 String toString()
           
 Type typeOfAnnotatedElement()
          Returns the type of the element at this constraint location.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanConstraintLocation

public BeanConstraintLocation(Class<?> beanClass)

BeanConstraintLocation

public BeanConstraintLocation(Class<?> beanClass,
                              Member member)
Parameters:
beanClass - The class in which the constraint is defined on
member - The member on which the constraint is defined on, null if it is a class constraint}
Method Detail

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