|
||||||||||
| 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(java.lang.reflect.Method method,
java.util.List<MethodMetaConstraint<?>> constraints,
boolean isCascading)
|
|
MethodMetaData(java.lang.reflect.Method method,
java.util.List<ParameterMetaData> parameterMetaData,
java.util.List<MethodMetaConstraint<?>> returnValueConstraints,
boolean isCascading)
Creates a new method meta data object. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
It is expected that there is exactly one instance of this type for a given method in a type system. |
java.util.List<ParameterMetaData> |
getAllParameterMetaData()
Returns meta data for all parameters of the represented method. |
java.lang.reflect.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. |
java.util.Iterator<MethodMetaConstraint<?>> |
iterator()
An iterator with the return value constraints of the represented method. |
MethodMetaData |
merge(MethodMetaData otherMetaData)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodMetaData(java.lang.reflect.Method method,
java.util.List<MethodMetaConstraint<?>> constraints,
boolean isCascading)
public MethodMetaData(java.lang.reflect.Method method,
java.util.List<ParameterMetaData> parameterMetaData,
java.util.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 java.lang.reflect.Method getMethod()
public ParameterMetaData getParameterMetaData(int parameterIndex)
parameterIndex - The index in this method's parameter array of the parameter of
interest.
null.
java.lang.IllegalArgumentException - In case this method doesn't have a parameter with the
specified index.public java.util.List<ParameterMetaData> getAllParameterMetaData()
null.public java.util.Iterator<MethodMetaConstraint<?>> iterator()
iterator in interface java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
Method.
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Method.
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||