public class SimpleResourceParameterResolverFactory extends Object implements ParameterResolverFactory
ParameterResolverFactory implementation for simple resource injections.
Uses the FixedValueParameterResolver to inject a resource as a fixed value
on message handling if the resource equals a message handling method parameter.| Constructor and Description |
|---|
SimpleResourceParameterResolverFactory(Iterable<?> resources)
Initialize the ParameterResolverFactory to inject the given
resource in applicable parameters. |
| Modifier and Type | Method and Description |
|---|---|
ParameterResolver |
createInstance(Executable executable,
Parameter[] parameters,
int parameterIndex)
If available, creates a ParameterResolver instance that can provide a parameter of type
parameterType for a given message. |
public SimpleResourceParameterResolverFactory(Iterable<?> resources)
resource in applicable parameters.resources - The resource to injectpublic ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
ParameterResolverFactoryparameterType for a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null.
createInstance in interface ParameterResolverFactoryexecutable - The executable (constructor or method) to inspectparameters - The parameters on the executable to inspectparameterIndex - The index of the parameter to return a ParameterResolver fornull if none is foundCopyright © 2010–2018. All rights reserved.