public class MethodParameters extends Object
MethodParameters
to allow to easily find the ones with a given annotation.Constructor and Description |
---|
MethodParameters(Method method)
Creates a new
MethodParameters from the given Method . |
MethodParameters(Method method,
AnnotationAttribute namingAnnotation)
|
Modifier and Type | Method and Description |
---|---|
MethodParameter |
getParameter(String name)
Returns the
MethodParameter with the given name or null if none found. |
List<MethodParameter> |
getParameters()
Returns all
MethodParameter s. |
List<MethodParameter> |
getParametersOfType(Class<?> type)
Returns all parameters of the given type.
|
List<MethodParameter> |
getParametersWith(Class<? extends Annotation> annotation)
Returns all
MethodParameter s annotated with the given annotation type. |
public MethodParameters(Method method)
MethodParameters
from the given Method
.method
- must not be null.public MethodParameters(Method method, AnnotationAttribute namingAnnotation)
MethodParameters
for the given Method
and AnnotationAttribute
. If the latter
is given, method parameter names will be looked up from the annotation attribute if present.method
- must not be null.namingAnnotation
- can be null.public List<MethodParameter> getParameters()
MethodParameter
s.public MethodParameter getParameter(String name)
MethodParameter
with the given name or null if none found.name
- must not be null or empty.public List<MethodParameter> getParametersOfType(Class<?> type)
type
- must not be null.public List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation)
MethodParameter
s annotated with the given annotation type.annotation
- must not be null.Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.