# Package com.sun.jna

package com.sun.jna
Provides simplified native library access. See the overview for usage details.

Related Packages
Package
Description
com.sun.jna.internal
Provides internal utilities.
com.sun.jna.platform
Provides cross-platform utilities based on platform-specific libraries.
com.sun.jna.ptr
Provides various native pointer-to-type (`<type> *`) representations.
com.sun.jna.win32
Provides type and function mappers required for standard APIs on the Windows platform.
Class
Description
AltCallingConvention
Tagging interface to indicate the library or callback uses an alternate calling convention.
Callback
All callback definitions must derive from this interface.
Callback.UncaughtExceptionHandler
CallbackParameterContext
Provide argument conversion context for a callback invocation.
CallbackProxy
Placeholder proxy interface to allow an InvocationHandler to convert arguments/return values on callback methods.
CallbackReference
Provides a reference to an association between a native callback closure and a Java `Callback` closure.
CallbackReference.AttachOptions
CallbackResultContext
Conversion context from a Java `Callback` result to a native value.
CallbackThreadInitializer
DefaultTypeMapper
Provide custom mappings to and from native types.
ELFAnalyser
Analyse an ELF file for platform specific attributes.
ELFAnalyser.ArmAeabiAttributesTag
ELFAnalyser.ArmAeabiAttributesTag.ParameterType
ELFAnalyser.ELFSectionHeaderEntry
ELFAnalyser.ELFSectionHeaders
FromNativeContext
Provides context for converting a native value into a Java type.
FromNativeConverter
Define conversion from a native type to the appropriate Java type.
Function
An abstraction for a native function pointer.
Function.PostCallRead
Any argument which implements this interface will have the `Function.PostCallRead.read()` method called immediately after function invocation.
FunctionMapper
Provides mapping of Java method names to native function names.
FunctionParameterContext
FunctionResultContext
Provide result conversion context for a function call.
IntegerType
Represents a native integer value, which may have a platform-specific size (e.g.
InvocationMapper
Provide a method for overriding how a given function is invoked.
JNIEnv
Marker type for the JNIEnv pointer.
Klass
LastErrorException
Exception representing a non-zero error code returned in either `errno` or `GetLastError()`.
Library
Derive from this interface for all native library definitions.
Library.Handler
Memory
A `Pointer` to memory obtained from the native heap via a call to `malloc`.
MethodParameterContext
MethodResultContext
Provide result conversion context for a function call that is called via a Library interface.
Native
Provides generation of invocation plumbing for a defined native library interface.
Native.ffi_callback
NativeLibrary
Provides management of native library resources.
NativeLong
Represents the `long` C data type, which may be 32 or 64 bits on *nix-based systems.
NativeMapped
Provide conversion for a Java type to and from a native type.
NativeMappedConverter
Provides type conversion for instances of `NativeMapped`.
NativeString
Provides a temporary allocation of an immutable C string (`const char*` or `const wchar_t*`) for use when converting a Java String into a native memory function argument.
Platform
Provide simplified platform information.
Pointer
An abstraction for a native pointer data type.
PointerType
Type representing a type-safe native pointer.
StringArray
Handle native array of `char*` or `wchar_t*` type by managing allocation/disposal of native strings within an array of pointers.
Structure
Represents a native structure with a Java peer class.
Structure.ByReference
Tagging interface to indicate the address of an instance of the Structure type is to be used within a `Structure` definition rather than nesting the full Structure contents.
Structure.ByValue
Tagging interface to indicate the value of an instance of the `Structure` type is to be used in function invocations rather than its address.
Structure.FFIType
This class auto-generates an ffi_type structure appropriate for a given structure for use by libffi.
Structure.FFIType.size_t
Structure.FieldOrder
Used to declare fields order as metadata instead of method.
Structure.StructField
Structure.StructureSet
Avoid using a hash-based implementation since the hash code for a Structure is not immutable.
StructureReadContext
Provide native to Java type conversion context for a `Structure` field read.
StructureWriteContext
Provide Java to native type conversion context for a `Structure` field write.
SymbolProvider
Interface to define a custom symbol provider.
ToNativeContext
Context for converting a Java value to a native one.
ToNativeConverter
Define conversion from a Java type to its corresponding native type.
TypeConverter
Convenience interface for bidirectional conversion.
TypeMapper
Provides converters for conversion to and from native types.
Union
Represents a native union.
VarArgsChecker
Class for checking if a method has vararg parameters.
Version
WeakMemoryHolder
Helper to hold a memory object based on the lifetime of another object.
WString
Simple wrapper class to identify a wide string argument or return type.