Class ConfigurationParameterResolverFactory
java.lang.Object
org.axonframework.messaging.core.configuration.reflection.ConfigurationParameterResolverFactory
- All Implemented Interfaces:
ParameterResolverFactory
public class ConfigurationParameterResolverFactory
extends Object
implements ParameterResolverFactory
A
ParameterResolverFactory implementation that resolves parameters from available components in the
Configuration instance it was configured with.
This implementation is usually autoconfigured when using the Configuration API.
- Since:
- 3.0.2
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationParameterResolverFactory(Configuration configuration) Initialize an instance using givenconfigurationto supply the value to resolve parameters with. -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(Executable executable, Parameter[] parameters, int parameterIndex) If available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.
-
Constructor Details
-
ConfigurationParameterResolverFactory
Initialize an instance using givenconfigurationto supply the value to resolve parameters with.- Parameters:
configuration- The configuration to look for component with.
-
-
Method Details
-
createInstance
@Nullable public ParameterResolver<?> createInstance(@Nonnull Executable executable, @Nonnull Parameter[] parameters, int parameterIndex) Description copied from interface:ParameterResolverFactoryIf available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.If the
ParameterResolverFactorycannot provide a suitableParameterResolver, returnsnull.- Specified by:
createInstancein interfaceParameterResolverFactory- Parameters:
executable- The executable (constructor or method) to inspect.parameters- The parameters on the executable to inspect.parameterIndex- The index of the parameter to return aParameterResolverfor.- Returns:
- A suitable
ParameterResolver, ornullif none is found.
-