public class ConstraintLocation extends Object
Note that while the validation engine works on the aggregated meta-model (which e.g. provides a unified view for properties, be them represented via fields or getter methods) most of the time, in some situations the physical element which hosts a constraint is relevant. This includes
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static ConstraintLocation |
forClass(Class<?> declaringClass) |
static ConstraintLocation |
forCrossParameter(ExecutableElement executable) |
static ConstraintLocation |
forParameter(ExecutableElement executable,
int index) |
static ConstraintLocation |
forProperty(Member member) |
static ConstraintLocation |
forReturnValue(ExecutableElement executable) |
static ConstraintLocation |
forTypeArgument(Member member,
Type type) |
Class<?> |
getDeclaringClass()
Returns the class hosting this location.
|
Member |
getMember()
Returns the member represented by this location.
|
Type |
getTypeForValidatorResolution()
Returns the type to be used when resolving constraint validators for constraints at this location.
|
int |
hashCode() |
String |
toString() |
public static ConstraintLocation forClass(Class<?> declaringClass)
public static ConstraintLocation forProperty(Member member)
public static ConstraintLocation forTypeArgument(Member member, Type type)
public static ConstraintLocation forReturnValue(ExecutableElement executable)
public static ConstraintLocation forCrossParameter(ExecutableElement executable)
public static ConstraintLocation forParameter(ExecutableElement executable, int index)
public Class<?> getDeclaringClass()
public Member getMember()
null
when this location represents a type.public Type getTypeForValidatorResolution()
Copyright © 2017 JBoss by Red Hat. All rights reserved.