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 newAddressfield.PointerField(Struct.Offset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PointergetPointer()Gets thePointervalue from the native memory.intintValue()Returns an integer representation of thisPointer.longlongValue()Returns anlongrepresentation of thisPointer.voidset(Number value)Sets the field to a new value.voidset(Pointer value)Puts aAddressvalue into the native memory.intsize()Gets the size of a Pointer in bitsStringtoString()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 newAddressfield.
-
PointerField
public PointerField(Struct.Offset offset)
-
-
Method Detail
-
getPointer
protected final Pointer 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
public final void set(Pointer value)
Puts aAddressvalue into the native memory.- Parameters:
value- the value to write.
-
set
public void set(Number value)
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
public String toString()
Returns a string representation of thisPointer.- Overrides:
toStringin classStruct.NumberField- Returns:
- a string representation of this
Pointer.
-
-