public class AggregatedMethodMetaData extends Object implements Iterable<MethodMetaConstraint<?>>
An aggregated view of the constraint related meta data for a given method and all the methods in the inheritance hierarchy which it overrides or implements.
Instances are retrieved by creating a AggregatedMethodMetaData.Builder
and adding all required
MethodMetaData
objects to it. Instances are read-only after creation.
Modifier and Type | Class and Description |
---|---|
static class |
AggregatedMethodMetaData.Builder
Creates new
AggregatedMethodMetaData instances. |
Modifier and Type | Method and Description |
---|---|
void |
assertCorrectnessOfMethodParameterConstraints()
Checks the parameter constraints of this method for correctness.
|
boolean |
equals(Object obj) |
Iterable<MethodMetaData> |
getAllMethodMetaData() |
List<ParameterMetaData> |
getAllParameterMetaData()
Returns meta data for all parameters of the represented method.
|
Method |
getMethod() |
ParameterMetaData |
getParameterMetaData(int parameterIndex)
Returns meta data for the specified parameter of the represented method.
|
MethodMetaData |
getSingleMetaDataFor(Method method)
Returns a single method meta data from this aggregation.
|
int |
hashCode() |
boolean |
isCascading()
Whether a cascaded validation of the return value of the represented
method shall be performed or not.
|
boolean |
isConstrained()
Whether the represented method itself or any of the method's up in the
inheritance hierarchy which it overrides/implements is constrained.
|
Iterator<MethodMetaConstraint<?>> |
iterator()
An iterator with the return value constraints of the represented method.
|
String |
toString() |
public void assertCorrectnessOfMethodParameterConstraints() throws ConstraintDeclarationException
Checks the parameter constraints of this method for correctness.
The following rules apply for this check:
ConstraintDeclarationException
- In case the represented method has an illegal parameter
constraint.public Method getMethod()
public ParameterMetaData getParameterMetaData(int parameterIndex)
null
.public List<ParameterMetaData> getAllParameterMetaData()
null
.public boolean isCascading()
Valid
or any of the method's up in the
inheritance hierarchy which it overrides.True
, if a cascaded return value validation shall be
performed, false
otherwise.public boolean isConstrained()
True
, if this method is constrained by any means,
false
otherwise.public MethodMetaData getSingleMetaDataFor(Method method)
method
- The method to retrieve the meta data for. Must either be the
method represented by this meta data object or one method from
a super-type, which the method represented by this meta data
object overrides/implements.public Iterable<MethodMetaData> getAllMethodMetaData()
public Iterator<MethodMetaConstraint<?>> iterator()
iterator
in interface Iterable<MethodMetaConstraint<?>>
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.