Package jnr.ffi
Class Struct.PointerField
- java.lang.Object
-
- jnr.ffi.Struct.Member
-
- jnr.ffi.Struct.NumberField
-
- jnr.ffi.Struct.PointerField
-
- Direct Known Subclasses:
Struct.Pointer
,Struct.StructRef
- Enclosing class:
- Struct
public abstract class Struct.PointerField extends Struct.NumberField
-
-
Field Summary
-
Fields inherited from class jnr.ffi.Struct.NumberField
type
-
-
Constructor Summary
Constructors Constructor Description PointerField()
Creates a newAddress
field.PointerField(Struct.Offset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Pointer
getPointer()
Gets thePointer
value from the native memory.int
intValue()
Returns an integer representation of thisPointer
.long
longValue()
Returns anlong
representation of thisPointer
.void
set(java.lang.Number value)
Sets the field to a new value.void
set(Pointer value)
Puts aAddress
value into the native memory.int
size()
Gets the size of a Pointer in bitsjava.lang.String
toString()
Returns a string representation of thisPointer
.-
Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, offset, shortValue, struct
-
-
-
-
Constructor Detail
-
PointerField
public PointerField()
Creates a newAddress
field.
-
PointerField
public PointerField(Struct.Offset offset)
-
-
Method Detail
-
getPointer
protected final Pointer getPointer()
Gets thePointer
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 aAddress
value into the native memory.- Parameters:
value
- the value to write.
-
set
public void set(java.lang.Number value)
Description copied from class:Struct.NumberField
Sets the field to a new value.- Specified by:
set
in classStruct.NumberField
- Parameters:
value
- The new value.
-
intValue
public int intValue()
Returns an integer representation of thisPointer
.- Specified by:
intValue
in classStruct.NumberField
- Returns:
- an integer value for this
Pointer
.
-
longValue
public long longValue()
Returns anlong
representation of thisPointer
.- Overrides:
longValue
in classStruct.NumberField
- Returns:
- an
long
value for thisPointer
.
-
toString
public java.lang.String toString()
Returns a string representation of thisPointer
.- Overrides:
toString
in classStruct.NumberField
- Returns:
- a string representation of this
Pointer
.
-
-