Class ScopeDescriptorParameterResolverFactory

java.lang.Object
org.axonframework.messaging.annotation.ScopeDescriptorParameterResolverFactory
All Implemented Interfaces:
ParameterResolverFactory

public class ScopeDescriptorParameterResolverFactory extends Object implements ParameterResolverFactory
Factory for a ScopeDescriptor ParameterResolver. Will return the result of Scope.describeCurrentScope(). If no current scope is active, NoScopeDescriptor.INSTANCE will be returned.
Since:
4.5
Author:
Steven van Beelen
  • Constructor Details

    • ScopeDescriptorParameterResolverFactory

      public ScopeDescriptorParameterResolverFactory()
  • Method Details

    • createInstance

      public ParameterResolver<ScopeDescriptor> createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
      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:
      executable - The executable (constructor or method) to inspect
      parameters - The parameters on the executable to inspect
      parameterIndex - The index of the parameter to return a ParameterResolver for
      Returns:
      a suitable ParameterResolver, or null if none is found