Top Description Fields Constructors Methods
com.sun.jna

public Class NativeMappedConverter

extends Object
implements TypeConverter
Class Inheritance
All Implemented Interfaces
com.sun.jna.TypeConverter, com.sun.jna.ToNativeConverter, com.sun.jna.FromNativeConverter
Imports
java.lang.ref.Reference, .SoftReference, java.lang.reflect.InvocationTargetException, java.util.Map, .WeakHashMap

Provides type conversion for instances of NativeMapped.

Field Summary

Modifier and TypeField and Description
private static final Map<Class<?>, Reference<NativeMappedConverter>>
private final NativeMapped
private final Class<?>
private final Class<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public NativeMapped
public Object
fromNative(Object nativeValue, FromNativeContext context)

Implements com.sun.jna.FromNativeConverter.fromNative.

Convert the given native object into its Java representation using the given context.
public static NativeMappedConverter
public Class<?>
nativeType()

Implements com.sun.jna.FromNativeConverter.nativeType, com.sun.jna.ToNativeConverter.nativeType.

Indicate the native type used by this converter.
public Object
toNative(Object value, ToNativeContext context)

Implements com.sun.jna.ToNativeConverter.toNative.

Convert a Java type to an appropriate native type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

convertersback to summary
private static final Map<Class<?>, Reference<NativeMappedConverter>> converters
instanceback to summary
private final NativeMapped instance
nativeTypeback to summary
private final Class<?> nativeType
typeback to summary
private final Class<?> type

Constructor Detail

NativeMappedConverterback to summary
public NativeMappedConverter(Class<?> type)

Method Detail

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

Implements com.sun.jna.FromNativeConverter.fromNative.

Doc from com.sun.jna.FromNativeConverter.fromNative.

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

Annotations
@Override
getInstanceback to summary
public static NativeMappedConverter getInstance(Class<?> cls)
nativeTypeback to summary
public Class<?> nativeType()

Implements com.sun.jna.FromNativeConverter.nativeType, com.sun.jna.ToNativeConverter.nativeType.

Doc from com.sun.jna.FromNativeConverter.nativeType.

Indicate the native type used by this converter.

Annotations
@Override
toNativeback to summary
public Object toNative(Object value, ToNativeContext context)

Implements com.sun.jna.ToNativeConverter.toNative.

Doc from com.sun.jna.ToNativeConverter.toNative.

Convert a Java type to an appropriate native type. The new type must be one of the following classes:

Annotations
@Override