Class UserDefinedProvider

  • All Implemented Interfaces:

    public class UserDefinedProvider
    implements Provider<UserDefinedProviderInfo>,,
    A Provider defined by a user in a build file that creates UserDefinedProviderInfo instances. This is only intended to be used within the context of user defined rules, and as such, UserDefinedProviderInfo instances that are created contain skylark-compatible values, rather than normal java/guava classes. In the future type restriction may also be allowed.

    NOTE: Until export(Label, String) is called, many methods (especially ones that get the user defined name of the class) are not safe to call.

    • Field Summary

      • Fields inherited from class

        enforcedArgumentTypes, location, objectType, paramDoc, signature
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Object call​(Object[] args, ast, env)  
      void export​( extensionLabel, String exportedName)  
      Provider.Key<UserDefinedProviderInfo> getKey()
      Returns a serializable representation of this Provider.
      String getName()  
      boolean isExported()  
      boolean isImmutable()  
      void repr​( printer)  
      String toString()
      Returns a name of this Provider that should be used in error messages.
      • Methods inherited from class

        call, callWithArgArray, canonicalizeArguments, configure, configure, getArgArraySize, getEnforcedArgumentTypes, getFullName, getLocation, getObjectType, getObjectTypeString, getOrCreateChildEnvironment, getParamDoc, getShortSignature, getSignature, hasSelfArgument, isConfigured, printTypeString, processArguments
      • Methods inherited from interface

        debugPrint, str
      • Methods inherited from interface

    • Method Detail

      • isImmutable

        public boolean isImmutable()
        Specified by:
        isImmutable in interface
        isImmutable in class
      • repr

        public void repr​( printer)
        Specified by:
        repr in interface
        repr in class
      • isExported

        public boolean isExported()
        Specified by:
        isExported in interface
      • getName

        public String getName()
        getName in class
      • export

        public void export​( extensionLabel,
                           String exportedName)
        Specified by:
        export in interface
      • toString

        public String toString()
        Description copied from interface: Provider
        Returns a name of this Provider that should be used in error messages.
        Specified by:
        toString in interface Provider<UserDefinedProviderInfo>
        toString in class
      • call

        protected Object call​(Object[] args,
        call in class