Package jnr.ffi
Class Struct.Address
- java.lang.Object
-
- jnr.ffi.Struct.Member
-
- jnr.ffi.Struct.NumberField
-
- jnr.ffi.Struct.Address
-
- Enclosing class:
- Struct
public class Struct.Address extends Struct.NumberField
Represents a native memory address.
-
-
Field Summary
-
Fields inherited from class jnr.ffi.Struct.NumberField
type
-
-
Constructor Summary
Constructors Constructor Description Address()
Creates a newAddress
field.Address(Struct.Offset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Address
get()
Reads anAddress
value from the struct.int
intValue()
Returns an integer representation of this address.long
longValue()
Returns anlong
representation of this address.void
set(java.lang.Number value)
Sets the field to a new value.void
set(Address value)
Puts aAddress
value into the native memory.java.lang.String
toString()
Returns a string representation of thisAddress
.-
Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, offset, shortValue, struct
-
-
-
-
Constructor Detail
-
Address
public Address()
Creates a newAddress
field.
-
Address
public Address(Struct.Offset offset)
-
-
Method Detail
-
set
public final void set(Address value)
Puts aAddress
value into the native memory.- Parameters:
value
- the value to write.
-
set
public void set(java.lang.Number value)
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
public final java.lang.String toString()
Returns a string representation of thisAddress
.- Overrides:
toString
in classStruct.NumberField
- Returns:
- a string representation of this
Address
.
-
-