public class SpringBeanDependencyResolverFactory extends Object implements ParameterResolverFactory
Autowired
to resolve said parameter using Spring dependency
resolution.Autowired
Constructor and Description |
---|
SpringBeanDependencyResolverFactory(org.springframework.context.ApplicationContext applicationContext)
Default constructor requiring an application context, for use internally by Axon.
|
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 SpringBeanDependencyResolverFactory(@NonNull org.springframework.context.ApplicationContext applicationContext)
applicationContext
- The Spring application context for the executing applicationpublic ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
ParameterResolverFactory
parameterType
for a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null
.
createInstance
in interface ParameterResolverFactory
executable
- 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–2023. All rights reserved.