org.axonframework.common.annotation
Class ClasspathParameterResolverFactory

java.lang.Object
  extended by org.axonframework.common.annotation.ClasspathParameterResolverFactory

public final class ClasspathParameterResolverFactory
extends Object

ParameterResolverFactory instance that locates other ParameterResolverFactory instances on the class path. It uses the ServiceLoader mechanism to locate and initialize them.

This means for this class to find implementations, their fully qualified class name has to be put into a file called META-INF/services/org.axonframework.common.annotation.ParameterResolverFactory. For more details, see ServiceLoader.

Since:
2.1
Author:
Allard Buijze
See Also:
ServiceLoader

Constructor Summary
ClasspathParameterResolverFactory()
           
 
Method Summary
static ParameterResolverFactory forClass(Class<?> clazz)
          Creates an instance for the given clazz.
static ParameterResolverFactory forClassLoader(ClassLoader classLoader)
          Creates an instance using the given classLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathParameterResolverFactory

public ClasspathParameterResolverFactory()
Method Detail

forClass

public static ParameterResolverFactory forClass(Class<?> clazz)
Creates an instance for the given clazz. Effectively, the class loader of the given class is used to locate implementations.

Parameters:
clazz - The class for which the parameter resolver must be returned
Returns:
a ClasspathParameterResolverFactory that can resolve parameters for the given class

forClassLoader

public static ParameterResolverFactory forClassLoader(ClassLoader classLoader)
Creates an instance using the given classLoader. Implementations are located using this class loader.

Parameters:
classLoader - The class loader to locate the implementations with
Returns:
a ParameterResolverFactory instance using the given classLoader


Copyright © 2010-2016. All Rights Reserved.