Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.2.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`Class` | `nativeType()` Indicate the type expected from `toNative(java.lang.Object, com.sun.jna.ToNativeContext)`.
`Object` | `toNative(Object value, ToNativeContext context)` Convert a Java type to an appropriate native type.

Method Detail

### toNative

    Object toNative(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

    Class nativeType()

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.2.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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