Class LibraryExport<T extends Library>

java.lang.Object
com.oracle.truffle.api.library.LibraryExport<T>

public abstract class LibraryExport<T extends Library> extends Object
Base class for generated export classes. This class is not intended to be sub-classed or used manually.
Since:
19.0
See Also:
  • Constructor Details

    • LibraryExport

      protected LibraryExport(Class<? extends T> library, Class<?> receiverClass, boolean defaultExport)
      Constructor for generated code. Do not call manually.
      Since:
      19.0
    • LibraryExport

      protected LibraryExport(Class<? extends T> library, Class<?> receiverClass, boolean defaultExport, boolean aot, int aotPriority)
      Constructor for generated code. Do not call manually.
      Since:
      21.2
  • Method Details

    • createUncached

      protected abstract T createUncached(Object receiver)
      Implemented generated by ExportLibrary. Do not implement manually.
      Since:
      19.0
    • createCached

      protected abstract T createCached(Object receiver)
      Implemented generated by ExportLibrary. Do not implement manually.
      Since:
      19.0
    • assertAdopted

      protected static boolean assertAdopted(Node node)
      Internal method for generated code only.
      Since:
      23.1
    • createDelegate

      protected static <T extends Library> T createDelegate(LibraryFactory<T> factory, T delegate)
      Internal method for generated code only.
      Since:
      20.0
    • createMessageBitSet

      protected static FinalBitSet createMessageBitSet(LibraryFactory<?> factory, String... messageNames)
      Internal method for generated code only.
      Since:
      20.0
    • toString

      public final String toString()
      Overrides:
      toString in class Object
      Since:
      19.0
    • register

      public static <T extends Library> void register(Class<?> receiverClass, LibraryExport<?>... libs)
      Called only by code generated by ExportLibrary. Do not call manually. Multiple calls with the same receiver class will lead to an IllegalStateException.
      Since:
      19.0