Class ProviderUtils


  • public class ProviderUtils
    extends java.lang.Object
    Helper methods for dealing with Provider.
    Since:
    2.0.2
    • Constructor Summary

      Constructors 
      Constructor Description
      ProviderUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> jakarta.inject.Provider<T> memoized​(jakarta.inject.Provider<T> delegate)
      Caches the result of provider in a thread safe manner.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProviderUtils

        public ProviderUtils()
    • Method Detail

      • memoized

        public static <T> jakarta.inject.Provider<T> memoized​(jakarta.inject.Provider<T> delegate)
        Caches the result of provider in a thread safe manner.
        Type Parameters:
        T - The type of result
        Parameters:
        delegate - The provider providing the result
        Returns:
        A new provider that will cache the result