Interface RegistryBacking


  • public interface RegistryBacking
    Provides instances to the Registry implementation which uses an implementation of this interface for backing the instances that the Registry contains or returns. The return type of the provide method is an iterable result of Supplier instances. The actual instances won't be cached in the Registry implementation and the supplier will be called each time an instance is requested. This allows more flexibility over the lifecycle of the instances that Registry returns.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> Iterable<com.google.common.base.Supplier<? extends T>> provide​(com.google.common.reflect.TypeToken<T> type)
      Provides instances to the Registry implementation which uses this method for looking up an iterable result of Supplier instances for the given type.
    • Method Detail

      • provide

        <T> Iterable<com.google.common.base.Supplier<? extends T>> provide​(com.google.common.reflect.TypeToken<T> type)
        Provides instances to the Registry implementation which uses this method for looking up an iterable result of Supplier instances for the given type.
        Type Parameters:
        T - the class of the type to lookup
        Parameters:
        type - the type to look up
        Returns:
        an iterable result of Supplier instances that return instances for the given type to look up