Interface Provider<T extends ProviderInfo<T>>

  • All Superinterfaces:
    com.google.devtools.build.lib.skylarkinterface.SkylarkPrintable, com.google.devtools.build.lib.skylarkinterface.SkylarkValue
    All Known Implementing Classes:
    BuiltInProvider, UserDefinedProvider

    public interface Provider<T extends ProviderInfo<T>>
    extends com.google.devtools.build.lib.skylarkinterface.SkylarkValue
    Declared Provider (a constructor for ProviderInfo).

    Provider serves both as "type identifier" for declared provider instances and as a function that can be called to construct an info of a provider. To the Skylark user, there are "providers" and "provider infos"; the former is a Java instance of this class, and the latter is a Java instance of ProviderInfo.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Provider.Key<T>
      A serializable unique identifier of a Provider.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Provider.Key<T> getKey()
      Returns a serializable representation of this Provider.
      String toString()
      Returns a name of this Provider that should be used in error messages.
      • Methods inherited from interface com.google.devtools.build.lib.skylarkinterface.SkylarkPrintable

        debugPrint, repr, str
      • Methods inherited from interface com.google.devtools.build.lib.skylarkinterface.SkylarkValue

        isHashable, isImmutable
    • Method Detail

      • getKey

        Provider.Key<T> getKey()
        Returns a serializable representation of this Provider.
      • toString

        String toString()
        Returns a name of this Provider that should be used in error messages.
        Overrides:
        toString in class Object