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
-
Field Summary
Fields inherited from class jnr.ffi.Struct.NumberField
type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final Pointer
Gets thePointer
value from the native memory.int
intValue()
Returns an integer representation of thisPointer
.long
Returns anlong
representation of thisPointer
.void
Sets the field to a new value.final void
Puts aAddress
value into the native memory.final int
size()
Gets the size of a Pointer in bitstoString()
Returns a string representation of thisPointer
.Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, offset, shortValue, struct
-
Constructor Details
-
PointerField
public PointerField()Creates a newAddress
field. -
PointerField
-
-
Method Details
-
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
Puts aAddress
value into the native memory.- Parameters:
value
- the value to write.
-
set
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
Returns a string representation of thisPointer
.- Overrides:
toString
in classStruct.NumberField
- Returns:
- a string representation of this
Pointer
.
-