org.axonframework.common.annotation
Class SimpleResourceParameterResolverFactory
java.lang.Object
org.axonframework.common.annotation.SimpleResourceParameterResolverFactory
- All Implemented Interfaces:
- ParameterResolverFactory
public class SimpleResourceParameterResolverFactory
- extends Object
- implements ParameterResolverFactory
ParameterResolverFactory implementation that resolves parameters for a specific given Resource.
- Since:
- 2.4.2
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleResourceParameterResolverFactory
public SimpleResourceParameterResolverFactory(Object resource)
- Initialize the ParameterResolverFactory to inject the given
resource
in applicable parameters.
- Parameters:
resource
- The resource to inject
createInstance
public ParameterResolver createInstance(Annotation[] memberAnnotations,
Class<?> parameterType,
Annotation[] parameterAnnotations)
- Description copied from interface:
ParameterResolverFactory
- If available, creates a ParameterResolver instance that can provide a parameter of type
parameterType
for a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null
.
- Specified by:
createInstance
in interface ParameterResolverFactory
- Parameters:
memberAnnotations
- annotations placed on the member (e.g. method)parameterType
- the parameter type to find a resolver forparameterAnnotations
- annotations placed on the parameter
- Returns:
- a suitable ParameterResolver, or
null
if none is found
Copyright © 2010-2016. All Rights Reserved.