ctf: Fix remaining warnings the CTF plugins
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 26 Jul 2012 20:42:40 +0000 (16:42 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 26 Jul 2012 22:04:04 +0000 (18:04 -0400)
Change-Id: If61709478cde0258e86761be8060e3ede0ca7f0e
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/6992
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>

org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/SimpleDatatypeDefinition.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndexEntry.java

index 23c492e1a4f5caf09bce02704ca26fc0ee82e1cc..569af25cf109f15f86600cb32beac2309a3f53a6 100644 (file)
@@ -20,6 +20,15 @@ package org.eclipse.linuxtools.ctf.core.event.types;
  */
 public abstract class SimpleDatatypeDefinition extends Definition {
 
+    /**
+     * Create a new SimpleDatatypeDefinition
+     *
+     * @param definitionScope
+     *            The scope of this definition
+     * @param fieldName
+     *            The name of the field matching this definition in the parent
+     *            scope
+     */
     public SimpleDatatypeDefinition(IDefinitionScope definitionScope,
             String fieldName) {
         super(definitionScope, fieldName);
index beb6268e20ebfad4d9acb49a219af7a336665a6c..fa3343b727414ce31c539219a1083823084a558c 100644 (file)
@@ -13,6 +13,7 @@
 package org.eclipse.linuxtools.internal.ctf.core.trace;
 
 import java.util.HashMap;
+import java.util.Map;
 
 /**
  * <b><u>StreamInputPacketIndexEntry</u></b>
@@ -25,7 +26,6 @@ public class StreamInputPacketIndexEntry {
     // Attributes
     // ------------------------------------------------------------------------
 
-
     /**
      * Offset of the packet in the file, in bytes
      */
@@ -67,6 +67,11 @@ public class StreamInputPacketIndexEntry {
     private String target ;
     private long targetID;
 
+    /**
+     * Attributes of this index entry
+     */
+    private final Map<String, Object> attributes = new HashMap<String, Object>();
+
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -211,23 +216,50 @@ public class StreamInputPacketIndexEntry {
         this.lostEvents = lostEvents;
     }
 
-    private final HashMap<String, Object> attributes = new HashMap<String, Object>();
+    /**
+     * Add an attribute to this index entry
+     *
+     * @param field
+     *            The name of the atrribute
+     * @param value
+     *            The value to insert
+     */
     public void addAttribute(String field, Object value) {
         attributes.put(field, value);
     }
+
+    /**
+     * Retrieve the value of an existing attribute
+     *
+     * @param field
+     *            The name of the attribute
+     * @return The value that was stored, or null if it wasn't found
+     */
     public Object lookupAttribute(String field){
         return attributes.get(field);
     }
 
+    /**
+     * @return The target that is being traced
+     */
     public String getTarget() {
         return target;
     }
 
+    /**
+     * Assign a target to this index entry
+     *
+     * @param target
+     *            The target to assign
+     */
     public void setTarget(String target) {
         this.target = target;
         this.targetID = Integer.parseInt(target.replaceAll("[\\D]", "")); //$NON-NLS-1$ //$NON-NLS-2$ // slow
     }
 
+    /**
+     * @return The ID of the target
+     */
     public long getTargetId(){
         return targetID;
     }
This page took 0.028484 seconds and 5 git commands to generate.