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 Address
get()
Reads anAddress
value from the struct.final int
intValue()
Returns an integer representation of this address.final long
Returns anlong
representation of this address.void
Sets the field to a new value.final void
Puts aAddress
value into the native memory.final String
toString()
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 newAddress
field. -
Address
-
-
Method Details
-
get
Reads anAddress
value from the struct.- Returns:
- a
Address
.
-
set
Puts aAddress
value into the native memory.- Parameters:
value
- the value to write.
-
set
Description copied from class:Struct.NumberField
Sets the field to a new value.- Specified by:
set
in classStruct.NumberField
- Parameters:
value
- The new value.
-
intValue
public final int intValue()Returns an integer representation of this address.- Specified by:
intValue
in classStruct.NumberField
- Returns:
- an integer value for this address.
-
longValue
public final long longValue()Returns anlong
representation of this address.- Overrides:
longValue
in classStruct.NumberField
- Returns:
- an
long
value for this address.
-
toString
Returns a string representation of thisAddress
.- Overrides:
toString
in classStruct.NumberField
- Returns:
- a string representation of this
Address
.
-