java.lang.Object
io.fluxzero.common.handling.TypedParameterResolver<M>
- Type Parameters:
M- the message or context type used for resolution (e.g.HasMessage,Object, etc.)
- All Implemented Interfaces:
ParameterResolver<M>
Abstract base class for
ParameterResolvers that resolve parameters based on type matching.
This class provides a default matches(java.lang.reflect.Parameter, java.lang.annotation.Annotation, M) implementation that checks whether the expected type of the parameter
is assignable from a configured base type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(Parameter parameter, Annotation methodAnnotation, M value) Determines whether the given parameter is eligible to be resolved by this resolver.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.common.handling.ParameterResolver
determinesSpecificity, filterMessage, resolve
-
Constructor Details
-
TypedParameterResolver
public TypedParameterResolver()
-
-
Method Details
-
matches
Determines whether the given parameter is eligible to be resolved by this resolver.This default implementation matches if
parameter.getType()is assignable from the configured base type.- Specified by:
matchesin interfaceParameterResolver<M>- Parameters:
parameter- the method parameter to resolvemethodAnnotation- the annotation on the method (if any)value- the current message or context object- Returns:
trueif this resolver can resolve the parameter
-