Package jnr.ffi
Class StructLayout.Pointer
java.lang.Object
jnr.ffi.StructLayout.Field
jnr.ffi.StructLayout.NumberField
jnr.ffi.StructLayout.Pointer
- Enclosing class:
StructLayout
Represents a native memory address.
-
Field Summary
Fields inherited from class jnr.ffi.StructLayout.NumberField
type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Pointer
Gets thePointer
value from the native memory.final int
Returns an integer representation of thisPointer
.final long
Returns anlong
representation of thisPointer
.void
Sets the field to a new value.final void
Sets aPointer
value in the native memory.final int
size()
Gets the size of a Pointer in bitsfinal String
Returns a string representation of thisPointer
.Methods inherited from class jnr.ffi.StructLayout.NumberField
byteValue, doubleValue, floatValue, shortValue
Methods inherited from class jnr.ffi.StructLayout.Field
enclosing, offset
-
Constructor Details
-
Pointer
public Pointer()Creates a newAddress
field. -
Pointer
-
-
Method Details
-
get
Gets thePointer
value from the native memory.- Parameters:
ptr
- The pointer to the field.- Returns:
- a
Pointer
.
-
size
public final int size()Gets the size of a Pointer in bits- Returns:
- the size of the Pointer
-
set
Sets aPointer
value in the native memory.- Parameters:
ptr
- The pointer to the write location.value
- The value to set.
-
set
Description copied from class:StructLayout.NumberField
Sets the field to a new value.- Specified by:
set
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.value
- The new value.
-
intValue
Returns an integer representation of thisPointer
.- Specified by:
intValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- an integer value for this
Pointer
.
-
longValue
Returns anlong
representation of thisPointer
.- Overrides:
longValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- an
long
value for thisPointer
.
-
toString
Returns a string representation of thisPointer
.- Overrides:
toString
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- a string representation of this
Pointer
.
-