org.rococoa.internal
Class BoolConverter

java.lang.Object
  extended by org.rococoa.internal.BoolConverter
All Implemented Interfaces:
com.sun.jna.FromNativeConverter, com.sun.jna.ToNativeConverter

public class BoolConverter
extends Object
implements com.sun.jna.ToNativeConverter, com.sun.jna.FromNativeConverter

Converts java.lang.Boolean to native by mapping to java.lang.Integer as defined by: #define YES (BOOL) 1 #define NO (BOOL) 0

Version:
$Id: BoolConverter.java,v 1.0 Feb 19, 2010 8:44:39 PM haraldk Exp$
Author:
Harald Kuhr, last modified by $Author: haraldk$

Constructor Summary
BoolConverter()
           
 
Method Summary
 Object fromNative(Object value, com.sun.jna.FromNativeContext context)
           
 Class<Byte> nativeType()
           
 Object toNative(Object value, com.sun.jna.ToNativeContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoolConverter

public BoolConverter()
Method Detail

toNative

public Object toNative(Object value,
                       com.sun.jna.ToNativeContext context)
Specified by:
toNative in interface com.sun.jna.ToNativeConverter

fromNative

public Object fromNative(Object value,
                         com.sun.jna.FromNativeContext context)
Specified by:
fromNative in interface com.sun.jna.FromNativeConverter

nativeType

public Class<Byte> nativeType()
Specified by:
nativeType in interface com.sun.jna.FromNativeConverter
Specified by:
nativeType in interface com.sun.jna.ToNativeConverter


Copyright © 2012. All Rights Reserved.