NativeMapped (JNA API)

com.sun.jna

## Interface NativeMapped

- All Known Implementing Classes:
    BaseTSD.DWORD_PTR, BaseTSD.LONG_PTR, BaseTSD.SIZE_T, BaseTSD.SSIZE_T, BaseTSD.ULONG_PTR, BaseTSD.ULONG_PTRByReference, ByReference, ByteByReference, COMBindingBaseObject, COMEarlyBindingObject, COMInvoker, COMLateBindingObject, ConnectionPoint, ConnectionPointContainer, Ddeml.HCONV, Ddeml.HCONVLIST, Ddeml.HDDEDATA, Ddeml.HSZ, Dispatch, Dispatch.ByReference, DoubleByReference, EnumMoniker, FloatByReference, Guid.REFIID, HighLevelMonitorConfigurationAPI.MC_COLOR_TEMPERATURE.ByReference, HighLevelMonitorConfigurationAPI.MC_DISPLAY_TECHNOLOGY_TYPE.ByReference, IntByReference, IntegerType, LongByReference, LowLevelMonitorConfigurationAPI.MC_VCP_CODE_TYPE.ByReference, Moniker, Moniker.ByReference, NativeLong, NativeLongByReference, OaIdl._VARIANT_BOOL, OaIdl._VARIANT_BOOLByReference, OaIdl.DISPID, OaIdl.DISPIDByReference, OaIdl.HREFTYPE, OaIdl.HREFTYPEByReference, OaIdl.MEMBERID, OaIdl.MEMBERIDByReference, OaIdl.VARIANT_BOOL, OaIdl.VARIANT_BOOLByReference, PointerByReference, PointerType, RecordInfo, RecordInfo.ByReference, RunningObjectTable, RunningObjectTable.ByReference, ShortByReference, Structure.FFIType.size_t, TypeComp, TypeComp.ByReference, TypeInfo, TypeInfo.ByReference, TypeLib, TypeLib.ByReference, Unknown, Unknown.ByReference, WinBase.DCB.DCBControllBits, WinDef.ATOM, WinDef.BOOL, WinDef.BOOLByReference, WinDef.BYTE, WinDef.CHAR, WinDef.CHARByReference, WinDef.DWORD, WinDef.DWORDByReference, WinDef.DWORDLONG, WinDef.HBITMAP, WinDef.HBRUSH, WinDef.HCURSOR, WinDef.HDC, WinDef.HFONT, WinDef.HGLRC, WinDef.HGLRCByReference, WinDef.HICON, WinDef.HINSTANCE, WinDef.HMENU, WinDef.HMODULE, WinDef.HPALETTE, WinDef.HPEN, WinDef.HRGN, WinDef.HRSRC, WinDef.HWND, WinDef.INT_PTR, WinDef.LCID, WinDef.LONG, WinDef.LONGByReference, WinDef.LONGLONG, WinDef.LONGLONGByReference, WinDef.LPARAM, WinDef.LPVOID, WinDef.LRESULT, WinDef.PVOID, WinDef.SCODE, WinDef.SCODEByReference, WinDef.SHORT, WinDef.UCHAR, WinDef.UINT, WinDef.UINT_PTR, WinDef.UINTByReference, WinDef.ULONG, WinDef.ULONGByReference, WinDef.ULONGLONG, WinDef.ULONGLONGByReference, WinDef.USHORT, WinDef.USHORTByReference, WinDef.WORD, WinDef.WORDByReference, WinDef.WPARAM, Winevt.EVT_HANDLE, WinNT.HANDLE, WinNT.HANDLEByReference, WinNT.HRESULT, WinNT.PACLByReference, WinNT.PSIDByReference, WinReg.HKEY, WinReg.HKEYByReference, Winsvc.SC_HANDLE, WinUser.HDEVNOTIFY, WinUser.HHOOK, WinUser.HMONITOR, WTypes.BSTR, WTypes.BSTR.ByReference, WTypes.BSTRByReference, WTypes.LPOLESTR, WTypes.LPOLESTR.ByReference, WTypes.LPSTR, WTypes.LPSTR.ByReference, WTypes.LPWSTR, WTypes.LPWSTR.ByReference, WTypes.VARTYPE, WTypes.VARTYPEByReference, X11.Atom, X11.AtomByReference, X11.Colormap, X11.Cursor, X11.Display, X11.Drawable, X11.Font, X11.GC, X11.KeySym, X11.Pixmap, X11.Screen, X11.Visual, X11.VisualID, X11.Window, X11.WindowByReference, X11.XID, X11.XImage, X11.Xrender.PictFormat

      public interface NativeMapped

  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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `fromNative(java.lang.Object nativeValue, FromNativeContext context)` Convert the given native object into its Java representation using the given context.
    `java.lang.Class<?>` | `nativeType()` Indicate the native type used by this converter.
    `java.lang.Object` | `toNative()` Convert this object into a supported native type.

- - ### Method Detail

    - #### fromNative

          java.lang.Object fromNative(java.lang.Object nativeValue,
                                      FromNativeContext context)

      Convert the given native object into its Java representation using the given context.
      Parameters:
        `nativeValue` - Java representation of the native type to be converted.
        `context` - Context in which the conversion is taking place.
      Returns:
        Converted object.

    - #### toNative

          java.lang.Object toNative()

      Convert this object into a supported native type.
      Returns:
        Java representation of the original Java object converted to a native type.

    - #### nativeType

          java.lang.Class<?> nativeType()

      Indicate the native type used by this converter.
      Returns:
        Java class representation of the native type.

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.