com.sun.jna

## Interface ToNativeConverter

- All Known Subinterfaces:
    TypeConverter
  All Known Implementing Classes:
    NativeMappedConverter

      public interface ToNativeConverter

  Define conversion from a Java type to its corresponding native type.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Class` | `nativeType()` Indicate the type expected from `toNative(java.lang.Object, com.sun.jna.ToNativeContext)`.
    `java.lang.Object` | `toNative(java.lang.Object value, ToNativeContext context)` Convert a Java type to an appropriate native type.

- - ### Method Detail

    - #### toNative

          java.lang.Object toNative(java.lang.Object value,
                                  ToNativeContext context)

      Convert 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
      - `WString`
      - `Buffer`
      - primitive array

    - #### nativeType

          java.lang.Class nativeType()

      Indicate the type expected from `toNative(java.lang.Object, com.sun.jna.ToNativeContext)`.

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