Package com.sun.jna
Class NativeMappedConverter
- java.lang.Object
-
- com.sun.jna.NativeMappedConverter
-
- All Implemented Interfaces:
FromNativeConverter,ToNativeConverter,TypeConverter
public class NativeMappedConverter extends Object implements TypeConverter
Provides type conversion for instances ofNativeMapped.
-
-
Constructor Summary
Constructors Constructor Description NativeMappedConverter(Class<?> type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NativeMappeddefaultValue()ObjectfromNative(Object nativeValue, FromNativeContext context)Convert the given native object into its Java representation using the given context.static NativeMappedConvertergetInstance(Class<?> cls)Class<?>nativeType()Indicate the native type used by this converter.ObjecttoNative(Object value, ToNativeContext context)Convert a Java type to an appropriate native type.
-
-
-
Constructor Detail
-
NativeMappedConverter
public NativeMappedConverter(Class<?> type)
-
-
Method Detail
-
getInstance
public static NativeMappedConverter getInstance(Class<?> cls)
-
defaultValue
public NativeMapped defaultValue()
-
fromNative
public Object fromNative(Object nativeValue, FromNativeContext context)
Description copied from interface:FromNativeConverterConvert the given native object into its Java representation using the given context.- Specified by:
fromNativein interfaceFromNativeConverter
-
nativeType
public Class<?> nativeType()
Description copied from interface:FromNativeConverterIndicate the native type used by this converter.- Specified by:
nativeTypein interfaceFromNativeConverter- Specified by:
nativeTypein interfaceToNativeConverter
-
toNative
public Object toNative(Object value, ToNativeContext context)
Description copied from interface:ToNativeConverterConvert a Java type to an appropriate native type. The new type must be one of the following classes:Pointer- Boolean
- Byte
- Short
- Character
- Integer
NativeLong- Long
- Float
- Double
Structure- String
WStringBuffer(unsupported in direct mode)- primitive array (unsupported in direct mode)
- Specified by:
toNativein interfaceToNativeConverter
-
-