Interface IAdapterFactory


public interface IAdapterFactory
Interface for external service that builds adaptors for targets.
  • Method Details

    • getAdapter

      <T> Optional<T> getAdapter(Object theObject, Class<T> theAdapterType)
      Build an adaptor for the target. May return empty() even if the target type is listed in getAdapters() when the factory fails to convert a particular instance.
      Parameters:
      theObject - the object to be adapted.
      theAdapterType - the target type
      Returns:
      the adapter, if possible.
    • getAdapters

      Returns:
      the collection of adapter target types handled by this factory.