Top Fields Constructors Methods
jnr.ffi.byref

public final Class DoubleByReference

extends AbstractNumberReference<Double>
Class Inheritance
Imports
jnr.ffi.Pointer, .Runtime

Field Summary

Modifier and TypeField and Description
private static final Double
Inherited from jnr.ffi.byref.AbstractNumberReference:
value

Constructor Summary

AccessConstructor and Description
public
DoubleByReference()

Creates a new reference to a double value initialized to zero.

public
DoubleByReference(Double
the initial native value
value
)

Creates a new reference to a double value

public
DoubleByReference(double
the initial native value
value
)

Creates a new reference to a double value

Method Summary

Modifier and TypeMethod and Description
public void
fromNative(Runtime
the current runtime.
runtime
,
Pointer
the native memory buffer.
buffer
,
long
the memory offset.
offset
)

Implements jnr.ffi.byref.ByReference.fromNative.

Copies the double value from native memory
public final int

Returns:

the size of a byte in bytes.
nativeSize
(Runtime
the current runtime.
runtime
)

Implements jnr.ffi.byref.ByReference.nativeSize.

Gets the native size of type of reference in bytes.
public void
toNative(Runtime
the current runtime.
runtime
,
Pointer
the native memory buffer.
buffer
,
long
the memory offset.
offset
)

Implements jnr.ffi.byref.ByReference.toNative.

Copies the double value to native memory
Inherited from jnr.ffi.byref.AbstractNumberReference:
byteValuecheckNulldoubleValuefloatValuegetValueintValuelongValueshortValue

Field Detail

DEFAULTback to summary
private static final Double DEFAULT

Constructor Detail

DoubleByReferenceback to summary
public DoubleByReference()

Creates a new reference to a double value initialized to zero.

DoubleByReferenceback to summary
public DoubleByReference(Double value)

Creates a new reference to a double value

Parameters
value:Double

the initial native value

DoubleByReferenceback to summary
public DoubleByReference(double value)

Creates a new reference to a double value

Parameters
value:double

the initial native value

Method Detail

fromNativeback to summary
public void fromNative(Runtime runtime, Pointer buffer, long offset)

Implements jnr.ffi.byref.ByReference.fromNative.

Copies the double value from native memory

Parameters
runtime:Runtime

the current runtime.

buffer:Pointer

the native memory buffer.

offset:long

the memory offset.

nativeSizeback to summary
public final int nativeSize(Runtime runtime)

Implements jnr.ffi.byref.ByReference.nativeSize.

Gets the native size of type of reference in bytes.

Parameters
runtime:Runtime

the current runtime.

Returns:int

the size of a byte in bytes.

toNativeback to summary
public void toNative(Runtime runtime, Pointer buffer, long offset)

Implements jnr.ffi.byref.ByReference.toNative.

Copies the double value to native memory

Parameters
runtime:Runtime

the current runtime.

buffer:Pointer

the native memory buffer.

offset:long

the memory offset.