Class TypeArgumentConstraintLocation
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.location.TypeArgumentConstraintLocation
-
- All Implemented Interfaces:
ConstraintLocation
public class TypeArgumentConstraintLocation extends Object implements ConstraintLocation
Type argument constraint location.- Author:
- Hardy Ferentschik, Gunnar Morling, Guillaume Smet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.validator.internal.metadata.location.ConstraintLocation
ConstraintLocation.ConstraintLocationKind
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendTo(ExecutableParameterNameProvider parameterNameProvider, PathImpl path)Appends a node representing this location to the given property path.booleanequals(Object o)ConstrainablegetConstrainable()Returns the member represented by this location.Class<?>getContainerClass()Class<?>getDeclaringClass()Returns the class hosting this location.ConstraintLocationgetDelegate()ConstraintLocation.ConstraintLocationKindgetKind()Returns the nature of the constraint location.ConstraintLocationgetOuterDelegate()TypegetTypeForValidatorResolution()Returns the type to be used when resolving constraint validators for constraints at this location.TypeVariable<?>getTypeParameter()ObjectgetValue(Object parent)Obtains the value of this location from the parent.inthashCode()StringtoString()
-
-
-
Method Detail
-
getDeclaringClass
public Class<?> getDeclaringClass()
Description copied from interface:ConstraintLocationReturns the class hosting this location.- Specified by:
getDeclaringClassin interfaceConstraintLocation
-
getConstrainable
public Constrainable 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.
-
getTypeParameter
public TypeVariable<?> getTypeParameter()
-
getTypeForValidatorResolution
public Type 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
-
getContainerClass
public Class<?> getContainerClass()
-
appendTo
public void appendTo(ExecutableParameterNameProvider parameterNameProvider, PathImpl path)
Description copied from interface:ConstraintLocationAppends a node representing this location to the given property path.- Specified by:
appendToin interfaceConstraintLocation
-
getValue
public Object getValue(Object parent)
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
-
getDelegate
public ConstraintLocation getDelegate()
-
getOuterDelegate
public ConstraintLocation getOuterDelegate()
-
getKind
public ConstraintLocation.ConstraintLocationKind getKind()
Description copied from interface:ConstraintLocationReturns the nature of the constraint location.- Specified by:
getKindin interfaceConstraintLocation
-
-