tmf: Fix some javadoc warnings in tmf.core
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 16 Jul 2012 18:46:23 +0000 (14:46 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 24 Jul 2012 15:35:35 +0000 (11:35 -0400)
Change-Id: I580d39a0eb71dc4cc81fd0c7cdd9626504aefcba
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/6866

22 files changed:
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/HistoryBuilder.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfExperimentContext.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/trace/TmfLocationArray.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/exceptions/AttributeNotFoundException.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/exceptions/StateValueTypeException.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalManager.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfFixedArray.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java

index da2e4e2d48c8ae1b7ff0c1b7715b173ec6243275..725709c4bf8abe7acd6d5f47c9d839e1d618a439 100644 (file)
@@ -127,7 +127,6 @@ public class HistoryBuilder extends TmfComponent {
     /**
      * Build the state history without waiting for signals or anything
      */
-    @SuppressWarnings("unchecked")
     private void buildManually() {
         StateSystemBuildRequest request = new StateSystemBuildRequest(this);
 
@@ -155,7 +154,6 @@ public class HistoryBuilder extends TmfComponent {
      *            signal will coalesce this request with the one from the
      *            indexer and histogram.
      */
-    @SuppressWarnings("unchecked")
     @TmfSignalHandler
     public void experimentRangeUpdated(final TmfExperimentRangeUpdatedSignal signal) {
         StateSystemBuildRequest request;
@@ -208,7 +206,6 @@ class StateSystemBuildRequest extends TmfEventRequest<ITmfEvent> {
     private final IStateChangeInput sci;
     private final ITmfTrace<ITmfEvent> trace;
 
-    @SuppressWarnings("unchecked")
     StateSystemBuildRequest(HistoryBuilder builder) {
         super((Class<ITmfEvent>) builder.getInputPlugin().getExpectedEventType().getClass(),
                 TmfTimeRange.ETERNITY,
index be7377efb06e96cf33b8227f055fc69c28c3beb8..2ea22050bff036cfb3acfb2ccc3af0e22c6d5f69 100644 (file)
@@ -56,7 +56,10 @@ public class TmfExperimentContext extends TmfContext {
     // ------------------------------------------------------------------------
 
     /**
+     * Standard constructor
+     *
      * @param contexts
+     *            The matching context for each trace in the experiment
      */
     public TmfExperimentContext(final ITmfContext[] contexts) {
         super();
@@ -82,7 +85,10 @@ public class TmfExperimentContext extends TmfContext {
     }
 
     /**
+     * Copy constructor
+     *
      * @param other
+     *            The experiment context to copy
      */
     public TmfExperimentContext(final TmfExperimentContext other) {
         this(other.cloneContexts());
@@ -127,18 +133,40 @@ public class TmfExperimentContext extends TmfContext {
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Get the trace contexts composing this experiment context.
+     *
+     * @return The array of trace contexts
+     */
     public ITmfContext[] getContexts() {
         return fContexts;
     }
 
+    /**
+     * Get the trace events located at this experiment context's location.
+     *
+     * @return The array of trace events
+     */
     public ITmfEvent[] getEvents() {
         return fEvents;
     }
 
+    /**
+     * Get the index of the trace that was last read (so the trace whose
+     * current context will match this experiment's).
+     *
+     * @return The index of the trace
+     */
     public int getLastTrace() {
         return fLastTraceRead;
     }
 
+    /**
+     * Set the last trace read index
+     *
+     * @param newIndex
+     *            The new value to assign
+     */
     public void setLastTrace(final int newIndex) {
         fLastTraceRead = newIndex;
     }
index 49445d8eb05d11eb57cd231055f1f8da8fa69463..c28ea8a1b0a91b565136006b098dfe47431d82cf 100644 (file)
@@ -50,9 +50,9 @@ public class TmfLocationArray implements Comparable<TmfLocationArray>, Cloneable
     // ------------------------------------------------------------------------
 
     /**
-     * The standard constructor
+     * Get the locations inside this array
      *
-     * @param locations the locations
+     * @return the locations
      */
     public ITmfLocation<? extends Comparable<?>>[] getLocations() {
         return fLocations;
@@ -80,7 +80,7 @@ public class TmfLocationArray implements Comparable<TmfLocationArray>, Cloneable
     // ------------------------------------------------------------------------
 
     @Override
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings("rawtypes")
     public int compareTo(TmfLocationArray o) {
         for (int i = 0; i < fLocations.length; i++) {
             ITmfLocation<? extends Comparable> l1 = (ITmfLocation<? extends Comparable>) fLocations[i].getLocation();
index 84e581fd770b19a8136815746b35f5359a7b3a16..107643255b274185450a67cec68de42655d1368c 100644 (file)
@@ -35,7 +35,20 @@ public interface ITmfDataProvider<T extends ITmfEvent> extends ITmfComponent {
      */
     public void sendRequest(ITmfDataRequest<T> request);
 
+    /**
+     * Queue the coalesced requests.
+     */
     public void fireRequest();
+
+    /**
+     * Increments/decrements the pending requests counters and fires the request
+     * if necessary (counter == 0). Used for coalescing requests across multiple
+     * TmfDataProvider's.
+     *
+     * @param isIncrement
+     *            Should we increment (true) or decrement (false) the pending
+     *            counter
+     */
     public void notifyPendingRequest(boolean isIncrement);
 
     /**
index a2bb826c66038041e6f58b653bc5e19b65ee6ceb..30895457d09b7162e6524dff2deaba56fe88d16e 100644 (file)
@@ -51,7 +51,10 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
     // Constants
     // ------------------------------------------------------------------------
 
+    /** Default amount of events per request "chunk" */
     public static final int DEFAULT_BLOCK_SIZE = 50000;
+
+    /** Default size of the queue */
     public static final int DEFAULT_QUEUE_SIZE = 1000;
 
     // ------------------------------------------------------------------------
@@ -75,6 +78,9 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Default constructor
+     */
     public TmfDataProvider() {
         super();
         fQueueSize = DEFAULT_QUEUE_SIZE;
@@ -82,6 +88,14 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
         fExecutor = new TmfRequestExecutor();
     }
 
+    /**
+     * Initialize this data provider
+     *
+     * @param name
+     *            Name of the provider
+     * @param type
+     *            The type of events that will be handled
+     */
     public void init(String name, Class<T> type) {
         super.init(name);
         fType = type;
@@ -102,11 +116,25 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
         init(name, type);
     }
 
+    /**
+     * Copy constructor
+     *
+     * @param other
+     *            The other object to copy
+     */
     public TmfDataProvider(TmfDataProvider<T> other) {
         this();
         init(other.getName(), other.fType);
     }
 
+    /**
+     * Standard constructor. Instantiate and initialize at the same time.
+     *
+     * @param name
+     *            Name of the provider
+     * @param type
+     *            The type of events that will be handled
+     */
     public TmfDataProvider(String name, Class<T> type) {
         this(name, type, DEFAULT_QUEUE_SIZE);
     }
@@ -123,10 +151,20 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Get the queue size of this provider
+     *
+     * @return The size of the queue
+     */
     public int getQueueSize() {
         return fQueueSize;
     }
 
+    /**
+     * Get the event type this provider handles
+     *
+     * @return The type of ITmfEvent
+     */
     public Class<?> getType() {
         return fType;
     }
@@ -146,9 +184,6 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
         }
     }
 
-    /**
-     * This method queues the coalesced requests.
-     */
     @Override
     public void fireRequest() {
         synchronized (fLock) {
@@ -165,9 +200,10 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
     }
 
     /**
-     * Increments/decrements the pending requests counters and fires the request if necessary (counter == 0). Used for
-     * coalescing requests accross multiple TmfDataProvider.
-     * 
+     * Increments/decrements the pending requests counters and fires the request
+     * if necessary (counter == 0). Used for coalescing requests accross
+     * multiple TmfDataProvider.
+     *
      * @param isIncrement
      */
     @Override
@@ -432,6 +468,12 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
     // Signal handlers
     // ------------------------------------------------------------------------
 
+    /**
+     * Handler for the start synch signal
+     *
+     * @param signal
+     *            Incoming signal
+     */
     @TmfSignalHandler
     public void startSynch(TmfStartSynchSignal signal) {
         synchronized (fLock) {
@@ -439,6 +481,12 @@ public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent
         }
     }
 
+    /**
+     * Handler for the end synch signal
+     *
+     * @param signal
+     *            Incoming signal
+     */
     @TmfSignalHandler
     public void endSynch(TmfEndSynchSignal signal) {
         synchronized (fLock) {
index c876893fc050d109a58a033470342f8ffd2ccc39..012e72e68c5668b33a0e3b2aa03dc35126828396 100644 (file)
@@ -33,6 +33,9 @@ public abstract class TmfEventProvider<T extends ITmfEvent> extends TmfDataProvi
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Default constructor
+     */
     public TmfEventProvider() {
         super();
     }
@@ -42,14 +45,38 @@ public abstract class TmfEventProvider<T extends ITmfEvent> extends TmfDataProvi
         super.init(name, type);
     }
 
-    public TmfEventProvider(String name, Class<T> type) {
+    /**
+     * Standard constructor
+     *
+     * @param name
+     *            The name of the provider
+     * @param type
+     *            The type of handled events
+     */
+   public TmfEventProvider(String name, Class<T> type) {
         super(name, type);
     }
 
+    /**
+     * Standard constructor which also sets the queue size
+     *
+     * @param name
+     *            The name of the provider
+     * @param type
+     *            The type of handled events
+     * @param queueSize
+     *            The size of the queue
+     */
     public TmfEventProvider(String name, Class<T> type, int queueSize) {
         super(name, type, queueSize);
     }
 
+    /**
+     * Copy constructor
+     *
+     * @param other
+     *            The other TmfEventProvider to copy
+     */
     public TmfEventProvider(TmfEventProvider<T> other) {
         super(other);
     }
index 9f147962280c65821214a83c8b2be816cc6c8253..9de76d1eb44e2cd161498d534f28033ffb9c37a8 100644 (file)
@@ -64,9 +64,11 @@ public final class CtfTmfEvent implements ITmfEvent, Cloneable {
      * the StreamInputReader).
      *
      * @param eventDef
-
-     * @param fileName String
-     * @param originTrace CtfTmfTrace
+     *            CTF EventDefinition object corresponding to this trace event
+     * @param fileName
+     *            The path to the trace file
+     * @param originTrace
+     *            The trace from which this event originates
      */
     public CtfTmfEvent(EventDefinition eventDef, String fileName,
             CtfTmfTrace originTrace) {
@@ -100,8 +102,8 @@ public final class CtfTmfEvent implements ITmfEvent, Cloneable {
      * mess, and put them into something ITmfEventField can cope with.
      *
      * @param eventDef
-
-     * @return CtfTmfEventField[]
+     *            CTF EventDefinition to read
+     * @return CtfTmfEventField[] The array of fields that were read
      */
     public static CtfTmfEventField[] parseFields(EventDefinition eventDef) {
         List<CtfTmfEventField> fields = new ArrayList<CtfTmfEventField>();
@@ -127,6 +129,7 @@ public final class CtfTmfEvent implements ITmfEvent, Cloneable {
      * Copy constructor
      *
      * @param other
+     *            CtfTmfEvent to copy
      */
     public CtfTmfEvent(CtfTmfEvent other) {
         this.fTrace = other.getTrace();
index 560bfcb7454c7f6f2bf16b0825678073b906a17b..585d30b3f990fc064651be2af890f841fbe79b05 100644 (file)
@@ -16,19 +16,22 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventTypeManager;
 
 /**
- * The CTF extension of the TMF event type 
- * 
+ * The CTF extension of the TMF event type
+ *
  * @version 1.0
  * @author Matthew khouzam
  */
 public class CtfTmfEventType extends TmfEventType {
 
     private static final String CONTEXT_ID = "Ctf Event"; //$NON-NLS-1$
+
     /**
      * Constructor for CtfTmfEventType.
-     * @param contextId String
-     * @param eventName String
-     * @param content ITmfEventField
+     *
+     * @param eventName
+     *            String
+     * @param content
+     *            ITmfEventField
      */
     public CtfTmfEventType(String eventName, ITmfEventField content) {
         super(CONTEXT_ID, eventName, content);
@@ -36,6 +39,7 @@ public class CtfTmfEventType extends TmfEventType {
 
     /**
      * Method toString.
+     *
      * @return String
      */
     @Override
@@ -45,7 +49,9 @@ public class CtfTmfEventType extends TmfEventType {
 
     /**
      * gets the event type for an event name
-     * @param eventName the event name
+     *
+     * @param eventName
+     *            the event name
      * @return the event type
      */
     public static CtfTmfEventType get(String eventName){
index 1fd75249083392d6aa95cc4dcb308ad3598129e5..8c1dd89258c6f8d7c09917d5fae7b41d2c2cf620 100644 (file)
@@ -60,10 +60,15 @@ public class CtfTmfTrace extends TmfTrace<CtfTmfEvent> implements ITmfEventParse
     //-------------------------------------------
     /**
      * Method initTrace.
-     * @param resource IResource
-     * @param path String
-     * @param eventType Class<CtfTmfEvent>
+     *
+     * @param resource
+     *            The resource associated with this trace
+     * @param path
+     *            The path to the trace file
+     * @param eventType
+     *            The type of events that will be read from this trace
      * @throws TmfTraceException
+     *             If something when wrong while reading the trace
      */
     @Override
     public void initTrace(final IResource resource, final String path, final Class<CtfTmfEvent> eventType)
@@ -251,8 +256,10 @@ public class CtfTmfTrace extends TmfTrace<CtfTmfEvent> implements ITmfEventParse
     /**
      * Suppressing the warning, because the 'throws' will usually happen in
      * sub-classes.
+     *
      * @throws TmfTraceException
      */
+    @SuppressWarnings("unused")
     protected void buildStateSystem() throws TmfTraceException {
         /*
          * Nothing is done in the basic implementation, please specify
index 7efb44dfaf485a69b4f57cbe1a1b896a42251c27..7782b672c788eadef9f7ad63676150f4559e5742 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 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:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.core.event;
 /**
  * The generic event payload in TMF. Each field can be either a terminal or
  * further decomposed into subfields.
- * 
+ *
  * @version 1.0
  * @author Francois Chouinard
  *
@@ -53,6 +53,7 @@ public interface ITmfEventField {
     public String[] getFieldNames();
 
     /**
+     * @param index The index of the field
      * @return the nth field name (null if absent or inexistent)
      */
     public String getFieldName(int index);
@@ -63,11 +64,13 @@ public interface ITmfEventField {
     public ITmfEventField[] getFields();
 
     /**
+     * @param name The name of the field
      * @return a specific subfield by name (null if absent or inexistent)
      */
     public ITmfEventField getField(String name);
 
     /**
+     * @param index The index of the field to return
      * @return a specific subfield by index (null if absent or inexistent)
      */
     public ITmfEventField getField(int index);
index ef39d0843ea30847e3d8588b74aba6534893d562..2b1b0b4ddc0f8ec1163188d223890f000711a14d 100644 (file)
@@ -2,12 +2,12 @@
  * Copyright (c) 2012 Ericsson
  * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
  * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- * 
+ *
  * 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
- * 
+ *
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.exceptions;
@@ -15,18 +15,26 @@ package org.eclipse.linuxtools.tmf.core.exceptions;
 /**
  * This exception gets thrown when the user tries to access an attribute which
  * doesn't exist in the system, of if the quark is simply invalid (ie, < 0).
- * 
- * @author alexmont
- * 
+ *
+ * @author Alexandre Montplaisir
  */
 public class AttributeNotFoundException extends Exception {
 
     private static final long serialVersionUID = 7964275803369706145L;
 
+    /**
+     * Default constructor
+     */
     public AttributeNotFoundException() {
         super();
     }
 
+    /**
+     * Constructor with a message
+     *
+     * @param message
+     *            Message to attach to this exception
+     */
     public AttributeNotFoundException(String message) {
         super(message);
     }
index e0d3a0590b72e120d053667271510060e5c78bdd..2aa04d32ab0259b5c5df35ecb2ee54245325156e 100644 (file)
@@ -2,12 +2,12 @@
  * Copyright (c) 2012 Ericsson
  * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
  * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- * 
+ *
  * 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
- * 
+ *
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.exceptions;
@@ -16,21 +16,30 @@ package org.eclipse.linuxtools.tmf.core.exceptions;
  * The StateValue is a wrapper around the different type of values that can be
  * used and stored in the state system and history. "Unboxing" the value means
  * retrieving the base type (int, String, etc.) inside it.
- * 
+ *
  * This exception is thrown if the user tries to unbox a StateValue with an
  * incorrect type (for example, tries to read a String value as an Int).
- * 
- * @author alexmont
- * 
+ *
+ * @author Alexandre Montplaisir
+ *
  */
 public class StateValueTypeException extends Exception {
 
     private static final long serialVersionUID = -4548793451746144513L;
 
+    /**
+     * Default constructor
+     */
     public StateValueTypeException() {
         super();
     }
 
+    /**
+     * Constructor with a message
+     *
+     * @param message
+     *            Message to attach to this exception
+     */
     public StateValueTypeException(String message) {
         super(message);
     }
index 1e41dcac1a67db28b382b9ecbf5597fc85d2dd77..cc70b168e0a7b1bad5dc6e66c59bdeaada54819b 100644 (file)
@@ -36,14 +36,55 @@ public class BufferedRandomAccessFile extends RandomAccessFile {
        long real_pos = 0;\r
        StringBuilder sb = new StringBuilder();\r
 \r
+    /**\r
+     * Constructor using the default buffer size\r
+     *\r
+     * @param name\r
+     *            File path. This is passed as-is to the RandomeAccessFile's\r
+     *            constructor.\r
+     * @param mode\r
+     *            File open mode ("r", "rw", etc.). This is passed as-is to\r
+     *            RandomAccessFile's constructor.\r
+     * @throws IOException\r
+     *             If the file was not found or couldn't be opened with the\r
+     *             request permissions\r
+     */\r
        public BufferedRandomAccessFile(String name, String mode) throws IOException {\r
                this(name, mode, DEFAULT_BUF_SIZE);\r
        }\r
 \r
+    /**\r
+     * Constructor using the default buffer size\r
+     *\r
+     * @param file\r
+     *            File object. This is passed as-is to the RandomeAccessFile's\r
+     *            constructor.\r
+     * @param mode\r
+     *            File open mode ("r", "rw", etc.). This is passed as-is to\r
+     *            RandomAccessFile's constructor.\r
+     * @throws IOException\r
+     *             If the file was not found or couldn't be opened with the\r
+     *             request permissions\r
+     */\r
        public BufferedRandomAccessFile(File file, String mode) throws IOException {\r
                this(file, mode, DEFAULT_BUF_SIZE);\r
        }\r
 \r
+    /**\r
+     * Standard constructor.\r
+     *\r
+     * @param name\r
+     *            File path. This is passed as-is to the RandomeAccessFile's\r
+     *            constructor.\r
+     * @param mode\r
+     *            File open mode ("r", "rw", etc.). This is passed as-is to\r
+     *            RandomAccessFile's constructor.\r
+     * @param bufsize\r
+     *            Buffer size to use, in bytes\r
+     * @throws IOException\r
+     *             If the file was not found or couldn't be opened with the\r
+     *             request permissions\r
+     */\r
        public BufferedRandomAccessFile(String name, String mode, int bufsize) throws IOException {\r
            super(name, mode);\r
            invalidate();\r
@@ -51,6 +92,21 @@ public class BufferedRandomAccessFile extends RandomAccessFile {
            buffer = new byte[BUF_SIZE];\r
     }\r
 \r
+    /**\r
+     * Standard constructor.\r
+     *\r
+     * @param file\r
+     *            File object. This is passed as-is to the RandomeAccessFile's\r
+     *            constructor.\r
+     * @param mode\r
+     *            File open mode ("r", "rw", etc.). This is passed as-is to\r
+     *            RandomAccessFile's constructor.\r
+     * @param bufsize\r
+     *            Buffer size to use, in bytes\r
+     * @throws IOException\r
+     *             If the file was not found or couldn't be opened with the\r
+     *             request permissions\r
+     */\r
        public BufferedRandomAccessFile(File file, String mode, int bufsize) throws IOException {\r
            super(file, mode);\r
            invalidate();\r
@@ -107,6 +163,14 @@ public class BufferedRandomAccessFile extends RandomAccessFile {
                }\r
        }\r
 \r
+    /**\r
+     * Read the next line from the buffer (ie, until the next '\n'). The bytes\r
+     * are interpreted as UTF-8 characters.\r
+     *\r
+     * @return The String that was read\r
+     * @throws IOException\r
+     *             If we failed reading the file\r
+     */\r
        public final String getNextLine() throws IOException {\r
                String str = null;\r
                if (buf_end - buf_pos <= 0) {\r
index ec314411bcc22103340fd57de219df5c23a4169c..e8418f1fe35d2baef1ab689e0b77c413b59bc60f 100644 (file)
@@ -76,10 +76,10 @@ public abstract class TmfDataRequest<T extends ITmfEvent> implements ITmfDataReq
     // Constants
     // ------------------------------------------------------------------------
 
-    // The default maximum number of events per chunk
+    /** The default maximum number of events per chunk */
     public static final int DEFAULT_BLOCK_SIZE = 1000;
 
-    // The request count for all the events
+    /** The request count for all the events */
     public static final int ALL_DATA = Integer.MAX_VALUE;
 
     private static int fRequestNumber = 0;
@@ -430,6 +430,7 @@ public abstract class TmfDataRequest<T extends ITmfEvent> implements ITmfDataReq
      * To suspend the client thread until the request starts (or is canceled).
      * 
      * @throws InterruptedException
+     *             If the thread was interrupted while waiting
      */
     public void waitForStart() throws InterruptedException {
         while (!fRequestRunning) {
@@ -438,9 +439,11 @@ public abstract class TmfDataRequest<T extends ITmfEvent> implements ITmfDataReq
     }
 
     /**
-     * To suspend the client thread until the request completes (or is canceled).
-     * 
+     * To suspend the client thread until the request completes (or is
+     * canceled).
+     *
      * @throws InterruptedException
+     *             If the thread was interrupted while waiting
      */
     @Override
     public void waitForCompletion() throws InterruptedException {
index 80cd3429a7f83ce62e9fd662681263a6c6ec6630..4d78b404399df978e347cea3401e7b33368574fe 100644 (file)
@@ -85,6 +85,8 @@ public class TmfSignalManager {
                return handlers.toArray(new Method[handlers.size()]);
        }
 
+       static int fSignalId = 0;
+
        /**
         * Invokes the handling methods that listens to signals of a given type.
         * 
@@ -97,7 +99,6 @@ public class TmfSignalManager {
         * 
         * @param signal the signal to dispatch
         */
-       static int fSignalId = 0;
        static public synchronized void dispatchSignal(TmfSignal signal) {
                int signalId = fSignalId++;
                sendSignal(new TmfStartSynchSignal(signalId));
index 79dcf55a6afc13f1e2a9f74f65242e7f76e5e57a..5d2e1ca953cc9032cca357d014359002ecf69a41 100644 (file)
@@ -133,7 +133,7 @@ public interface ITmfTrace<T extends ITmfEvent> extends ITmfDataProvider<T> {
      * @param resource the trace resource
      * @param path the trace path
      * @param type the trace event type
-     * @throws TmfTraceException
+     * @throws TmfTraceException If we couldn't open the trace
      */
     public void initTrace(IResource resource, String path, Class<T> type) throws TmfTraceException;
 
index 7876c83a127535232e0c61612e3e97990667cba5..bdad22ec177d01822a495649a097ed79b575aeda 100644 (file)
@@ -33,27 +33,39 @@ public interface ITmfTraceIndexer<T extends ITmfTrace<ITmfEvent>> {
      * intervals to indicate its progress.
      * <p>
      * <b>Example 1</b>: Index a whole trace asynchronously
+     *
      * <pre>
      * trace.getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, false);
      * </pre>
+     *
      * <b>Example 2</b>: Index a whole trace synchronously
+     *
      * <pre>
      * trace.getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, true);
      * </pre>
+     *
      * <b>Example 3</b>: Index a trace asynchronously, starting at rank 100
+     *
      * <pre>
      * trace.getIndexer().buildIndex(100, TmfTimeRange.ETERNITY, false);
      * </pre>
-     * <b>Example 4</b>: Index a trace asynchronously, starting at rank 100 for events between
-     * T1 and T2 (inclusive). This is used for incremental indexing.
+     *
+     * <b>Example 4</b>: Index a trace asynchronously, starting at rank 100 for
+     * events between T1 and T2 (inclusive). This is used for incremental
+     * indexing.
+     *
      * <pre>
      * TmfTimeRange range = new TmfTimeRange(T1, T2);
      * trace.getIndexer().buildIndex(100, range, false);
      * </pre>
      *
-     * @param offset The offset of the first event to consider
-     * @param range The time range to consider
+     * @param offset
+     *            The offset of the first event to consider
+     * @param range
+     *            The time range to consider
      * @param waitForCompletion
+     *            Should we block the calling thread until the build is
+     *            complete?
      */
     public void buildIndex(long offset, TmfTimeRange range, boolean waitForCompletion);
 
@@ -68,8 +80,8 @@ public interface ITmfTraceIndexer<T extends ITmfTrace<ITmfEvent>> {
     /**
      * Adds an entry to the trace index.
      *
-     * @param context
-     * @param timestamp
+     * @param context The trace context to save
+     * @param timestamp The timestamp matching this context
      */
     public void updateIndex(ITmfContext context, ITmfTimestamp timestamp);
 
index 21f5901a103345e526a78eab4fdd15fb7bd06ac9..9cabf4eecdffaa18ebbde39aa4937550151fff50 100644 (file)
@@ -52,7 +52,7 @@ public class TmfCheckpoint implements ITmfCheckpoint, Cloneable {
      * Full constructor
      * 
      * @param timestamp the checkpoint timestamp
-     * @param location the corresponding trace location
+     * @param context the corresponding trace location
      */
     public TmfCheckpoint(final ITmfTimestamp timestamp, final ITmfContext context) {
         fTimestamp = timestamp;
index 5c13ebf55a27e743e1374bc91348fdffe147d0ca..7f9576cbda2d9d56ff86523fcc89a825b6d18267 100644 (file)
@@ -523,7 +523,7 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
     /**
      * Signal handler for the TmfExperimentSelectedSignal signal
      *
-     * @param signal
+     * @param signal The incoming signal
      */
     @TmfSignalHandler
     public void experimentSelected(final TmfExperimentSelectedSignal<T> signal) {
@@ -537,7 +537,7 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
     /**
      * Signal handler for the TmfEndSynchSignal signal
      *
-     * @param signal
+     * @param signal The incoming signal
      */
     @TmfSignalHandler
     public void endSync(final TmfEndSynchSignal signal) {
@@ -550,7 +550,7 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
     /**
      * Signal handler for the TmfTraceUpdatedSignal signal
      *
-     * @param signal
+     * @param signal The incoming signal
      */
     @TmfSignalHandler
     public void traceUpdated(final TmfTraceUpdatedSignal signal) {
@@ -562,7 +562,7 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
     /**
      * Signal handler for the TmfExperimentRangeUpdatedSignal signal
      *
-     * @param signal
+     * @param signal The incoming signal
      */
     @TmfSignalHandler
     public void experimentRangeUpdated(final TmfExperimentRangeUpdatedSignal signal) {
index 7699fe4372448190154806cb46c22d1b6d565315..82421f5d621906729b29ce774ef5c76cbe30a540 100644 (file)
@@ -166,6 +166,7 @@ public abstract class TmfTrace<T extends ITmfEvent> extends TmfEventProvider<T>
      * Copy constructor
      *
      * @param trace the original trace
+     * @throws TmfTraceException Should not happen usually
      */
     @SuppressWarnings({ "unchecked", "rawtypes" })
     public TmfTrace(final TmfTrace<T> trace) throws TmfTraceException {
index 23134cd8b0ecd49df6ad6d1b7be682c63cffaee4..f38fd5f0ef02bc1ebbad7c356353cadc758a9187 100755 (executable)
@@ -41,7 +41,6 @@ public final class TmfFixedArray<T> extends AbstractList<T> implements RandomAcc
      * @param newLength Length of the copy to be returned.
      * @return A new array consisting of the elements specified.
      */
-    @SuppressWarnings("unchecked")
     private static <E> E[] copyOf(final E[] array, int newLength) {
         E[] result = (E[])Array.newInstance(array.getClass().getComponentType(), newLength); // Is it useful to use newInstance?
         System.arraycopy(array, 0, result, 0, Math.min(array.length, newLength));
@@ -55,7 +54,6 @@ public final class TmfFixedArray<T> extends AbstractList<T> implements RandomAcc
      * @param newType Type of the array to be returned.
      * @return A new array consisting of the elements specified.
      */
-    @SuppressWarnings("unchecked")
     private static <E, U> E[] copyOf(final U[] array, int newLength, Class<? extends E[]> newType) {
         E[] result = (E[])Array.newInstance(newType.getComponentType(), newLength);
         System.arraycopy(array, 0, result, 0, Math.min(array.length, newLength));
@@ -69,7 +67,6 @@ public final class TmfFixedArray<T> extends AbstractList<T> implements RandomAcc
      * @param end Ending position of the range, exclusive.
      * @return A new array consisting of the elements specified. The length of the new array is equal to end-start
      */
-    @SuppressWarnings("unchecked")
     private static <E> E[] copyOfRange(final E[] array, int start, int end) {
         E[] result = (E[])Array.newInstance(array.getClass().getComponentType(), end - start);
         System.arraycopy(array, start, result, 0, end - start);
@@ -238,7 +235,6 @@ public final class TmfFixedArray<T> extends AbstractList<T> implements RandomAcc
      * @see java.util.AbstractCollection#toArray(T[])
      */
     @Override
-    @SuppressWarnings("unchecked")
     public <E> E[] toArray(E[] array)
     {
         if(array.length < fArray.length) {
index 56a623d28753dccf1128984a40cdd0f43c3e8e93..184b8868a234fa1dbfb9ab779833798ae279edf1 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2011, 2012 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:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -16,18 +16,18 @@ import java.util.ArrayList;
 
 /**
  * Implementation of a sorted array list.
- * 
+ *
  * @version 1.0
- * @Francois Chouinard
+ * @author Francois Chouinard
  */
 
 public class TmfSortedArrayList<T> extends ArrayList<T> {
     private static final long serialVersionUID = 1L;
 
     /**
-     * Inserts a new value in the list according to its sorted position.  
-     * 
-     * @param value A value to insert 
+     * Inserts a new value in the list according to its sorted position.
+     *
+     * @param value A value to insert
      */
     @SuppressWarnings("unchecked")
     public void insertSorted(T value) {
This page took 0.065237 seconds and 5 git commands to generate.