org.hibernate.validator.internal.metadata.location
Class BeanConstraintLocation

java.lang.Object
  extended by org.hibernate.validator.internal.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)
           
BeanConstraintLocation(Member member)
           
 
Method Summary
 boolean equals(Object o)
           
 Class<?> getBeanClass()
           
 ElementType getElementType()
           
 Member getMember()
           
 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(Member member)

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()
Specified by:
getMember in interface ConstraintLocation

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()
Specified by:
getElementType in interface ConstraintLocation

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 © 2012 Oracle Corporation. All Rights Reserved.