public class MethodMetaData extends AbstractConstraintMetaData
Instances are retrieved by creating a MethodMetaData.Builder
and adding all required
ConstrainedMethod
objects to it. Instances are read-only after
creation.
Identity is solely based on the method's name and parameter types, hence sets and similar collections of this type may only be created in the scope of one Java type.
Modifier and Type | Class and Description |
---|---|
static class |
MethodMetaData.Builder
Creates new
MethodMetaData instances. |
ConstraintMetaData.ConstraintMetaDataKind
Modifier and Type | Method and Description |
---|---|
MethodDescriptor |
asDescriptor(boolean defaultGroupSequenceRedefined,
List<Class<?>> defaultGroupSequence)
Returns this meta data object's corresponding representation in the
descriptor model.
|
void |
assertCorrectnessOfMethodParameterConstraints()
Checks the parameter constraints of this method for correctness.
|
boolean |
equals(Object obj) |
List<ParameterMetaData> |
getAllParameterMetaData()
Returns meta data for all parameters of the represented method.
|
ParameterMetaData |
getParameterMetaData(int parameterIndex)
Returns meta data for the specified parameter of the represented method.
|
Class<?>[] |
getParameterTypes() |
int |
hashCode() |
String |
toString() |
asDescriptors, getConstraints, getKind, getName, getType, isCascading, isConstrained, iterator
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 ParameterMetaData getParameterMetaData(int parameterIndex)
parameterIndex
- the index of the parameternull
.public List<ParameterMetaData> getAllParameterMetaData()
null
.public Class<?>[] getParameterTypes()
public MethodDescriptor asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
ConstraintMetaData
defaultGroupSequenceRedefined
- Whether the bean hosting the represented element has a
redefined default group sequence or not.defaultGroupSequence
- The default group sequence of the bean hosting the represented
element.ElementDescriptor
.public String toString()
toString
in class AbstractConstraintMetaData
public int hashCode()
hashCode
in class AbstractConstraintMetaData
public boolean equals(Object obj)
equals
in class AbstractConstraintMetaData
Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved