org.axonframework.common.annotation
Class SimpleResourceParameterResolverFactory

java.lang.Object
  extended by 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

Constructor Summary
SimpleResourceParameterResolverFactory(Object resource)
          Initialize the ParameterResolverFactory to inject the given resource in applicable parameters.
 
Method Summary
 ParameterResolver createInstance(Annotation[] memberAnnotations, Class<?> parameterType, Annotation[] parameterAnnotations)
          If available, creates a ParameterResolver instance that can provide a parameter of type parameterType for a given message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResourceParameterResolverFactory

public SimpleResourceParameterResolverFactory(Object resource)
Initialize the ParameterResolverFactory to inject the given resource in applicable parameters.

Parameters:
resource - The resource to inject
Method Detail

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 for
parameterAnnotations - annotations placed on the parameter
Returns:
a suitable ParameterResolver, or null if none is found


Copyright © 2010-2016. All Rights Reserved.