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 TypeMethodDescriptionvoidappendTo(ExecutableParameterNameProvider parameterNameProvider, PathImpl path) Appends a node representing this location to the given property path.booleanReturns 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.inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.validator.internal.metadata.location.ConstraintLocation
getKind
-
Method Details
-
getDeclaringClass
Description copied from interface:ConstraintLocationReturns the class hosting this location.- Specified by:
getDeclaringClassin interfaceConstraintLocation
-
getConstrainable
Description copied from interface:ConstraintLocationReturns the member represented by this location.- Specified by:
getConstrainablein interfaceConstraintLocation- Returns:
- the member represented by this location. Will be
nullwhen this location represents a type.
-
getPropertyName
-
getTypeForValidatorResolution
Description copied from interface:ConstraintLocationReturns 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:
getTypeForValidatorResolutionin interfaceConstraintLocation- Returns:
- The type to be used when resolving constraint validators for constraints at this location
-
appendTo
Description copied from interface:ConstraintLocationAppends a node representing this location to the given property path.- Specified by:
appendToin interfaceConstraintLocation
-
getValue
Description copied from interface:ConstraintLocationObtains 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 aAbstractPropertyConstraintLocationbut an object array for aParameterConstraintLocation.- Specified by:
getValuein interfaceConstraintLocation
-
toString
-
equals
-
hashCode
public int hashCode()
-