jnr.ffi
Class Struct.Pointer

java.lang.Object
  extended by jnr.ffi.Struct.Member
      extended by jnr.ffi.Struct.NumberField
          extended by jnr.ffi.Struct.Pointer
Enclosing class:
Struct

public class Struct.Pointer
extends Struct.NumberField

Represents a native memory address.


Field Summary
 
Fields inherited from class jnr.ffi.Struct.NumberField
type
 
Constructor Summary
Struct.Pointer()
          Creates a new Address field.
Struct.Pointer(Struct.Offset offset)
           
 
Method Summary
 Pointer get()
          Gets the Pointer value from the native memory.
 int intValue()
          Returns an integer representation of this Pointer.
 long longValue()
          Returns an long representation of this Pointer.
 void set(Number value)
          Sets the field to a new value.
 void set(Pointer value)
          Puts a Address value into the native memory.
 int size()
          Gets the size of a Pointer in bits
 String toString()
          Returns a string representation of this Pointer.
 
Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, offset, shortValue, struct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Struct.Pointer

public Struct.Pointer()
Creates a new Address field.


Struct.Pointer

public Struct.Pointer(Struct.Offset offset)
Method Detail

get

public final Pointer get()
Gets the Pointer value from the native memory.

Returns:
a Pointer.

size

public final int size()
Gets the size of a Pointer in bits

Returns:
the size of the Pointer

set

public final void set(Pointer value)
Puts a Address value into the native memory.


set

public void set(Number value)
Description copied from class: Struct.NumberField
Sets the field to a new value.

Specified by:
set in class Struct.NumberField
Parameters:
value - The new value.

intValue

public final int intValue()
Returns an integer representation of this Pointer.

Specified by:
intValue in class Struct.NumberField
Returns:
an integer value for this Pointer.

longValue

public final long longValue()
Returns an long representation of this Pointer.

Overrides:
longValue in class Struct.NumberField
Returns:
an long value for this Pointer.

toString

public final String toString()
Returns a string representation of this Pointer.

Overrides:
toString in class Struct.NumberField
Returns:
a string representation of this Pointer.


Copyright © 2012. All Rights Reserved.