Top Description Constructors Methods
com.sun.jna.ptr

public abstract Class ByReference

extends PointerType
Class Inheritance
Known Direct Subclasses
com.sun.jna.ptr.ByteByReference, com.sun.jna.ptr.DoubleByReference, com.sun.jna.ptr.FloatByReference, com.sun.jna.ptr.IntByReference, com.sun.jna.ptr.LongByReference, com.sun.jna.ptr.NativeLongByReference, com.sun.jna.ptr.PointerByReference, com.sun.jna.ptr.ShortByReference, com.sun.jna.examples.unix.X11.AtomByReference, com.sun.jna.examples.unix.X11.WindowByReference, com.sun.jna.examples.win32.W32API.HANDLEByReference
Imports
com.sun.jna.Memory, .NativeMapped, .Pointer, .PointerType

Provides generic "pointer to type" functionality, often used in C code to return values to the caller in addition to a function result.

Derived classes should define setValue(<T>) and <T> getValue() methods which write to/read from memory.

This class derives from PointerType instead of Memory in order to restrict the API to only getValue/setValue.

Note

this class would ideally be replaced by a generic.

Constructor Summary

AccessConstructor and Description
protected
ByReference(int dataSize)

Method Summary

Inherited from com.sun.jna.PointerType:
equalsfromNativegetPointerhashCodenativeTypesetPointertoNative

Constructor Detail

ByReferenceback to summary
protected ByReference(int dataSize)