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 PointerGets thePointervalue from the native memory.final intReturns an integer representation of thisPointer.final longReturns anlongrepresentation of thisPointer.voidSets the field to a new value.final voidSets aPointervalue in the native memory.final intsize()Gets the size of a Pointer in bitsfinal StringReturns a string representation of thisPointer.Methods inherited from class jnr.ffi.StructLayout.NumberField
byteValue, doubleValue, floatValue, shortValueMethods inherited from class jnr.ffi.StructLayout.Field
enclosing, offset
-
Constructor Details
-
Pointer
public Pointer()Creates a newAddressfield. -
Pointer
-
-
Method Details
-
get
Gets thePointervalue 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 aPointervalue in the native memory.- Parameters:
ptr- The pointer to the write location.value- The value to set.
-
set
Description copied from class:StructLayout.NumberFieldSets the field to a new value.- Specified by:
setin classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.value- The new value.
-
intValue
Returns an integer representation of thisPointer.- Specified by:
intValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- an integer value for this
Pointer.
-
longValue
Returns anlongrepresentation of thisPointer.- Overrides:
longValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- an
longvalue for thisPointer.
-
toString
Returns a string representation of thisPointer.- Overrides:
toStringin classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- a string representation of this
Pointer.
-