Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.2.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jna.ptr
Class ByReference

    java.lang.Object
      com.sun.jna.PointerType
          com.sun.jna.ptr.ByReference

All Implemented Interfaces:
  NativeMapped

Direct Known Subclasses:
  ByteByReference, DoubleByReference, FloatByReference, IntByReference, LongByReference, NativeLongByReference, PointerByReference, ShortByReference

    public abstract class ByReference

extends 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
`protected` | `ByReference(int dataSize)`

Method Summary

Methods inherited from class com.sun.jna.PointerType
`equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ByReference

    protected ByReference(int dataSize)

Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.2.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007-2010 Timothy Wall. All Rights Reserved.