# truffle-nfi 25.6.0-elide.4 > API reference for truffle-nfi. Each page below is Markdown; the HTML page of the same name has the same content. llms-full.txt has every page in one file, and api.json is the apidocs/1 model. ## When to use this Use this API reference when you write, read or review code that uses truffle-nfi 25.6.0-elide.4. ## Overview - [⬢ truffle-nfi](index.md): packages and types - [Alphabetical index](index-all.md): find `Type.member` or search by behavior. Check the declaring type and overload, then follow the matching link. - [Declaration contracts](contracts.ndjson): full structured records for a known `Type.member`, including documented parameters, returns and throws. - [llms-full.txt](llms-full.txt): every page in one file - [api.json](api.json): the apidocs/1 model ## Pages - [▣ Package com.oracle.truffle.nfi](com/oracle/truffle/nfi/index.md) - [◆ NFILanguage (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFILanguage.md): parse(TruffleLanguage.ParsingRequest): Throws: Exception - [◆ NFILanguageProvider (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFILanguageProvider.md) - [◆ NFIPointerGen (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFIPointerGen.md) - [◆ NFIPointerGen.NativePointerLibraryEagerProvider (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFIPointerGen.NativePointerLibraryEagerProvider.md) - [◆ NFISignatureGen (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFISignatureGen.md) - [◆ NFISignatureGen.SignatureLibraryEagerProvider (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFISignatureGen.SignatureLibraryEagerProvider.md) - [◆ NFISymbolGen (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFISymbolGen.md) - [◆ NFISymbolGen.NativePointerLibraryEagerProvider (class in com.oracle.truffle.nfi)](com/oracle/truffle/nfi/NFISymbolGen.NativePointerLibraryEagerProvider.md) - [▣ Package com.oracle.truffle.nfi.api](com/oracle/truffle/nfi/api/index.md) - [◆ LongNativePointerLibraryGen (class in com.oracle.truffle.nfi.api)](com/oracle/truffle/nfi/api/LongNativePointerLibraryGen.md) - [◆ LongNativePointerLibraryGen.NativePointerLibraryEagerProvider (class in com.oracle.truffle.nfi.api)](com/oracle/truffle/nfi/api/LongNativePointerLibraryGen.NativePointerLibraryEagerProvider.md) - [◆ NativePointerLibrary (abstract class in com.oracle.truffle.nfi.api)](com/oracle/truffle/nfi/api/NativePointerLibrary.md): This library contains a subset of com.oracle.truffle.api.interop.InteropLibrary messages exported by some NFI objects. asPointer(Object): Throws: UnsupportedMessageException - [◆ SerializableLibrary (abstract class in com.oracle.truffle.nfi.api)](com/oracle/truffle/nfi/api/SerializableLibrary.md): serialize(Object, Object): Throws: UnsupportedMessageException - [◆ SignatureLibrary (abstract class in com.oracle.truffle.nfi.api)](com/oracle/truffle/nfi/api/SignatureLibrary.md): call(Object, Object, Object...): Interpret a pointer as function pointer with the given signature and call it. Throws: ArityException Throws: UnsupportedTypeException Throws: UnsupportedMessageException bind(Object, Object): Create an executable interop object from a signature and a function pointer. createClosure(Object, Object): Create a native closure object with the given signature. - [▣ Package com.oracle.truffle.nfi.backend.spi](com/oracle/truffle/nfi/backend/spi/index.md) - [◆ BackendNativePointerLibrary (abstract class in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/BackendNativePointerLibrary.md): asPointer(Object): Throws: UnsupportedMessageException - [◇ NFIBackend (interface in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIBackend.md): Implementation interface for Truffle NFI backends. parse(NativeLibraryDescriptor): Parse a NativeLibraryDescriptor. - [◇ NFIBackendFactory (interface in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIBackendFactory.md): Service interface for languages that implement a backend for the Truffle NFI. getBackendId(): Provides the backend id. createBackend(ContextThreadLocal): Create an instance of an NFIBackend. - [◆ NFIBackendLibrary (abstract class in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIBackendLibrary.md) - [◆ NFIBackendSignatureBuilderLibrary (abstract class in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIBackendSignatureBuilderLibrary.md) - [◆ NFIBackendSignatureLibrary (abstract class in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIBackendSignatureLibrary.md): Library that specifies the protocol between the Truffle NFI and its backend implementations. call(Object, Object, Object...): Call a native function with this signature. Throws: ArityException Throws: UnsupportedTypeException Throws: UnsupportedMessageException createClosure(Object, Object): Create a function pointer closure that calls back into an executable object. - [◆ NFIState (class in com.oracle.truffle.nfi.backend.spi)](com/oracle/truffle/nfi/backend/spi/NFIState.md): Thread-local state of the NFI that is shared between different backends. savePendingException(): Saves and clears the pending exception so an upcall and its nested calls see a clean state. Returns: the previous pending exception, or null restorePendingException(Throwable): Restores a non-null saved exception, replacing any exception produced by the upcall. - [▣ Package com.oracle.truffle.nfi.backend.spi.types](com/oracle/truffle/nfi/backend/spi/types/index.md) - [◆ NativeLibraryDescriptor (class in com.oracle.truffle.nfi.backend.spi.types)](com/oracle/truffle/nfi/backend/spi/types/NativeLibraryDescriptor.md): Parsed representation of library descriptors of the Truffle NFI. isDefaultLibrary(): Check whether this represents the default library. getFilename(): Returns: the filename of the library, or null for the default library getFlags(): An optional array of implementation dependent flags. - [≡ NativeSimpleType (enum class in com.oracle.truffle.nfi.backend.spi.types)](com/oracle/truffle/nfi/backend/spi/types/NativeSimpleType.md): values(): Returns the enum constants in declaration order. valueOf(String): Returns the enum constant with the given name. - [◆ TypeFactory (abstract class in com.oracle.truffle.nfi.backend.spi.types)](com/oracle/truffle/nfi/backend/spi/types/TypeFactory.md): TypeFactory(): Should be used only by the Truffle NFI. - [▣ Package com.oracle.truffle.nfi.backend.spi.util](com/oracle/truffle/nfi/backend/spi/util/index.md) - [◆ ProfiledArrayBuilder (class in com.oracle.truffle.nfi.backend.spi.util)](com/oracle/truffle/nfi/backend/spi/util/ProfiledArrayBuilder.md) - [◆ ProfiledArrayBuilder.ArrayBuilderFactory (abstract class in com.oracle.truffle.nfi.backend.spi.util)](com/oracle/truffle/nfi/backend/spi/util/ProfiledArrayBuilder.ArrayBuilderFactory.md) - [◇ ProfiledArrayBuilder.ArrayFactory (interface in com.oracle.truffle.nfi.backend.spi.util)](com/oracle/truffle/nfi/backend/spi/util/ProfiledArrayBuilder.ArrayFactory.md) ## Indexes - [Packages](packages.md): every package with its summary and type counts - [All types](types.md): every type, nested ones too, by name - [Index](index-all.md): every declaration from A to Z