1 package org
.eclipse
.linuxtools
.internal
.lttng
.jni
.common
;
3 public class Jni_C_Pointer_And_Library_Id
extends Jni_C_Pointer
{
6 // Needed to know which library we need to make our functions call in case several are loaded
7 // This make possible to use several different trace version at the same time
8 private int libraryId
= -1;
11 * Default constructor.<p>
13 * Note : Pointer will be set to a 64bits "NULL" and Id -1.
15 public Jni_C_Pointer_And_Library_Id() {
21 * Constructor with parameters for 64bits pointers and library handle id.
23 * @param newPtr long-converted (64 bits) C pointer.
24 * @param newHandle a valid library id as int
26 public Jni_C_Pointer_And_Library_Id(int newId
, long newPtr
) {
32 * Constructor with parameters for 32bits pointers and library handle id.
34 * @param newPtr int-converted (32 bits) C pointer.
35 * @param newHandle a valid library id as int
37 public Jni_C_Pointer_And_Library_Id(int newId
, int newPtr
) {
43 * Copy constructor.<p>
45 * @param oldPointerAndId The old object to copy from.
47 public Jni_C_Pointer_And_Library_Id(Jni_C_Pointer_And_Library_Id oldPointerAndId
) {
48 super(oldPointerAndId
.ptr
);
49 libraryId
= oldPointerAndId
.libraryId
;
53 * Get the library handle id currently in use.<p>
54 * Id is used to tell the C which version of the functions to call.<p>
56 * @return The current id
58 public int getLibraryId() {
63 * Set a new library id.<p>
64 * Id is used to tell the C which version of the functions to call.<p>
66 * @param newHandleId The new Id to use (must be a valid id for the C library).
68 public void setLibraryId(int newId
) {
69 this.libraryId
= newId
;