Class MethodParameters
java.lang.Object
org.springframework.hateoas.server.core.MethodParameters
Value object to represent
MethodParameters
to allow to easily find the ones with a given annotation.- Author:
- Oliver Gierke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetParameter
(String name) Returns theMethodParameter
with the given name or null if none found.Returns allMethodParameter
s.getParametersOfType
(Class<?> type) Returns all parameters of the given type.getParametersWith
(Class<? extends Annotation> annotation) Returns allMethodParameter
s annotated with the given annotation type.static MethodParameters
Returns theMethodParameters
for the givenMethod
.
-
Constructor Details
-
MethodParameters
Creates a newMethodParameters
for the givenMethod
andAnnotationAttribute
. If the latter is given, method parameter names will be looked up from the annotation attribute if present.- Parameters:
method
- must not be null.namingAnnotation
- can be null.
-
-
Method Details
-
of
Returns theMethodParameters
for the givenMethod
.- Parameters:
method
- must not be null.- Returns:
-
getParameters
Returns allMethodParameter
s.- Returns:
-
getParameter
Returns theMethodParameter
with the given name or null if none found.- Parameters:
name
- must not be null or empty.- Returns:
-
getParametersOfType
Returns all parameters of the given type.- Parameters:
type
- must not be null.- Returns:
- Since:
- 0.9
-
getParametersWith
Returns allMethodParameter
s annotated with the given annotation type.- Parameters:
annotation
- must not be null.- Returns:
-