Top Description Methods
com.sun.jna

public Interface NativeMapped

Known Direct Implementers
com.sun.jna.PointerType, com.sun.jna.IntegerType

Provide conversion for a Java type to and from a native type. Function and Structure will use this interface to determine how to map a given Java object into a native type.

Implementations of this interface must provide a no-args constructor.

See ToNativeConverter for a list of allowable native types.

Author
wmeissner

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

Converted object.
fromNative
(Object
Java representation of the native type to be converted.
nativeValue
,
FromNativeContext
Context in which the conversion is taking place.
context
)

Convert the given native object into its Java representation using the given context.

public Class<?>

Returns:

Java class representation of the native type.
nativeType
()

Indicate the native type used by this converter.

public Object

Returns:

Java representation of the original Java object converted to a native type.
toNative
()

Convert this object into a supported native type.

Method Detail

fromNativeback to summary
public Object fromNative(Object nativeValue, FromNativeContext context)

Convert the given native object into its Java representation using the given context.

Parameters
nativeValue:Object

Java representation of the native type to be converted.

context:FromNativeContext

Context in which the conversion is taking place.

Returns:Object

Converted object.

nativeTypeback to summary
public Class<?> nativeType()

Indicate the native type used by this converter.

Returns:Class<?>

Java class representation of the native type.

toNativeback to summary
public Object toNative()

Convert this object into a supported native type.

Returns:Object

Java representation of the original Java object converted to a native type.