public class MethodParameters extends Object
MethodParameters to allow to easily find the ones with a given annotation.| Constructor and Description |
|---|
MethodParameters(Method method,
AnnotationAttribute namingAnnotation)
|
| Modifier and Type | Method and Description |
|---|---|
Optional<MethodParameter> |
getParameter(String name)
Returns the
MethodParameter with the given name or null if none found. |
List<MethodParameter> |
getParameters()
Returns all
MethodParameters. |
List<MethodParameter> |
getParametersOfType(Class<?> type)
Returns all parameters of the given type.
|
List<MethodParameter> |
getParametersWith(Class<? extends Annotation> annotation)
Returns all
MethodParameters annotated with the given annotation type. |
static MethodParameters |
of(Method method)
Returns the
MethodParameters for the given Method. |
public MethodParameters(Method method, @Nullable 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 static MethodParameters of(Method method)
MethodParameters for the given Method.method - must not be null.public List<MethodParameter> getParameters()
MethodParameters.public Optional<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)
MethodParameters annotated with the given annotation type.annotation - must not be null.Copyright © 2011–2021 Pivotal, Inc.. All rights reserved.