|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.validator.metadata.MethodMetaData
public class MethodMetaData
Represents a method 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.
Constructor Summary | |
---|---|
MethodMetaData(Method method,
List<MethodMetaConstraint<?>> constraints,
boolean isCascading)
|
|
MethodMetaData(Method method,
List<ParameterMetaData> parameterMetaData,
List<MethodMetaConstraint<?>> returnValueConstraints,
boolean isCascading)
Creates a new method meta data object. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
It is expected that there is exactly one instance of this type for a given method in a type system. |
List<ParameterMetaData> |
getAllParameterMetaData()
Returns meta data for all parameters of the represented method. |
Method |
getMethod()
The method represented by this meta data object. |
ParameterMetaData |
getParameterMetaData(int parameterIndex)
Constraint meta data for the specified parameter. |
int |
hashCode()
It is expected that there is exactly one instance of this type for a given method in a type system. |
boolean |
hasParameterConstraints()
Whether this method has at least one cascaded parameter or at least one parameter with constraints. |
boolean |
isCascading()
Whether cascading validation for the return value of the represented method shall be performed or not. |
boolean |
isConstrained()
Whether the represented method is constrained or not. |
Iterator<MethodMetaConstraint<?>> |
iterator()
An iterator with the return value constraints of the represented method. |
MethodMetaData |
merge(MethodMetaData otherMetaData)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodMetaData(Method method, List<MethodMetaConstraint<?>> constraints, boolean isCascading)
public MethodMetaData(Method method, List<ParameterMetaData> parameterMetaData, List<MethodMetaConstraint<?>> returnValueConstraints, boolean isCascading)
method
- The method to represent.parameterMetaData
- A list with parameter meta data. The length must correspond
with the number of parameters of the represented method. So
this list may be empty returned (in case of a parameterless
method), but never null
.returnValueConstraints
- The return value constraints of the represented method, if
any.isCascading
- Whether a cascaded validation of the represented method's
return value shall be performed or not.Method Detail |
---|
public Method getMethod()
public ParameterMetaData getParameterMetaData(int parameterIndex)
parameterIndex
- The index in this method's parameter array of the parameter of
interest.
null
.
IllegalArgumentException
- In case this method doesn't have a parameter with the
specified index.public List<ParameterMetaData> getAllParameterMetaData()
null
.public Iterator<MethodMetaConstraint<?>> iterator()
iterator
in interface Iterable<MethodMetaConstraint<?>>
public boolean isCascading()
True
, if cascading validation for the represented
method's return value shall be performed, false
otherwise.public boolean isConstrained()
True
, if this method is constrained by any means,
false
otherwise.public boolean hasParameterConstraints()
True
, if this method has at least one cascading or
constrained parameter, false
otherwise.public MethodMetaData merge(MethodMetaData otherMetaData)
public String toString()
toString
in class Object
public int hashCode()
Method
.
hashCode
in class Object
public boolean equals(Object obj)
Method
.
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |