Interface ExtensionHolder<T>


  • public interface ExtensionHolder<T>
    A holder for Weaver extension classes.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getAndRemoveExtension​(java.lang.Object instance)
      Return the value associated with the instance in this ExtensionHolder.
      In addition, the value will be removed from the backing map.
      T getExtension​(java.lang.Object instance, java.util.function.Supplier<T> valueLoader)
      Return the value associated with the instance in this ExtensionHolder.
    • Method Detail

      • getExtension

        T getExtension​(java.lang.Object instance,
                       java.util.function.Supplier<T> valueLoader)
        Return the value associated with the instance in this ExtensionHolder. If the value is not present it will be initialized (in a thread-safe manner) using valueLoader.
      • getAndRemoveExtension

        T getAndRemoveExtension​(java.lang.Object instance)
        Return the value associated with the instance in this ExtensionHolder.
        In addition, the value will be removed from the backing map.