Module lettuce.core

Class CommandOutputResolverSupport

java.lang.Object
io.lettuce.core.dynamic.output.CommandOutputResolverSupport
Direct Known Subclasses:
OutputRegistryCommandOutputFactoryResolver

public abstract class CommandOutputResolverSupport
extends Object
Base class for CommandOutputFactory resolution such as OutputRegistryCommandOutputFactoryResolver.

This class provides methods to check provider/selector type assignability. Subclasses are responsible for calling methods in this class in the correct order.

Author:
Mark Paluch
  • Constructor Details

    • CommandOutputResolverSupport

      public CommandOutputResolverSupport()
  • Method Details

    • isAssignableFrom

      protected boolean isAssignableFrom​(OutputSelector selector, OutputType provider)
      Overridable hook to check whether selector can be assigned from the provider type provider.

      This method descends the component type hierarchy and considers primitive/wrapper type conversion.

      Parameters:
      selector - must not be null.
      provider - must not be null.
      Returns:
      true if selector can be assigned from its provider type.