From 18ff60f74d8629f59816b9d3fcfd973ce3f3159c Mon Sep 17 00:00:00 2001 From: William Bourque Date: Wed, 17 Feb 2010 16:42:58 +0000 Subject: [PATCH] Deleting unused files that were committed by mistake --- .../eclipse/linuxtools/lttng/jni/JniTime.java | 178 ------------------ .../linuxtools/lttng/jni/Jni_C_Pointer.java | 94 --------- 2 files changed, 272 deletions(-) delete mode 100644 org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/JniTime.java delete mode 100644 org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/Jni_C_Pointer.java diff --git a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/JniTime.java b/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/JniTime.java deleted file mode 100644 index b6bcdfe50a..0000000000 --- a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/JniTime.java +++ /dev/null @@ -1,178 +0,0 @@ -package org.eclipse.linuxtools.lttng.jni; -/******************************************************************************* - * Copyright (c) 2009 Ericsson - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * William Bourque (wbourque@gmail.com) - Initial API and implementation - *******************************************************************************/ - - -/** - * JniTime - *

- * Used to store (event, trace, tracefile, ...) timestamp. - * - * Mimic the behavior of the LttTime C structure. - */ -public class JniTime extends Jni_C_Common implements Comparable -{ - private long time = 0; - - /** - * Default constructor.

- * - * Note : Time will be set to 0. - * - */ - public JniTime() { - time = 0; - } - - /** - * Copy constructor. - * - * @param oldTime Reference to the JniTime you want to copy. - */ - public JniTime(JniTime oldTime) { - time = oldTime.getTime(); - } - - /** - * Constructor with parameters.

- * - * "LTT style" constructor with Seconds et Nanoseconds - * - * @param newSec Seconds of the JniTime - * @param newNanoSec Nanoseconds of the JniTime - */ - public JniTime(long newSec, long newNanoSec) { - time = (newSec * NANO) + newNanoSec; - } - - /** - * Constructor with parameters.

- * - * Usual "nanosecond only" constructor. - * - * @param newNanoSecTime Time in nanoseconds - */ - public JniTime(long newNanoSecTime) { - time = newNanoSecTime; - } - - /** - * Second of the time.

- * - * Returns seconds, i.e. multiple of 1 000 000, of the stored nanoseconds time. - * - * @return Second of this time. - */ - public long getSeconds() { - return (time / NANO); - } - - /** - * Getter for the nanosecond of the time.

- * - * Returns nanoseconds part, i.e. modulo of 1 000 000, of the stored nanoseconds time. - * - * @return Nanoseconds of this time - */ - public long getNanoSeconds() { - return time % NANO; - } - - /** - * Full time, in nanoseconds.

- * - * @return Complete time in nanoseconds - */ - public long getTime() { - return time; - } - - /** - * Changes the current time for this object

- * - * @param newTime New time to set, in nanoseconds. - */ - public void setTime(long newTime) { - time = newTime; - } - - /* - * Populate this time object - * - * Note: This function is called from C side. - * - * @param newTime The time we want to populate - */ - @SuppressWarnings("unused") - private void setTimeFromC(long newTime) { - time = newTime; - } - - /** - * Comparaison operator smaller or equal than "<=" .

- * - * @param comparedTime The time we want to compare with this one - * - * @return true if compared time is smaller or equal, false otherwise - */ - public boolean isSmallerOrEqual(JniTime comparedTime) { - - // NOTE : We check <= instead of just < - // This mean the LEFT OPERAND (comparedTime) always prevails - if (this.getTime() <= comparedTime.getTime() ) { - return true; - } - else { - return false; - } - } - - /** - * compareTo operator.

- * - * @param right The time we want to compare with this one - * - * @return int of value -1, 0 or 1, as the pased argument is bigger, equal or smaller than this time - */ - public int compareTo(JniTime right) { - long leftTime = this.getTime(); - long rightTime = right.getTime(); - - if ( leftTime < rightTime ) { - return -1; - } - else if ( leftTime > rightTime ) { - return 1; - } - else { - return 0; - } - } - - /** - * toString() method. - * Intended to debug

- * - * NOTE : We output the time in the same format as LTT (seconds and nanosecond separatly) - * - * @return String Attributes of the object concatenated in String - */ - @Override - public String toString() { - String returnData = ""; - - returnData += "seconds : " + this.getSeconds() + "\n"; - returnData += "nanoSeconds : " + this.getNanoSeconds() + "\n"; - - return returnData; - } -} diff --git a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/Jni_C_Pointer.java b/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/Jni_C_Pointer.java deleted file mode 100644 index 7cfec13078..0000000000 --- a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/Jni_C_Pointer.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.eclipse.linuxtools.lttng.jni; - - -/** - * Jni_C_Pointer - *

- * Class pointer to handle properly "C pointer"

- * - * Can transparently handle pointer of 32 or 64 bits. - */ -public class Jni_C_Pointer extends Jni_C_Common { - - private long ptr = NULL; - private boolean isLong = true; - - /** - * Default constructor.

- * - * Note : Pointer will be set to a 64bits "NULL". - */ - public Jni_C_Pointer() { - ptr = NULL; - } - - /** - * Constructor with parameters for 64bits pointers. - * - * @param newPtr long-converted (64 bits) C pointer. - */ - public Jni_C_Pointer(long newPtr) { - ptr = newPtr; - isLong = true; - } - - /** - * Constructor with parameters for 32bits pointers. - * - * @param newPtr int-converted (32 bits) C pointer. - */ - public Jni_C_Pointer(int newPtr) { - ptr = (long)newPtr; - isLong = false; - } - - /** - * Get the current pointer. - * - * @return The current pointer, in long. - */ - public long getPointer() { - return ptr; - } - - /** - * Set the pointer, as a 64bits pointer. - * - * @param newPtr long-converted (64 bits) C pointer. - */ - public void setPointer(long newPtr) { - ptr = newPtr; - isLong = true; - } - - /** - * Set the pointer, as a 64bits pointer. - * - * @param newPtr int-converted (32 bits) C pointer. - */ - public void setPointer(int newPtr) { - ptr = newPtr; - isLong = false; - } - - /** - * toString() method.

- * - * Convert the pointer to a nice looking int/long hexadecimal format. - * - * @return Attributes of the object concatenated in String - */ - @Override - public String toString() { - String returnData = "0x"; - - if (isLong == true) { - returnData += Long.toHexString(ptr); - } - else { - returnData += Integer.toHexString((int) ptr); - } - - return returnData; - } -} -- 2.34.1