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 PointerGets thePointervalue from the native memory.intintValue()Returns an integer representation of thisPointer.longReturns anlongrepresentation of thisPointer.voidSets the field to a new value.final voidPuts aAddressvalue into the native memory.final intsize()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 newAddressfield. -
PointerField
-
-
Method Details
-
getPointer
Gets thePointervalue 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 aAddressvalue into the native memory.- Parameters:
value- the value to write.
-
set
Description copied from class:Struct.NumberFieldSets the field to a new value.- Specified by:
setin classStruct.NumberField- Parameters:
value- The new value.
-
intValue
public int intValue()Returns an integer representation of thisPointer.- Specified by:
intValuein classStruct.NumberField- Returns:
- an integer value for this
Pointer.
-
longValue
public long longValue()Returns anlongrepresentation of thisPointer.- Overrides:
longValuein classStruct.NumberField- Returns:
- an
longvalue for thisPointer.
-
toString
Returns a string representation of thisPointer.- Overrides:
toStringin classStruct.NumberField- Returns:
- a string representation of this
Pointer.
-