public class MethodMetaData extends Object implements Iterable<MethodMetaConstraint<?>>
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
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.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 int hashCode()
Method.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.