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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParameter(String name) Returns theMethodParameterwith the given name or null if none found.Returns allMethodParameters.getParametersOfType(Class<?> type) Returns all parameters of the given type.getParametersWith(Class<? extends Annotation> annotation) Returns allMethodParameters annotated with the given annotation type.static MethodParametersReturns theMethodParametersfor the givenMethod.
-
Constructor Details
-
MethodParameters
Creates a newMethodParametersfor the givenMethodandAnnotationAttribute. 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 theMethodParametersfor the givenMethod.- Parameters:
method- must not be null.- Returns:
-
getParameters
Returns allMethodParameters.- Returns:
-
getParameter
Returns theMethodParameterwith 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 allMethodParameters annotated with the given annotation type.- Parameters:
annotation- must not be null.- Returns:
-