Class ProviderUtils

java.lang.Object
io.micronaut.context.ProviderUtils

public class ProviderUtils extends Object
Helper methods for dealing with Provider.
Since:
2.0.2
Author:
Denis Stepanov
  • Constructor Details

    • ProviderUtils

      public ProviderUtils()
  • Method Details

    • memoized

      public static <T> Provider<T> memoized(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