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

java.lang.Object
  extended by org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation
All Implemented Interfaces:
ConstraintLocation

public class ExecutableConstraintLocation
extends Object
implements ConstraintLocation

A ConstraintLocation implementation that represents a method or constructor. parameter or return value.

Author:
Gunnar Morling

Constructor Summary
ExecutableConstraintLocation(ExecutableElement executableElement)
           
ExecutableConstraintLocation(ExecutableElement executableElement, Integer parameterIndex)
           
ExecutableConstraintLocation(Method method)
           
ExecutableConstraintLocation(Method method, Integer parameterIndex)
          Creates a new ExecutableConstraintLocation.
 
Method Summary
 boolean equals(Object obj)
           
 Class<?> getBeanClass()
          Returns the class on which the constraint is defined.
 ElementType getElementType()
          Returns the ElementType on which the constraint is defined.
 ExecutableElement getExecutableElement()
           
 Member getMember()
          Returns the member the constraint is defined on.
 Integer getParameterIndex()
           
 Class<?> getParameterType()
           
 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

ExecutableConstraintLocation

public ExecutableConstraintLocation(Method method)

ExecutableConstraintLocation

public ExecutableConstraintLocation(Method method,
                                    Integer parameterIndex)
Creates a new ExecutableConstraintLocation.

Parameters:
method - The method of the location to be created.
parameterIndex - The parameter index of the location to be created.

ExecutableConstraintLocation

public ExecutableConstraintLocation(ExecutableElement executableElement)

ExecutableConstraintLocation

public ExecutableConstraintLocation(ExecutableElement executableElement,
                                    Integer parameterIndex)
Method Detail

getBeanClass

public Class<?> getBeanClass()
Description copied from interface: ConstraintLocation
Returns the class on which the constraint is defined.

Specified by:
getBeanClass in interface ConstraintLocation
Returns:
the class on which the constraint is defined.

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.

getMember

public Member getMember()
Description copied from interface: ConstraintLocation
Returns the member the constraint is defined on.

Specified by:
getMember in interface ConstraintLocation
Returns:
the member the constraint is defined on.

getExecutableElement

public ExecutableElement getExecutableElement()

getElementType

public ElementType getElementType()
Description copied from interface: ConstraintLocation
Returns the ElementType on which the constraint is defined.

Specified by:
getElementType in interface ConstraintLocation
Returns:
the ElementType on which the constraint is defined.

getParameterIndex

public Integer getParameterIndex()
Returns:
returns the parameter index of this constraint location or null if this location represents a executableElement return value.

getParameterType

public Class<?> getParameterType()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2013 Red Hat Middleware, LLC. All Rights Reserved