jnr.ffi
Class StructLayout.Pointer

java.lang.Object
  extended by jnr.ffi.StructLayout.Field
      extended by jnr.ffi.StructLayout.NumberField
          extended by jnr.ffi.StructLayout.Pointer
Enclosing class:
StructLayout

public class StructLayout.Pointer
extends StructLayout.NumberField

Represents a native memory address.


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

Constructor Detail

StructLayout.Pointer

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


StructLayout.Pointer

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

get

public final Pointer get(Pointer ptr)
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 ptr,
                      Pointer value)
Sets a Pointer value in the native memory.


set

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

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

intValue

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

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

longValue

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

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

toString

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

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


Copyright © 2013. All Rights Reserved.