Class AbstractWebQueryResolver
- All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodArgumentResolver
- Direct Known Subclasses:
WebQueryPageableArgumentResolver,WebQuerySpecificationArgumentResolver
HandlerMethodArgumentResolver
implementations that participate in WebQuery-driven request parsing.
This class centralizes detection of controller method parameters whose
declaring method carries WebQuery and exposes a shared helper for
retrieving that annotation once support has been established.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected WebQuerygetWebQueryAnnotation(org.springframework.core.MethodParameter parameter) Returns theWebQueryannotation declared on the supplied method parameter's controller method.booleansupportsParameter(org.springframework.core.MethodParameter parameter) Determines whether the supplied method parameter belongs to a controller method annotated withWebQuery.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.method.support.HandlerMethodArgumentResolver
resolveArgument
-
Constructor Details
-
AbstractWebQueryResolver
public AbstractWebQueryResolver()
-
-
Method Details
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter) Determines whether the supplied method parameter belongs to a controller method annotated withWebQuery.This base implementation uses
getWebQueryAnnotation(MethodParameter)as the single source of truth for annotation lookup. Missing methods or missing annotations are treated as "not supported" rather than exceptional conditions so Spring MVC can continue evaluating other resolvers.- Specified by:
supportsParameterin interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver- Parameters:
parameter- method parameter under inspection- Returns:
truewhen the declaring method hasWebQuery, otherwisefalse
-
getWebQueryAnnotation
Returns theWebQueryannotation declared on the supplied method parameter's controller method.This helper centralizes annotation lookup for both support detection and downstream configuration resolution. Callers that need boolean support checks should use
supportsParameter(MethodParameter); this method is for subclasses that expect a supported parameter and therefore treat missing method metadata as a programming error.- Parameters:
parameter- method parameter whose declaring method is expected to carryWebQuery- Returns:
- resolved
WebQueryannotation - Throws:
IllegalStateException- if the parameter has no declaring method or the declaring method is not annotated withWebQuery
-