Class AbstractPropertyConstraintLocation<T extends Property>
java.lang.Object
org.hibernate.validator.internal.metadata.location.AbstractPropertyConstraintLocation<T>
- All Implemented Interfaces:
ConstraintLocation
- Direct Known Subclasses:
FieldConstraintLocation
,GetterConstraintLocation
public abstract class AbstractPropertyConstraintLocation<T extends Property>
extends Object
implements ConstraintLocation
An abstract property constraint location.
- Author:
- Marko Bekhta, Guillaume Smet
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.validator.internal.metadata.location.ConstraintLocation
ConstraintLocation.ConstraintLocationKind
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTo
(ExecutableParameterNameProvider parameterNameProvider, PathImpl path) Appends a node representing this location to the given property path.boolean
Returns the member represented by this location.Class<?>
Returns the class hosting this location.Returns the type to be used when resolving constraint validators for constraints at this location.Obtains the value of this location from the parent.int
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.validator.internal.metadata.location.ConstraintLocation
getKind
-
Method Details
-
getDeclaringClass
Description copied from interface:ConstraintLocation
Returns the class hosting this location.- Specified by:
getDeclaringClass
in interfaceConstraintLocation
-
getConstrainable
Description copied from interface:ConstraintLocation
Returns the member represented by this location.- Specified by:
getConstrainable
in interfaceConstraintLocation
- Returns:
- the member represented by this location. Will be
null
when this location represents a type.
-
getPropertyName
-
getTypeForValidatorResolution
Description copied from interface:ConstraintLocation
Returns the type to be used when resolving constraint validators for constraints at this location. Note that this is not always the same type as the type of the element described by this location; E.g. the wrapper type will is used for constraint validator resolution, if a constraint is declared in an element with a primitive type.- Specified by:
getTypeForValidatorResolution
in interfaceConstraintLocation
- Returns:
- The type to be used when resolving constraint validators for constraints at this location
-
appendTo
Description copied from interface:ConstraintLocation
Appends a node representing this location to the given property path.- Specified by:
appendTo
in interfaceConstraintLocation
-
getValue
Description copied from interface:ConstraintLocation
Obtains the value of this location from the parent. The type of the passed parent depends on the location type, e.g. a bean would be passed for aAbstractPropertyConstraintLocation
but an object array for aParameterConstraintLocation
.- Specified by:
getValue
in interfaceConstraintLocation
-
toString
-
equals
-
hashCode
public int hashCode()
-