1 package org
.eclipse
.linuxtools
.lttng
.jni
;
3 import org
.eclipse
.linuxtools
.lttng
.jni
.common
.Jni_C_Constant
;
5 /*******************************************************************************
6 * Copyright (c) 2009 Ericsson
8 * All rights reserved. This program and the accompanying materials are
9 * made available under the terms of the Eclipse Public License v1.0 which
10 * accompanies this distribution, and is available at
11 * http://www.eclipse.org/legal/epl-v10.html
14 * William Bourque (wbourque@gmail.com) - Initial API and implementation
15 *******************************************************************************/
19 * <b><u>Jni_C_Common</u></b>
21 * Common constants and methods that should be shared between JNI objects.
24 * This class is ABSTRACT, and will be extended by each LTTng structure (Trac, Tracefile, Event, ...)
27 public abstract class Jni_C_Common
extends Jni_C_Constant
29 // Native console printing function
30 protected native void ltt_printC(int libId
, String string_to_print
);
33 * Java-side console printing function.<p>
35 * Call the C printing function to make sure all printing happen on the same side.
37 * @param msg The string to print in C.
39 @SuppressWarnings("nls")
40 public void printC(int libId
, String msg
) {
41 // Need to escape "%" for C printf
42 msg
= msg
.replaceAll("%", "%%");
43 ltt_printC(libId
, msg
);
47 * Java-side console printing function that add carriage return. <p>
49 * Call the C printing function to make sure all printing happen on the same side.
51 * @param msg The string to print in C.
53 @SuppressWarnings("nls")
54 public void printlnC(int libId
, String msg
) {
55 printC(libId
, msg
+ "\n");
This page took 0.031116 seconds and 5 git commands to generate.