com.kenai.jaffl.byref
Class IntByReference

java.lang.Object
  extended by com.kenai.jaffl.byref.AbstractPrimitiveReference<Integer>
      extended by com.kenai.jaffl.byref.IntByReference
All Implemented Interfaces:
ByReference<Integer>

public final class IntByReference
extends AbstractPrimitiveReference<Integer>

A class to pass a reference (or address of) an Integer to a method.


Field Summary
 
Fields inherited from class com.kenai.jaffl.byref.AbstractPrimitiveReference
value
 
Constructor Summary
IntByReference(Integer value)
          Creates a new reference to a integer value
 
Method Summary
 void marshal(ByteBuffer buffer)
          Copies the integer value to native memory
 int nativeSize()
          Gets the native size of type of reference
 Class nativeType()
          Gets the native type of the reference
 void unmarshal(ByteBuffer buffer)
          Copies the integer value from native memory
 
Methods inherited from class com.kenai.jaffl.byref.AbstractPrimitiveReference
getValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntByReference

public IntByReference(Integer value)
Creates a new reference to a integer value

Parameters:
value - the initial native value
Method Detail

marshal

public void marshal(ByteBuffer buffer)
Copies the integer value to native memory

Parameters:
buffer - the native memory buffer

unmarshal

public void unmarshal(ByteBuffer buffer)
Copies the integer value from native memory

Parameters:
buffer - the native memory buffer.

nativeSize

public int nativeSize()
Gets the native size of type of reference

Returns:
Integer.SIZE

nativeType

public Class nativeType()
Gets the native type of the reference

Overrides:
nativeType in class AbstractPrimitiveReference<Integer>
Returns:
Integer.class


Copyright © 2011. All Rights Reserved.