Package jnr.ffi
Class Struct.Address
java.lang.Object
jnr.ffi.Struct.Member
jnr.ffi.Struct.NumberField
jnr.ffi.Struct.Address
- Enclosing class:
- Struct
Represents a native memory address.
-
Field Summary
Fields inherited from class jnr.ffi.Struct.NumberField
type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Addressget()Reads anAddressvalue from the struct.final intintValue()Returns an integer representation of this address.final longReturns anlongrepresentation of this address.voidSets the field to a new value.final voidPuts aAddressvalue into the native memory.final StringtoString()Returns a string representation of thisAddress.Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, offset, shortValue, struct
-
Constructor Details
-
Address
public Address()Creates a newAddressfield. -
Address
-
-
Method Details
-
get
Reads anAddressvalue from the struct.- Returns:
- a
Address.
-
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 final int intValue()Returns an integer representation of this address.- Specified by:
intValuein classStruct.NumberField- Returns:
- an integer value for this address.
-
longValue
public final long longValue()Returns anlongrepresentation of this address.- Overrides:
longValuein classStruct.NumberField- Returns:
- an
longvalue for this address.
-
toString
Returns a string representation of thisAddress.- Overrides:
toStringin classStruct.NumberField- Returns:
- a string representation of this
Address.
-