|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.validator.internal.metadata.raw.AbstractConstrainedElement
org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable
public class ConstrainedExecutable
Represents a method or constructor of a Java type and all its associated meta-data relevant in the context of bean validation, for instance the constraints at it's parameters or return value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.hibernate.validator.internal.metadata.raw.ConstrainedElement |
|---|
ConstrainedElement.ConstrainedElementKind |
| Constructor Summary | |
|---|---|
ConstrainedExecutable(ConfigurationSource source,
ExecutableConstraintLocation location,
List<ConstrainedParameter> parameterMetaData,
Set<MetaConstraint<?>> crossParameterConstraints,
Set<MetaConstraint<?>> returnValueConstraints,
Map<Class<?>,Class<?>> groupConversions,
boolean isCascading)
Creates a new executable meta data object. |
|
ConstrainedExecutable(ConfigurationSource source,
ExecutableConstraintLocation location,
Set<MetaConstraint<?>> returnValueConstraints,
boolean isCascading)
Creates a new executable meta data object for a parameter-less executable. |
|
| Method Summary | |
|---|---|
List<ConstrainedParameter> |
getAllParameterMetaData()
Returns meta data for all parameters of the represented executable. |
Set<MetaConstraint<?>> |
getCrossParameterConstraints()
|
ExecutableConstraintLocation |
getLocation()
Returns the location of this constrained element. |
ConstrainedParameter |
getParameterMetaData(int parameterIndex)
Constraint meta data for the specified parameter. |
boolean |
hasParameterConstraints()
Whether this executable has at least one cascaded parameter or at least one parameter with constraints or at least one cross-parameter constraint. |
boolean |
isConstrained()
Whether the represented executable is constrained or not. |
boolean |
isGetterMethod()
Whether the represented executable is a JavaBeans getter executable or not. |
String |
toString()
|
| Methods inherited from class org.hibernate.validator.internal.metadata.raw.AbstractConstrainedElement |
|---|
equals, getConstraints, getGroupConversions, getKind, hashCode, isCascading, iterator |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstrainedExecutable(ConfigurationSource source,
ExecutableConstraintLocation location,
Set<MetaConstraint<?>> returnValueConstraints,
boolean isCascading)
source - The source of meta data.location - The location of the represented executable.returnValueConstraints - The return value constraints of the represented executable, if
any.isCascading - Whether a cascaded validation of the represented executable's
return value shall be performed or not.
public ConstrainedExecutable(ConfigurationSource source,
ExecutableConstraintLocation location,
List<ConstrainedParameter> parameterMetaData,
Set<MetaConstraint<?>> crossParameterConstraints,
Set<MetaConstraint<?>> returnValueConstraints,
Map<Class<?>,Class<?>> groupConversions,
boolean isCascading)
source - The source of meta data.location - The location of the represented executable.parameterMetaData - A list with parameter meta data. The length must correspond
with the number of parameters of the represented executable. So
this list may be empty (in case of a parameterless executable),
but never null.returnValueConstraints - The return value constraints of the represented executable, if
any.groupConversions - The group conversions of the represented executable, if any.isCascading - Whether a cascaded validation of the represented executable's
return value shall be performed or not.| Method Detail |
|---|
public ExecutableConstraintLocation getLocation()
ConstrainedElement
getLocation in interface ConstrainedElementgetLocation in class AbstractConstrainedElementpublic ConstrainedParameter getParameterMetaData(int parameterIndex)
parameterIndex - The index in this executable's parameter array of the parameter of
interest.
null.
IllegalArgumentException - In case this executable doesn't have a parameter with the
specified index.public List<ConstrainedParameter> getAllParameterMetaData()
null.public Set<MetaConstraint<?>> getCrossParameterConstraints()
public boolean isConstrained()
isConstrained in interface ConstrainedElementisConstrained in class AbstractConstrainedElementTrue if this executable is constrained by any means,
false otherwise.public boolean hasParameterConstraints()
True, if this executable is parameter-constrained by any
means, false otherwise.public boolean isGetterMethod()
True, if this executable is a getter method, false
otherwise.public String toString()
toString in class AbstractConstrainedElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||