lttng: Fix Javadoc in lttng2.core
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 11 Jun 2012 18:03:06 +0000 (14:03 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 14 Jun 2012 19:59:49 +0000 (15:59 -0400)
plus some very simple warnings.

Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
25 files changed:
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/ActivatorTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/AllTests.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/AllTests.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/BaseEventInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ChannelInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/DomainInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/EventInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ModelImplFactory.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ProbeEventInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SessionInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/TraceInfoTest.java
org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/UstProviderInfoTest.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISessionInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ITraceInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/LogLevelType.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/TargetNodeState.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/TraceEnablement.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/TraceEventType.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/TraceLogLevel.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/TraceSessionState.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/ChannelInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/DomainInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SessionInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/TraceInfo.java
org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/UstProviderInfo.java

index 9eeec2a9833da4c3e8497741b89da9a92338c9d1..bd6c1f2effcb3609e24df94c5b805a3cb1d4abfa 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
  *******************************************************************************/
@@ -26,6 +26,7 @@ import org.junit.Test;
  * Test suite for the Activator class
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class ActivatorTest extends TestCase {
 
     // ------------------------------------------------------------------------
index cce041eae1234c5dad359aa003b65ac7c783daa0..3f837202904cf9c8fb725f81c6f0af65fb0d42cc 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
  *******************************************************************************/
@@ -19,6 +19,7 @@ import junit.framework.TestSuite;
  * <b><u>AllTests</u></b>
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class AllTests {
 
     public static Test suite() {
index bce587572b2c883e2d201fabc7fc10c4cd7884d9..6fa43af6ba2bb59a62ad2ac1455b123c45950b4f 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2011 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:
  *   Bernd Hufmann - Initial API and implementation
  *******************************************************************************/
@@ -14,10 +14,11 @@ package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+@SuppressWarnings("javadoc")
 public class AllTests {
 
     public static Test suite() {
-        
+
         TestSuite suite = new TestSuite(AllTests.class.getName());
         //$JUnit-BEGIN$
         suite.addTestSuite(BaseEventInfoTest.class);
index 40f882af7f4f3d10df751e083ef6d2b1208a133a..b8520aec02f767447ab91ec161f67bba680fbcde 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -21,7 +21,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.BaseEventI
 /**
  * The class <code>BaseEventInfoTest</code> contains test for the class <code>{@link BaseEventInfo}</code>.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class BaseEventInfoTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -29,7 +29,7 @@ public class BaseEventInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     private IBaseEventInfo fEventInfo1 = null;
     private IBaseEventInfo fEventInfo2 = null;
-   
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
@@ -42,7 +42,7 @@ public class BaseEventInfoTest extends TestCase {
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        ModelImplFactory factory = new ModelImplFactory(); 
+        ModelImplFactory factory = new ModelImplFactory();
         fEventInfo1 = factory.getBaseEventInfo1();
         fEventInfo2 = factory.getBaseEventInfo2();
     }
@@ -68,15 +68,15 @@ public class BaseEventInfoTest extends TestCase {
     public void testBaseEventInfo() {
         BaseEventInfo fixture = new BaseEventInfo("event");
         assertNotNull(fixture);
-        
+
         TraceEventType result = fixture.getEventType();
-        
+
         assertEquals("event", fixture.getName());
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         TraceLogLevel level = fixture.getLogLevel();
         assertEquals("TRACE_DEBUG", level.getInName());
         assertEquals("TRACE_DEBUG", level.name());
@@ -89,7 +89,7 @@ public class BaseEventInfoTest extends TestCase {
      */
     public void testEventInfoCopy() {
         BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo1);
-        
+
         assertEquals(fEventInfo1.getName(), info.getName());
         assertEquals(fEventInfo1.getEventType(), info.getEventType());
         assertEquals(fEventInfo1.getLogLevel(), info.getLogLevel());
@@ -108,7 +108,7 @@ public class BaseEventInfoTest extends TestCase {
             // Success
         }
     }
-    
+
     /**
      * Run the TraceEventType getEventType() method test.
      *
@@ -126,14 +126,14 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         fixture.setEventType("");
         result = fixture.getEventType();
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         fixture.setEventType("tracepoint");
         result = fixture.getEventType();
         assertNotNull(result);
@@ -141,7 +141,7 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals("TRACEPOINT", result.name());
         assertEquals("TRACEPOINT", result.toString());
         assertEquals(0, result.ordinal());
-        
+
         fixture.setEventType("syscall");
         result = fixture.getEventType();
         assertNotNull(result);
@@ -149,7 +149,7 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals("SYSCALL", result.name());
         assertEquals("SYSCALL", result.toString());
         assertEquals(1, result.ordinal());
-        
+
         fixture.setEventType("probe");
         result = fixture.getEventType();
         assertNotNull(result);
@@ -167,24 +167,24 @@ public class BaseEventInfoTest extends TestCase {
     public void testSetEventType_2() {
         BaseEventInfo fixture = new BaseEventInfo("event");
         fixture.setEventType(TraceEventType.TRACEPOINT);
-        
+
         TraceEventType result = fixture.getEventType();
-        
+
         assertNotNull(result);
         assertEquals("tracepoint", result.getInName());
         assertEquals("TRACEPOINT", result.name());
         assertEquals("TRACEPOINT", result.toString());
         assertEquals(0, result.ordinal());
-        
+
         fixture.setEventType(TraceEventType.UNKNOWN);
         result = fixture.getEventType();
-        
+
         assertNotNull(result);
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         fixture.setEventType(TraceEventType.SYSCALL);
         result = fixture.getEventType();
         assertNotNull(result);
@@ -192,7 +192,7 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals("SYSCALL", result.name());
         assertEquals("SYSCALL", result.toString());
         assertEquals(1, result.ordinal());
-        
+
         fixture.setEventType(TraceEventType.PROBE);
         result = fixture.getEventType();
         assertNotNull(result);
@@ -202,17 +202,17 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals(2, result.ordinal());
 
     }
-    
+
     /**
      * Run the void setLogLevel(TraceLogLevel) method test.
      * Run the TraceLogLevel getLogLevel() method test
-     * 
+     *
      */
     public void testSetLogLevel1() {
         BaseEventInfo fixture = new BaseEventInfo("event");
         fixture.setEventType(TraceEventType.TRACEPOINT);
         fixture.setLogLevel(TraceLogLevel.TRACE_CRIT);
-        
+
         // 2 set/get-operations are enough to test the method
         TraceLogLevel result = fixture.getLogLevel();
         assertNotNull(result);
@@ -222,7 +222,7 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals(2, result.ordinal());
 
         fixture.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
@@ -230,17 +230,17 @@ public class BaseEventInfoTest extends TestCase {
         assertEquals("TRACE_DEBUG_FUNCTION", result.toString());
         assertEquals(12, result.ordinal());
     }
-    
+
     /**
      * Run the void setLogLevel(String) method test.
      * Run the TraceLogLevel getLogLevel() method test
-     * 
+     *
      */
     public void testSetLogLevel2() {
         BaseEventInfo fixture = new BaseEventInfo("event");
         fixture.setEventType(TraceEventType.TRACEPOINT);
         fixture.setLogLevel("TRACE_EMERG");
-        
+
         TraceLogLevel result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_EMERG", result.getInName());
@@ -249,16 +249,16 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_ALERT");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_ALERT", result.getInName());
         assertEquals("TRACE_ALERT", result.name());
         assertEquals(1, result.ordinal());
-        
+
         //------------------------
         fixture.setLogLevel("TRACE_CRIT");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_CRIT", result.getInName());
@@ -267,7 +267,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_ERR");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_ERR", result.getInName());
@@ -276,7 +276,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_WARNING");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_WARNING", result.getInName());
@@ -285,7 +285,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_NOTICE");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_NOTICE", result.getInName());
@@ -294,7 +294,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_INFO");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_INFO", result.getInName());
@@ -303,7 +303,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_SYSTEM");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_SYSTEM", result.getInName());
@@ -312,7 +312,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_PROGRAM");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_PROGRAM", result.getInName());
@@ -321,7 +321,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_PROCESS");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_PROCESS", result.getInName());
@@ -330,7 +330,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_MODULE");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_MODULE", result.getInName());
@@ -339,7 +339,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_UNIT");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_UNIT", result.getInName());
@@ -348,7 +348,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_FUNCTION");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
@@ -357,7 +357,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG_LINE");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG_LINE", result.getInName());
@@ -366,7 +366,7 @@ public class BaseEventInfoTest extends TestCase {
 
         //------------------------
         fixture.setLogLevel("TRACE_DEBUG");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG", result.getInName());
@@ -375,22 +375,22 @@ public class BaseEventInfoTest extends TestCase {
 
         //-------------------------
         fixture.setLogLevel("LEVEL_UNKNOWN");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("LEVEL_UNKNOWN", result.getInName());
         assertEquals("LEVEL_UNKNOWN", result.name());
         assertEquals(15, result.ordinal());
-        
+
         fixture.setLogLevel("garbage");
-        
+
         result = fixture.getLogLevel();
         assertNotNull(result);
         assertEquals("TRACE_DEBUG", result.getInName());
         assertEquals("TRACE_DEBUG", result.name());
         assertEquals(14, result.ordinal());
     }
-    
+
 
     /**
      * Run the String toString() method test.
@@ -419,7 +419,7 @@ public class BaseEventInfoTest extends TestCase {
         assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
         assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
         BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo2);
@@ -430,7 +430,7 @@ public class BaseEventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(fEventInfo2));
         assertTrue("equals", fEventInfo2.equals(info2));
     }
-    
+
     public void testEqualsTransivity() {
         BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
         BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
@@ -440,12 +440,12 @@ public class BaseEventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(info3));
         assertTrue("equals", info1.equals(info3));
     }
-    
+
     public void testEqualsNull() {
         assertTrue("equals", !fEventInfo1.equals(null));
         assertTrue("equals", !fEventInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index c3bb233af26574dc537b7bb1a564ebdc0e2010bb..4e9597e8ef223ef96fffd82c7e6892a9bd7dd97a 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -26,18 +26,18 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.EventInfo;
  * The class <code>ChannelInfoTest</code> contains tests for the class <code>{@link ChannelInfo}</code>.
  *
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class ChannelInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Test data
     // ------------------------------------------------------------------------
     private IChannelInfo fChannelInfo1 = null;
     private IChannelInfo fChannelInfo2 = null;
-   
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
-   
+
     /**
      * Perform pre-test initialization.
      *
@@ -66,7 +66,7 @@ public class ChannelInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Tests
     // ------------------------------------------------------------------------
-    
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -78,7 +78,7 @@ public class ChannelInfoTest extends TestCase {
     public void testChannelInfo() {
         ChannelInfo result = new ChannelInfo("test");
         assertNotNull(result);
-        
+
         assertEquals("test", result.getName());
         assertEquals(0, result.getNumberOfSubBuffers());
         assertEquals("", result.getOutputType());
@@ -91,7 +91,7 @@ public class ChannelInfoTest extends TestCase {
 
     public void testChannelInfoCopy() {
         ChannelInfo channelInfo = new ChannelInfo((ChannelInfo)fChannelInfo1);
-        
+
         assertEquals(fChannelInfo1.getName(), channelInfo.getName());
         assertEquals(fChannelInfo1.getNumberOfSubBuffers(), channelInfo.getNumberOfSubBuffers());
         assertEquals(fChannelInfo1.getOutputType(), channelInfo.getOutputType());
@@ -100,7 +100,7 @@ public class ChannelInfoTest extends TestCase {
         assertEquals(fChannelInfo1.getState(), channelInfo.getState());
         assertEquals(fChannelInfo1.getSwitchTimer(), channelInfo.getSwitchTimer());
         assertEquals(fChannelInfo1.getEvents().length, channelInfo.getEvents().length);
-        
+
         IEventInfo[] orignalEvents = fChannelInfo1.getEvents();
         IEventInfo[] resultEvents = channelInfo.getEvents();
         for (int i = 0; i < orignalEvents.length; i++) {
@@ -132,7 +132,7 @@ public class ChannelInfoTest extends TestCase {
         fixture.setNumberOfSubBuffers(1);
         fixture.setOutputType("");
         fixture.setSubBufferSize(1L);
-        
+
         // add an event
         IEventInfo event = new EventInfo("event");
         fixture.addEvent(event);
@@ -163,22 +163,22 @@ public class ChannelInfoTest extends TestCase {
 
         long switchTimer = fixture.getSwitchTimer();
         assertEquals(2L, switchTimer);
-        
+
         boolean mode = fixture.isOverwriteMode();
         assertTrue(mode);
-        
+
         long readTimer = fixture.getReadTimer();
         assertEquals(3L, readTimer);
-        
+
         TraceEnablement state = fixture.getState();
         assertEquals("disabled", state.getInName());
-        
+
         long numSubBuffers = fixture.getNumberOfSubBuffers();
         assertEquals(4, numSubBuffers);
-        
+
         String outputType = fixture.getOutputType();
         assertEquals("splice()", outputType);
-        
+
         long subBufferSize = fixture.getSubBufferSize();
         assertEquals(1L, subBufferSize);
 
@@ -192,22 +192,22 @@ public class ChannelInfoTest extends TestCase {
 
         switchTimer = fixture.getSwitchTimer();
         assertEquals(5L, switchTimer);
-        
+
         mode = fixture.isOverwriteMode();
         assertFalse(mode);
-        
+
         readTimer = fixture.getReadTimer();
         assertEquals(6L, readTimer);
-        
+
         state = fixture.getState();
         assertEquals("enabled", state.getInName());
-        
+
         numSubBuffers = fixture.getNumberOfSubBuffers();
         assertEquals(7, numSubBuffers);
-        
+
         outputType = fixture.getOutputType();
         assertEquals("mmap()", outputType);
-        
+
         subBufferSize = fixture.getSubBufferSize();
         assertEquals(8L, subBufferSize);
     }
@@ -226,7 +226,7 @@ public class ChannelInfoTest extends TestCase {
         fixture.setOutputType("");
         fixture.setSubBufferSize(1L);
         List<IEventInfo> events = new LinkedList<IEventInfo>();
-        
+
         for (int i = 0; i < 2; i++) {
             IEventInfo info = new EventInfo("event" + i);
             info.setEventType("tracepoint");
@@ -237,9 +237,9 @@ public class ChannelInfoTest extends TestCase {
         fixture.setEvents(events);
 
         IEventInfo[] infos = fixture.getEvents();
-        
+
         assertEquals(events.size(), infos.length);
-        
+
         for (int i = 0; i < infos.length; i++) {
             assertEquals(events.get(i), infos[i]);
         }
@@ -271,7 +271,7 @@ public class ChannelInfoTest extends TestCase {
         // add additional test code here
         assertEquals("[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])]", result);
     }
-    
+
     // ------------------------------------------------------------------------
     // equals
     // ------------------------------------------------------------------------
@@ -283,7 +283,7 @@ public class ChannelInfoTest extends TestCase {
         assertTrue("equals", !fChannelInfo1.equals(fChannelInfo2));
         assertTrue("equals", !fChannelInfo2.equals(fChannelInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         ChannelInfo event1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
         ChannelInfo event2 = new ChannelInfo((ChannelInfo)fChannelInfo2);
@@ -294,7 +294,7 @@ public class ChannelInfoTest extends TestCase {
         assertTrue("equals", event2.equals(fChannelInfo2));
         assertTrue("equals", fChannelInfo2.equals(event2));
     }
-    
+
     public void testEqualsTransivity() {
         ChannelInfo channel1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
         ChannelInfo channel2 = new ChannelInfo((ChannelInfo)fChannelInfo1);
@@ -304,12 +304,12 @@ public class ChannelInfoTest extends TestCase {
         assertTrue("equals", channel2.equals(channel3));
         assertTrue("equals", channel1.equals(channel3));
     }
-    
+
     public void testEqualsNull() throws Exception {
         assertTrue("equals", !fChannelInfo1.equals(null));
         assertTrue("equals", !fChannelInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index e3be27aa56cc25d2b2f4dbad87759e8e0cd9a5ac..012c786eb6bb86992eaafc7e620146d1992deaa2 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -24,7 +24,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.DomainInfo
  * The class <code>ChannelInfoTest</code> contains tests for the class <code>{@link DomainInfo}</code>.
  *
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class DomainInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Test data
@@ -37,7 +37,7 @@ public class DomainInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
-   
+
     /**
      * Perform pre-test initialization.
      *
@@ -69,7 +69,7 @@ public class DomainInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Tests
     // ------------------------------------------------------------------------
-    
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -81,7 +81,7 @@ public class DomainInfoTest extends TestCase {
     public void testDomainInfo() {
         DomainInfo result = new DomainInfo("test");
         assertNotNull(result);
-        
+
         assertEquals("test", result.getName());
         assertEquals(0, result.getChannels().length);
     }
@@ -111,19 +111,19 @@ public class DomainInfoTest extends TestCase {
      *
      */
     public void testGetAndSetters() {
-        
+
         // Note that addChannel() has been executed in setUp()
         // check get method here
         assertEquals(1, fDomainInfo1.getChannels().length);
         assertNotNull(fDomainInfo1.getChannels()[0]);
         assertEquals(fChannelInfo1, fDomainInfo1.getChannels()[0]);
-        
+
         IDomainInfo domain = new DomainInfo("domain");
         List<IChannelInfo> list = new LinkedList<IChannelInfo>();
         list.add(fChannelInfo1);
         list.add(fChannelInfo2);
         domain.setChannels(list);
-        
+
         IChannelInfo[] result = domain.getChannels();
         assertEquals(2, result.length);
         assertEquals(fChannelInfo1, result[0]);
@@ -147,7 +147,7 @@ public class DomainInfoTest extends TestCase {
 
         assertEquals("[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],isKernel=false)]", result);
     }
-    
+
     // ------------------------------------------------------------------------
     // equals
     // ------------------------------------------------------------------------
@@ -159,7 +159,7 @@ public class DomainInfoTest extends TestCase {
         assertTrue("equals", !fDomainInfo1.equals(fDomainInfo2));
         assertTrue("equals", !fDomainInfo2.equals(fDomainInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         DomainInfo event1 = new DomainInfo((DomainInfo)fDomainInfo1);
         DomainInfo event2 = new DomainInfo((DomainInfo)fDomainInfo2);
@@ -170,7 +170,7 @@ public class DomainInfoTest extends TestCase {
         assertTrue("equals", event2.equals(fDomainInfo2));
         assertTrue("equals", fDomainInfo2.equals(event2));
     }
-    
+
     public void testEqualsTransivity() {
         DomainInfo channel1 = new DomainInfo((DomainInfo)fDomainInfo1);
         DomainInfo channel2 = new DomainInfo((DomainInfo)fDomainInfo1);
@@ -180,12 +180,12 @@ public class DomainInfoTest extends TestCase {
         assertTrue("equals", channel2.equals(channel3));
         assertTrue("equals", channel1.equals(channel3));
     }
-    
+
     public void testEqualsNull() throws Exception {
         assertTrue("equals", !fDomainInfo1.equals(null));
         assertTrue("equals", !fDomainInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index 0a171a0ae09c711160d8e88ad33d47b59f53f3c7..3b11d4109c10f264ba8f623a40f61c906a812d15 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.EventInfo;
 /**
  * The class <code>BaseEventInfoTest</code> contains test for the class <code>{@link BaseEventInfo}</code>.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class EventInfoTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -30,7 +30,7 @@ public class EventInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     private IEventInfo fEventInfo1 = null;
     private IEventInfo fEventInfo2 = null;
-   
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
@@ -68,15 +68,15 @@ public class EventInfoTest extends TestCase {
     public void testBaseEventInfo() {
         EventInfo fixture = new EventInfo("event");
         assertNotNull(fixture);
-        
+
         TraceEventType result = fixture.getEventType();
-        
+
         assertEquals("event", fixture.getName());
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         TraceEnablement state = fixture.getState();
         assertEquals("disabled", state.getInName());
         assertEquals("DISABLED", state.name());
@@ -90,7 +90,7 @@ public class EventInfoTest extends TestCase {
      */
     public void testEventInfoCopy() {
         EventInfo info = new EventInfo((EventInfo)fEventInfo1);
-        
+
         assertEquals(fEventInfo1.getName(), info.getName());
         assertEquals(fEventInfo1.getEventType(), info.getEventType());
         assertEquals(fEventInfo1.getState(), info.getState());
@@ -109,13 +109,13 @@ public class EventInfoTest extends TestCase {
             // Success
         }
     }
-    
+
     /**
-     *  Getter/Setter tests 
+     *  Getter/Setter tests
      */
     public void testGetAndSetter() {
         EventInfo fixture = new EventInfo("event");
-        
+
         fixture.setEventType(TraceEventType.TRACEPOINT);
         TraceEventType result = fixture.getEventType();
 
@@ -132,12 +132,12 @@ public class EventInfoTest extends TestCase {
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         // setEventType(String typeName)
         String typeName = "";
         fixture.setEventType(typeName);
         result = fixture.getEventType();
-        
+
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
@@ -147,7 +147,7 @@ public class EventInfoTest extends TestCase {
 
         fixture.setEventType(typeName);
         result = fixture.getEventType();
-        
+
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
@@ -167,14 +167,14 @@ public class EventInfoTest extends TestCase {
         assertEquals("DISABLED", state.name());
         assertEquals("DISABLED", state.toString());
         assertEquals(0, state.ordinal());
-        
+
         fixture.setState("enabled");
         state = fixture.getState();
         assertEquals("enabled", state.getInName());
         assertEquals("ENABLED", state.name());
         assertEquals("ENABLED", state.toString());
         assertEquals(1, state.ordinal());
-        
+
         // setState(TraceEnablement state)
         fixture.setState(TraceEnablement.DISABLED);
         state = fixture.getState();
@@ -182,7 +182,7 @@ public class EventInfoTest extends TestCase {
         assertEquals("DISABLED", state.name());
         assertEquals("DISABLED", state.toString());
         assertEquals(0, state.ordinal());
-        
+
         fixture.setState(TraceEnablement.ENABLED);
         state = fixture.getState();
         assertEquals("enabled", state.getInName());
@@ -215,7 +215,7 @@ public class EventInfoTest extends TestCase {
         assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
         assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
         EventInfo info2 = new EventInfo((EventInfo)fEventInfo2);
@@ -226,7 +226,7 @@ public class EventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(fEventInfo2));
         assertTrue("equals", fEventInfo2.equals(info2));
     }
-    
+
     public void testEqualsTransivity() {
         EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
         EventInfo info2 = new EventInfo((EventInfo)fEventInfo1);
@@ -236,12 +236,12 @@ public class EventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(info3));
         assertTrue("equals", info1.equals(info3));
     }
-    
+
     public void testEqualsNull() {
         assertTrue("equals", !fEventInfo1.equals(null));
         assertTrue("equals", !fEventInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index 3dad415bcdec67c309289a4f986a976b46e864b3..fa92c7c051efe4cdb5b5c25250c20072f435b917 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:
  *   Bernd Hufmann - Initial API and implementation
  *******************************************************************************/
@@ -31,11 +31,11 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SessionInf
 import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.UstProviderInfo;
 
 /**
- *  Test facility to constants across test case 
+ *  Test facility to constants across test case
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class ModelImplFactory {
-    
+
     private ISessionInfo fSessionInfo1 = null;
     private ISessionInfo fSessionInfo2 = null;
     private IDomainInfo fDomainInfo1 = null;
@@ -51,7 +51,7 @@ public class ModelImplFactory {
     private IUstProviderInfo fUstProviderInfo2 = null;
     private IProbeEventInfo fProbeEventInfo1 = null;
     private IProbeEventInfo fProbeEventInfo2 = null;
-    
+
     public ModelImplFactory() {
         fBaseEventInfo1 = new BaseEventInfo("event1");
         fBaseEventInfo1.setEventType(TraceEventType.UNKNOWN);
@@ -59,7 +59,7 @@ public class ModelImplFactory {
         fBaseEventInfo2 = new BaseEventInfo("event2");
         fBaseEventInfo2.setEventType(TraceEventType.TRACEPOINT);
         fBaseEventInfo1.setLogLevel(TraceLogLevel.TRACE_DEBUG);
-        
+
         fEventInfo1 = new EventInfo("event1");
         fEventInfo1.setEventType(TraceEventType.TRACEPOINT);
         fEventInfo1.setState(TraceEnablement.ENABLED);
@@ -67,7 +67,7 @@ public class ModelImplFactory {
         fEventInfo2 = new EventInfo("event2");
         fEventInfo2.setEventType(TraceEventType.UNKNOWN);
         fEventInfo2.setState(TraceEnablement.DISABLED);
-        
+
         fEventInfo3 = new EventInfo("event3");
         fEventInfo3.setEventType(TraceEventType.TRACEPOINT);
         fEventInfo3.setState(TraceEnablement.DISABLED);
@@ -101,14 +101,14 @@ public class ModelImplFactory {
         fChannelInfo2.setSubBufferSize(4L);
         fChannelInfo2.addEvent(fEventInfo2);
         fChannelInfo2.addEvent(fEventInfo3);
-        
+
         fDomainInfo1 = new DomainInfo("test1");
         fDomainInfo1.addChannel(fChannelInfo1);
 
         fDomainInfo2 = new DomainInfo("test2");
         fDomainInfo2.addChannel(fChannelInfo1);
         fDomainInfo2.addChannel(fChannelInfo2);
-        
+
         fSessionInfo1 = new SessionInfo("session1");
         fSessionInfo1.setSessionPath("/home/user");
         fSessionInfo1.setSessionState(TraceSessionState.ACTIVE);
@@ -131,7 +131,7 @@ public class ModelImplFactory {
         fProbeEventInfo2.setOffset("0x100");
         fProbeEventInfo2.setSymbol("init_post");
     }
-    
+
     public ISessionInfo getSessionInfo1() {
         return fSessionInfo1;
     }
@@ -167,7 +167,7 @@ public class ModelImplFactory {
     public IEventInfo getEventInfo3() {
         return fEventInfo3;
     }
-    
+
     public IBaseEventInfo getBaseEventInfo1() {
         return fBaseEventInfo1;
     }
@@ -175,7 +175,7 @@ public class ModelImplFactory {
     public IBaseEventInfo getBaseEventInfo2() {
         return fBaseEventInfo2;
     }
-    
+
     public IUstProviderInfo getUstProviderInfo1() {
         return fUstProviderInfo1;
     }
@@ -183,7 +183,7 @@ public class ModelImplFactory {
     public IUstProviderInfo getUstProviderInfo2() {
         return fUstProviderInfo2;
     }
-    
+
     public IProbeEventInfo getProbeEventInfo1() {
         return fProbeEventInfo1;
     }
index 5b8fac676d87a61164db61eda2f01beaa0c2abe0..671911761709fc68c228fdfdd9c021fcd5e4ff50 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.ProbeEvent
 /**
  * The class <code>BaseEventInfoTest</code> contains test for the class <code>{@link BaseEventInfo}</code>.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class ProbeEventInfoTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -30,7 +30,7 @@ public class ProbeEventInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     private IProbeEventInfo fEventInfo1 = null;
     private IProbeEventInfo fEventInfo2 = null;
-   
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
@@ -68,21 +68,21 @@ public class ProbeEventInfoTest extends TestCase {
     public void testBaseEventInfo() {
         ProbeEventInfo fixture = new ProbeEventInfo("event");
         assertNotNull(fixture);
-        
+
         TraceEventType result = fixture.getEventType();
-        
+
         assertEquals("event", fixture.getName());
         assertEquals("unknown", result.getInName());
         assertEquals("UNKNOWN", result.name());
         assertEquals("UNKNOWN", result.toString());
         assertEquals(3, result.ordinal());
-        
+
         TraceEnablement state = fixture.getState();
         assertEquals("disabled", state.getInName());
         assertEquals("DISABLED", state.name());
         assertEquals("DISABLED", state.toString());
         assertEquals(0, state.ordinal());
-        
+
         assertNull(fixture.getAddress());
         assertNull(fixture.getOffset());
         assertNull(fixture.getSymbol());
@@ -93,7 +93,7 @@ public class ProbeEventInfoTest extends TestCase {
      */
     public void testEventInfoCopy() {
         ProbeEventInfo info = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
-        
+
         assertEquals(fEventInfo1.getName(), info.getName());
         assertEquals(fEventInfo1.getEventType(), info.getEventType());
         assertEquals(fEventInfo1.getState(), info.getState());
@@ -115,13 +115,13 @@ public class ProbeEventInfoTest extends TestCase {
             // Success
         }
     }
-    
+
     /**
-     *  Getter/Setter tests 
+     *  Getter/Setter tests
      */
     public void testGetAndSetter() {
         ProbeEventInfo fixture = new ProbeEventInfo("event");
-        
+
         fixture.setAddress("0xc12344321");
         String result = fixture.getAddress();
 
@@ -159,7 +159,7 @@ public class ProbeEventInfoTest extends TestCase {
         assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
         assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
         ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo2);
@@ -170,7 +170,7 @@ public class ProbeEventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(fEventInfo2));
         assertTrue("equals", fEventInfo2.equals(info2));
     }
-    
+
     public void testEqualsTransivity() {
         ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
         ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
@@ -180,12 +180,12 @@ public class ProbeEventInfoTest extends TestCase {
         assertTrue("equals", info2.equals(info3));
         assertTrue("equals", info1.equals(info3));
     }
-    
+
     public void testEqualsNull() {
         assertTrue("equals", !fEventInfo1.equals(null));
         assertTrue("equals", !fEventInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index 730214610ea2371a81bd739d19d15ddc7194b422..69f937ef71145071acec4305a3f8577fe7297e33 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -25,21 +25,21 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SessionInf
  * The class <code>ChannelInfoTest</code> contains tests for the class <code>{@link SessionInfo}</code>.
  *
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class SessionInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Test data
     // ------------------------------------------------------------------------
     private ISessionInfo fSessionInfo1 = null;
     private ISessionInfo fSessionInfo2 = null;
-    
+
     private IDomainInfo fDomainInfo1 = null;
     private IDomainInfo fDomainInfo2 = null;
 
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
-   
+
     /**
      * Perform pre-test initialization.
      *
@@ -70,7 +70,7 @@ public class SessionInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Tests
     // ------------------------------------------------------------------------
-    
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -82,7 +82,7 @@ public class SessionInfoTest extends TestCase {
     public void testSessionInfo() {
         ISessionInfo result = new SessionInfo("test");
         assertNotNull(result);
-        
+
         assertEquals("test", result.getName());
         assertEquals("", result.getSessionPath());
         TraceSessionState state = result.getSessionState();
@@ -95,7 +95,7 @@ public class SessionInfoTest extends TestCase {
 
     public void testSessionInfoCopy() {
         SessionInfo sessionInfo = new SessionInfo((SessionInfo)fSessionInfo1);
-        
+
         assertEquals(sessionInfo.getName(), fSessionInfo1.getName());
         assertEquals(sessionInfo.getSessionPath(), fSessionInfo1.getSessionPath());
         assertEquals(sessionInfo.getSessionState(), fSessionInfo1.getSessionState());
@@ -123,27 +123,27 @@ public class SessionInfoTest extends TestCase {
      *
      */
     public void testGetAndSetters() {
-        
+
         // Note that addDomain() has been executed in setUp()
         // check get method here
         assertEquals(1, fSessionInfo1.getDomains().length);
         assertNotNull(fSessionInfo1.getDomains()[0]);
         assertEquals(fDomainInfo1, fSessionInfo1.getDomains()[0]);
-        
+
         ISessionInfo session = new SessionInfo("session");
         List<IDomainInfo> list = new LinkedList<IDomainInfo>();
         list.add(fDomainInfo1);
         list.add(fDomainInfo2);
         session.setDomains(list);
-        
+
         IDomainInfo[] result = session.getDomains();
         assertEquals(2, result.length);
         assertEquals(fDomainInfo1, result[0]);
         assertEquals(fDomainInfo2, result[1]);
-        
+
         session.setSessionPath("/home/user");
         assertEquals("/home/user", session.getSessionPath());
-        
+
         session.setSessionState("active");
         TraceSessionState state = session.getSessionState();
         state = session.getSessionState();
@@ -151,7 +151,7 @@ public class SessionInfoTest extends TestCase {
         assertEquals("ACTIVE", state.name());
         assertEquals("ACTIVE", state.toString());
         assertEquals(1, state.ordinal());
-        
+
         session.setSessionState("inactive");
         state = session.getSessionState();
         assertEquals("inactive", state.getInName());
@@ -165,7 +165,7 @@ public class SessionInfoTest extends TestCase {
         assertEquals("INACTIVE", state.name());
         assertEquals("INACTIVE", state.toString());
         assertEquals(0, state.ordinal());
-        
+
         session.setSessionState(TraceSessionState.ACTIVE);
         state = session.getSessionState();
         assertEquals("active", state.getInName());
@@ -200,7 +200,7 @@ public class SessionInfoTest extends TestCase {
         // add additional test code here
         assertEquals("[SessionInfo([TraceInfo(Name=session1)],State=ACTIVE,Domains=[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],isKernel=false)])]", result);
     }
-    
+
     // ------------------------------------------------------------------------
     // equals
     // ------------------------------------------------------------------------
@@ -212,7 +212,7 @@ public class SessionInfoTest extends TestCase {
         assertTrue("equals", !fSessionInfo1.equals(fSessionInfo2));
         assertTrue("equals", !fSessionInfo2.equals(fSessionInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         SessionInfo event1 = new SessionInfo((SessionInfo)fSessionInfo1);
         SessionInfo event2 = new SessionInfo((SessionInfo)fSessionInfo2);
@@ -223,7 +223,7 @@ public class SessionInfoTest extends TestCase {
         assertTrue("equals", event2.equals(fSessionInfo2));
         assertTrue("equals", fSessionInfo2.equals(event2));
     }
-    
+
     public void testEqualsTransivity() {
         SessionInfo channel1 = new SessionInfo((SessionInfo)fSessionInfo1);
         SessionInfo channel2 = new SessionInfo((SessionInfo)fSessionInfo1);
@@ -233,12 +233,12 @@ public class SessionInfoTest extends TestCase {
         assertTrue("equals", channel2.equals(channel3));
         assertTrue("equals", channel1.equals(channel3));
     }
-    
+
     public void testEqualsNull() throws Exception {
         assertTrue("equals", !fSessionInfo1.equals(null));
         assertTrue("equals", !fSessionInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index b1902f74fb1f20a8c49e5989d28d468fc858512c..e60169c11719d226b6791f3bd51514077f848800 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -19,7 +19,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo;
 /**
  * The class <code>TraceInfoTest</code> contains test for the class <code>{@link TraceInfo}</code>.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class TraceInfoTest extends TestCase {
 
     // ------------------------------------------------------------------------
@@ -27,8 +27,8 @@ public class TraceInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     private ITraceInfo fTraceInfo1 = null;
     private ITraceInfo fTraceInfo2 = null;
-   
-    
+
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
@@ -65,7 +65,7 @@ public class TraceInfoTest extends TestCase {
     public void testTraceInfo() {
         TraceInfo fixture = new TraceInfo("event");
         assertNotNull(fixture);
-        
+
         assertEquals("event", fixture.getName());
     }
 
@@ -82,13 +82,13 @@ public class TraceInfoTest extends TestCase {
             // Success
         }
     }
-    
+
     /**
      * Test Copy Constructor
      */
     public void testTraceInfoCopy() {
         TraceInfo info = new TraceInfo((TraceInfo)fTraceInfo1);
-        
+
         assertEquals(fTraceInfo1.getName(), info.getName());
     }
 
@@ -105,7 +105,7 @@ public class TraceInfoTest extends TestCase {
             // Success
         }
     }
-    
+
     /**
      * Run the void setEventType(String) method test.
      *
@@ -126,7 +126,7 @@ public class TraceInfoTest extends TestCase {
         // add additional test code here
         assertEquals("[TraceInfo(Name=event1)]", result);
     }
-    
+
     // ------------------------------------------------------------------------
     // equals
     // ------------------------------------------------------------------------
@@ -138,7 +138,7 @@ public class TraceInfoTest extends TestCase {
         assertTrue("equals", !fTraceInfo1.equals(fTraceInfo2));
         assertTrue("equals", !fTraceInfo2.equals(fTraceInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
         TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
@@ -149,7 +149,7 @@ public class TraceInfoTest extends TestCase {
         assertTrue("equals", info2.equals(fTraceInfo2));
         assertTrue("equals", fTraceInfo2.equals(info2));
     }
-    
+
     public void testEqualsTransivity() {
         TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
         TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo1);
@@ -159,12 +159,12 @@ public class TraceInfoTest extends TestCase {
         assertTrue("equals", info2.equals(info3));
         assertTrue("equals", info1.equals(info3));
     }
-    
+
     public void testEqualsNull() {
         assertTrue("equals", !fTraceInfo1.equals(null));
         assertTrue("equals", !fTraceInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index b1d979e2831886a42158a9aec7d80fa7622c3536..ada9f1ceac0935b8b8018aa66bc85887c1c04482 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
@@ -25,21 +25,21 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.UstProvide
  * The class <code>ChannelInfoTest</code> contains tests for the class <code>{@link UstProviderInfo}</code>.
  *
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "javadoc"})
 public class UstProviderInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Test data
     // ------------------------------------------------------------------------
     private IUstProviderInfo fUstProviderInfo1 = null;
     private IUstProviderInfo fUstProviderInfo2 = null;
-    
+
     private IBaseEventInfo fEventInfo1 = null;
     private IBaseEventInfo fEventInfo2 = null;
-   
+
     // ------------------------------------------------------------------------
     // Housekeeping
     // ------------------------------------------------------------------------
-   
+
     /**
      * Perform pre-test initialization.
      *
@@ -70,7 +70,7 @@ public class UstProviderInfoTest extends TestCase {
     // ------------------------------------------------------------------------
     // Tests
     // ------------------------------------------------------------------------
-    
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -82,7 +82,7 @@ public class UstProviderInfoTest extends TestCase {
     public void testUstProviderInfo() {
         IUstProviderInfo result = new UstProviderInfo("test");
         assertNotNull(result);
-        
+
         assertEquals("test", result.getName());
         assertEquals(0, result.getPid());
         assertEquals(0, result.getEvents().length);
@@ -90,11 +90,11 @@ public class UstProviderInfoTest extends TestCase {
 
     public void testUstProviderInfoCopy() {
         IUstProviderInfo providerInf = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
-        
+
         assertEquals(fUstProviderInfo1.getName(), providerInf.getName());
         assertEquals(fUstProviderInfo1.getPid(), providerInf.getPid());
         assertEquals(fUstProviderInfo1.getEvents().length, providerInf.getEvents().length);
-        
+
         IBaseEventInfo[] orignalEvents = fUstProviderInfo1.getEvents();
         IBaseEventInfo[] resultEvents = providerInf.getEvents();
         for (int i = 0; i < orignalEvents.length; i++) {
@@ -120,7 +120,7 @@ public class UstProviderInfoTest extends TestCase {
     public void testGetAndSetters() {
         IUstProviderInfo fixture = new UstProviderInfo("test");
         fixture.setPid(2468);
-        
+
         // add an event
         IBaseEventInfo event = new BaseEventInfo("event");
         fixture.addEvent(event);
@@ -132,7 +132,7 @@ public class UstProviderInfoTest extends TestCase {
         assertEquals(1, result.length);
         assertNotNull(result[0]);
         assertTrue(event.equals(result[0]));
-        
+
         assertEquals(2468, fixture.getPid());
     }
 
@@ -147,11 +147,11 @@ public class UstProviderInfoTest extends TestCase {
         events.add(fEventInfo1);
         events.add(fEventInfo2);
         fixture.setEvents(events);
-        
+
         IBaseEventInfo[] infos = fixture.getEvents();
-        
+
         assertEquals(events.size(), infos.length);
-        
+
         for (int i = 0; i < infos.length; i++) {
             assertEquals(events.get(i), infos[i]);
         }
@@ -173,7 +173,7 @@ public class UstProviderInfoTest extends TestCase {
         String result = fUstProviderInfo2.toString();
         assertEquals("[EventInfo([TraceInfo(Name=myUST2)],PID=2345,Events=[BaseEventInfo([TraceInfo(Name=event1)],type=UNKNOWN,level=TRACE_DEBUG)][BaseEventInfo([TraceInfo(Name=event2)],type=TRACEPOINT,level=TRACE_DEBUG)])]", result);
     }
-    
+
     // ------------------------------------------------------------------------
     // equals
     // ------------------------------------------------------------------------
@@ -185,7 +185,7 @@ public class UstProviderInfoTest extends TestCase {
         assertTrue("equals", !fUstProviderInfo1.equals(fUstProviderInfo2));
         assertTrue("equals", !fUstProviderInfo2.equals(fUstProviderInfo1));
     }
-    
+
     public void testEqualsSymmetry() {
         UstProviderInfo event1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
         UstProviderInfo event2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo2);
@@ -196,7 +196,7 @@ public class UstProviderInfoTest extends TestCase {
         assertTrue("equals", event2.equals(fUstProviderInfo2));
         assertTrue("equals", fUstProviderInfo2.equals(event2));
     }
-    
+
     public void testEqualsTransivity() {
         UstProviderInfo UstProvider1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
         UstProviderInfo UstProvider2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
@@ -206,12 +206,12 @@ public class UstProviderInfoTest extends TestCase {
         assertTrue("equals", UstProvider2.equals(UstProvider3));
         assertTrue("equals", UstProvider1.equals(UstProvider3));
     }
-    
+
     public void testEqualsNull() throws Exception {
         assertTrue("equals", !fUstProviderInfo1.equals(null));
         assertTrue("equals", !fUstProviderInfo2.equals(null));
     }
-    
+
     // ------------------------------------------------------------------------
     // hashCode
     // ------------------------------------------------------------------------
index 3850c601027659afd74bf8ee0768f2c279891e45..dbbfb566ee4fb6d0d32166e2804cb9387ecb82cb 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -17,7 +17,7 @@ import java.util.List;
  * <p>
  * Interface for retrieval of trace session information.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public interface ISessionInfo extends ITraceInfo {
@@ -31,38 +31,38 @@ public interface ISessionInfo extends ITraceInfo {
      * @param state - state to set.
      */
     public void setSessionState(TraceSessionState state);
-    
+
     /**
      * Sets the event state to the value specified by the given name.
      * @param stateName - state to set.
      */
     public void setSessionState(String stateName);
-    
+
     /**
      * @return path string where session is located.
      */
     public String getSessionPath();
-    
+
     /**
      * Sets the path string (where session is located) to the given value.
      * @param path - session path to set.
      */
     public void setSessionPath(String path);
-    
+
     /**
      * @return all domain information as array.
      */
     public IDomainInfo[] getDomains();
-    
+
     /**
      * Sets all domain information specified by given list.
      * @param domains - all domain information to set.
      */
     public void setDomains(List<IDomainInfo> domains);
-    
+
     /**
      * Adds a single domain information.
-     * @param domain - domain information to add.
+     * @param domainInfo domain information to add.
      */
     public void addDomain(IDomainInfo domainInfo);
 }
index b8d677d36ea223ecd1fcb1550f0b9c17bbf534cb..57ea7d828889daa93e3afc6989b2923bcef835e9 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Interface for retrieve trace comon information.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public interface ITraceInfo {
@@ -23,11 +23,13 @@ public interface ITraceInfo {
      * @return the name of the information element.
      */
     public String getName();
-    
+
     /**
      * Sets the name of the information element.
+     *
      * @param name
+     *            The name to assign
      */
     public void setName(String name);
-    
+
 }
index 3c38e27391b4f1dc4a60d57b9c9952ed800034db..1cc3d7924be2f520fc5922e3437a5ce276a5871f 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  *********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,17 +15,20 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Type of log Level enumeration.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public enum LogLevelType {
-    
+
     // ------------------------------------------------------------------------
     // Enum definition
     // ------------------------------------------------------------------------
-    LOGLEVEL, // range of log levels [0,logLevel]
-    LOGLEVEL_ONLY, // single log level
-    LOGLEVEL_NONE; // no log level
-};
+    /** range of log levels [0,logLevel] */
+    LOGLEVEL,
 
+    /** single log level */
+    LOGLEVEL_ONLY,
 
+    /** no log level */
+    LOGLEVEL_NONE;
+}
index c127174eb65ac825b1a60cdc5ddebfcbcf1136fb..ae1cfa7bca8c4ddd873ee29190a1d55ae4f978b4 100644 (file)
@@ -1,26 +1,30 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
 
 /**
  * <p>
- *  Enumeration for the node connection state. 
+ *  Enumeration for the node connection state.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public enum TargetNodeState {
-     DISCONNECTED, 
-     DISCONNECTING, 
-     CONNECTED, 
-     CONNECTING;
+     /** State when disconnected */
+    DISCONNECTED,
+     /** State while disconnecting */
+    DISCONNECTING,
+     /** State when connected */
+    CONNECTED,
+     /** State while connecting */
+    CONNECTING;
 }
index a8a50d1f2eb82cb9ec7f20713d4e70976a6b1407..c9eab3e097a8a22dd62828aa2769ed7c56b4344b 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Enumeration for enabled/disabled states.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public enum TraceEnablement {
@@ -23,21 +23,23 @@ public enum TraceEnablement {
     // ------------------------------------------------------------------------
     // Enum definition
     // ------------------------------------------------------------------------
+    /** Tracing is disabled */
     DISABLED("disabled"), //$NON-NLS-1$
+    /** Tracing is enabled */
     ENABLED("enabled"); //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * Name of enum  
+     * Name of enum
      */
     private final String fInName;
 
     // ------------------------------------------------------------------------
     // Constuctors
     // ------------------------------------------------------------------------
-    
+
     /**
      * Private constructor
      * @param name the name of state
@@ -55,5 +57,4 @@ public enum TraceEnablement {
     public String getInName() {
         return fInName;
     }
-};
-
+}
index 0650831a9652dcfc3dbeee7ee36862b65d10ffa9..67b84b10b78b7a3b570e637b9036c6b9325a37ee 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,13 +15,17 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Trace event type enumeration.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
-public enum TraceEventType { 
+public enum TraceEventType {
+    /** Event type: tracepoint */
     TRACEPOINT("tracepoint"), //$NON-NLS-1$
+    /** Event type: syscall */
     SYSCALL("syscall"), //$NON-NLS-1$
+    /** Event type: probe */
     PROBE("probe"),  //$NON-NLS-1$
+    /** Event type unknown */
     UNKNOWN("unknown"); //$NON-NLS-1$
 
     private final String fInName;
@@ -30,8 +34,13 @@ public enum TraceEventType {
         fInName = name;
     }
 
+    /**
+     * Get the type's name
+     *
+     * @return The type's name
+     */
     public String getInName() {
         return fInName;
     }
-};
+}
 
index 894989b203a82dea9cc3d329c21a64accb822e8c..27e7ba2d5b4484ecb05641c0c1a2a5daee73c5f2 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  *********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,44 +15,60 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Log Level enumeration.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 @SuppressWarnings("nls")
 public enum TraceLogLevel {
-    
+
     // ------------------------------------------------------------------------
     // Enum definition
     // ------------------------------------------------------------------------
-    TRACE_EMERG("TRACE_EMERG"), // 0
-    TRACE_ALERT("TRACE_ALERT"), // 1
-    TRACE_CRIT("TRACE_CRIT"), // 2
-    TRACE_ERR("TRACE_ERR"), // 3
-    TRACE_WARNING("TRACE_WARNING"), // 4
-    TRACE_NOTICE("TRACE_NOTICE"), // 5
-    TRACE_INFO("TRACE_INFO"), // 6
-    TRACE_DEBUG_SYSTEM("TRACE_DEBUG_SYSTEM"), // 7
-    TRACE_DEBUG_PROGRAM("TRACE_DEBUG_PROGRAM"), // 8
-    TRACE_DEBUG_PROCESS("TRACE_DEBUG_PROCESS"), // 9
-    TRACE_DEBUG_MODULE("TRACE_DEBUG_MODULE"), // 10
-    TRACE_DEBUG_UNIT("TRACE_DEBUG_UNIT"), // 11
-    TRACE_DEBUG_FUNCTION("TRACE_DEBUG_FUNCTION"), //12
-    TRACE_DEBUG_LINE("TRACE_DEBUG_LINE"), //13
-    TRACE_DEBUG("TRACE_DEBUG"), // 14
-    LEVEL_UNKNOWN("LEVEL_UNKNOWN"); // 15
+    /** Log level 0 */
+    TRACE_EMERG("TRACE_EMERG"),
+    /** Log level 1 */
+    TRACE_ALERT("TRACE_ALERT"),
+    /** Log level 2 */
+    TRACE_CRIT("TRACE_CRIT"),
+    /** Log level 3 */
+    TRACE_ERR("TRACE_ERR"),
+    /** Log level 4 */
+    TRACE_WARNING("TRACE_WARNING"),
+    /** Log level 5 */
+    TRACE_NOTICE("TRACE_NOTICE"),
+    /** Log level 6 */
+    TRACE_INFO("TRACE_INFO"),
+    /** Log level 7 */
+    TRACE_DEBUG_SYSTEM("TRACE_DEBUG_SYSTEM"),
+    /** Log level 8 */
+    TRACE_DEBUG_PROGRAM("TRACE_DEBUG_PROGRAM"),
+    /** Log level 9 */
+    TRACE_DEBUG_PROCESS("TRACE_DEBUG_PROCESS"),
+    /** Log level 10 */
+    TRACE_DEBUG_MODULE("TRACE_DEBUG_MODULE"),
+    /** Log level 11 */
+    TRACE_DEBUG_UNIT("TRACE_DEBUG_UNIT"),
+    /** Log level 12 */
+    TRACE_DEBUG_FUNCTION("TRACE_DEBUG_FUNCTION"),
+    /** Log level 13 */
+    TRACE_DEBUG_LINE("TRACE_DEBUG_LINE"),
+    /** Log level 14 */
+    TRACE_DEBUG("TRACE_DEBUG"),
+    /** Log level 15 */
+    LEVEL_UNKNOWN("LEVEL_UNKNOWN");
 
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * Name of enum. 
+     * Name of enum.
      */
     private final String fInName;
 
     // ------------------------------------------------------------------------
     // Constuctors
     // ------------------------------------------------------------------------
-    
+
     /**
      * Private constructor
      * @param name the name of state
@@ -70,6 +86,4 @@ public enum TraceLogLevel {
     public String getInName() {
         return fInName;
     }
-};
-
-
+}
index 3f1f0d18a800e9646de461642657206aba67c905..2bd1f38e0bae75174e4a9b8969a38d9c5dd9dd9e 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  *********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model;
@@ -15,29 +15,31 @@ package org.eclipse.linuxtools.internal.lttng2.core.control.model;
  * <p>
  * Session state enumeration.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public enum TraceSessionState {
-    
+
     // ------------------------------------------------------------------------
     // Enum definition
     // ------------------------------------------------------------------------
+    /** Trace session inactive */
     INACTIVE("inactive"), //$NON-NLS-1$
+    /** Trace session active */
     ACTIVE("active"); //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * Name of enum. 
+     * Name of enum.
      */
     private final String fInName;
 
     // ------------------------------------------------------------------------
     // Constuctors
     // ------------------------------------------------------------------------
-    
+
     /**
      * Private constructor
      * @param name the name of state
@@ -55,5 +57,4 @@ public enum TraceSessionState {
     public String getInName() {
         return fInName;
     }
-};
-
+}
index 1eb55202630088570a433392af2f11ee0ae407ba..4a3ae9ca43b7022da5317c0d1cc94fbfb6b1deb6 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
@@ -22,9 +22,9 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEnablement
 /**
  * <p>
  * Implementation of the trace channel interface (IChannelInfo) to store channel
- * related data. 
+ * related data.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class ChannelInfo extends TraceInfo implements IChannelInfo {
@@ -63,9 +63,9 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
     /**
      * The events information of the channel.
      */
-    private List<IEventInfo> fEvents = new ArrayList<IEventInfo>();
+    private final List<IEventInfo> fEvents = new ArrayList<IEventInfo>();
+
 
-    
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -229,7 +229,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
     public void setState(TraceEnablement state) {
         fState = state;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setState(java.lang.String)
@@ -243,7 +243,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
             fState = TraceEnablement.ENABLED;
         }
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getEvents()
@@ -260,7 +260,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
     @Override
     public void setEvents(List<IEventInfo> events) {
         for (Iterator<IEventInfo> iterator = events.iterator(); iterator.hasNext();) {
-            IEventInfo eventInfo = (IEventInfo) iterator.next();
+            IEventInfo eventInfo = iterator.next();
             fEvents.add(eventInfo);
         }
     }
@@ -273,7 +273,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
     public void addEvent(IEventInfo channel) {
         fEvents.add(channel);
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
@@ -291,7 +291,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
         result = prime * result + (int) (fSubBufferSize ^ (fSubBufferSize >>> 32));
         result = prime * result + (int) (fSwitchTimer ^ (fSwitchTimer >>> 32));
         return result;
-    }  
+    }
 
     /*
      * (non-Javadoc)
@@ -343,7 +343,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
         }
         return true;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
@@ -373,7 +373,7 @@ public class ChannelInfo extends TraceInfo implements IChannelInfo {
                 output.append("None");
             } else {
                 for (Iterator<IEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
-                    IEventInfo event = (IEventInfo) iterator.next();
+                    IEventInfo event = iterator.next();
                     output.append(event.toString());
                 }
             }
index 31681db2c299d9492b98ff76a367f396a449e112..854f7d688f31dadcedc18ff963037e235282ff8f 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
@@ -21,9 +21,9 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo;
 /**
  * <p>
  * Implementation of the trace domain interface (IDomainInfo) to store domain
- * related data. 
+ * related data.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class DomainInfo extends TraceInfo implements IDomainInfo {
@@ -34,7 +34,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
     /**
      * The channels information of the domain.
      */
-    private List<IChannelInfo> fChannels = new ArrayList<IChannelInfo>();
+    private final List<IChannelInfo> fChannels = new ArrayList<IChannelInfo>();
     private boolean fIsKernel = false;
 
     // ------------------------------------------------------------------------
@@ -63,7 +63,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
         }
         fIsKernel = other.fIsKernel;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#isKernel()
@@ -72,7 +72,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
     public boolean isKernel() {
         return fIsKernel;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#setIsKernel(boolean)
@@ -101,7 +101,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
     @Override
     public void setChannels(List<IChannelInfo> channels) {
         for (Iterator<IChannelInfo> iterator = channels.iterator(); iterator.hasNext();) {
-            IChannelInfo channelInfo = (IChannelInfo) iterator.next();
+            IChannelInfo channelInfo = iterator.next();
             fChannels.add(channelInfo);
         }
     }
@@ -114,7 +114,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
     public void addChannel(IChannelInfo channel) {
         fChannels.add(channel);
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
@@ -172,7 +172,7 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
                 output.append("None");
             } else {
                 for (Iterator<IChannelInfo> iterator = fChannels.iterator(); iterator.hasNext();) {
-                    IChannelInfo channel = (IChannelInfo) iterator.next();
+                    IChannelInfo channel = iterator.next();
                     output.append(channel.toString());
                 }
             }
@@ -181,5 +181,5 @@ public class DomainInfo extends TraceInfo implements IDomainInfo {
             output.append(")]");
             return output.toString();
     }
-    
+
 }
index 7261251ef656397cecd0831ff05c87ed70e10ef5..0878a5b42190888153659f9717ab89582aa9c86a 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
@@ -22,9 +22,9 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionSta
 /**
  * <p>
  * Implementation of the trace session interface (ISessionInfo) to store session
- * related data. 
+ * related data.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class SessionInfo extends TraceInfo implements ISessionInfo {
@@ -36,14 +36,14 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
      * The trace session state.
      */
     private TraceSessionState fState = TraceSessionState.INACTIVE;
-    /** 
+    /**
      * The trace session path for storing traces.
      */
     private String fSessionPath = ""; //$NON-NLS-1$
     /**
      * The domains information of this session.
      */
-    private List<IDomainInfo> fDomains = new ArrayList<IDomainInfo>();
+    private final List<IDomainInfo> fDomains = new ArrayList<IDomainInfo>();
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -64,7 +64,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
         super(other);
         fState = other.fState;
         fSessionPath = other.fSessionPath;
-        
+
         for (Iterator<IDomainInfo> iterator = other.fDomains.iterator(); iterator.hasNext();) {
             IDomainInfo domain = iterator.next();
             if (domain instanceof DomainInfo) {
@@ -74,7 +74,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
             }
         }
     }
-    
+
     // ------------------------------------------------------------------------
     // Accessors
     // ------------------------------------------------------------------------
@@ -108,7 +108,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
             fState = TraceSessionState.ACTIVE;
         }
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#getSessionPath()
@@ -143,7 +143,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
     @Override
     public void setDomains(List<IDomainInfo> domains) {
         for (Iterator<IDomainInfo> iterator = domains.iterator(); iterator.hasNext();) {
-            IDomainInfo domainInfo = (IDomainInfo) iterator.next();
+            IDomainInfo domainInfo = iterator.next();
             fDomains.add(domainInfo);
         }
     }
@@ -159,7 +159,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
     public void addDomain(IDomainInfo domainInfo) {
         fDomains.add(domainInfo);
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
@@ -224,7 +224,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo {
             output.append(fState);
             output.append(",Domains=");
             for (Iterator<IDomainInfo> iterator = fDomains.iterator(); iterator.hasNext();) {
-                IDomainInfo domain = (IDomainInfo) iterator.next();
+                IDomainInfo domain = iterator.next();
                 output.append(domain.toString());
             }
             output.append(")]");
index e5f1234caddd5d994c15c266f5926ce54a69026e..604f03264bbfa116a970475a918c530171d3a439 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
@@ -18,7 +18,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.ITraceInfo;
  * Implementation of the base trace information interface (ITraceInfo) to
  * store common data.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class TraceInfo implements ITraceInfo {
@@ -52,9 +52,8 @@ public class TraceInfo implements ITraceInfo {
     public TraceInfo(TraceInfo other) {
         if (other == null) {
             throw new IllegalArgumentException();
-        } else {
-            fName = String.valueOf(other.fName);
         }
+        fName = String.valueOf(other.fName);
     }
 
     // ------------------------------------------------------------------------
@@ -77,7 +76,7 @@ public class TraceInfo implements ITraceInfo {
     public void setName(String name) {
         fName = name;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see java.lang.Object#hashCode()
@@ -114,7 +113,7 @@ public class TraceInfo implements ITraceInfo {
             return false;
         }
         return true;
-    }    
+    }
     /*
      * (non-Javadoc)
      * @see java.lang.Object#toString()
index 1f166d5514548ea0a7c6a739aac4d3add17524df..8ac03fbb9dc314783e540c52bbd75205728c07b7 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
@@ -20,10 +20,10 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInf
 
 /**
  * <p>
- * Implementation of the Ust Provider interface (IUstProviderInfo) to store UST 
- * provider related data. 
+ * Implementation of the Ust Provider interface (IUstProviderInfo) to store UST
+ * provider related data.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
@@ -38,8 +38,8 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
     /**
      * List of event information.
      */
-    private List<IBaseEventInfo> fEvents = new ArrayList<IBaseEventInfo>(); 
-    
+    private final List<IBaseEventInfo> fEvents = new ArrayList<IBaseEventInfo>();
+
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -50,7 +50,7 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
     public UstProviderInfo(String name) {
         super(name);
     }
-    
+
     /**
      * Copy constructor
      * @param other - the instance to copy
@@ -67,7 +67,7 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
             }
         }
     }
-    
+
     // ------------------------------------------------------------------------
     // Accessors
     // ------------------------------------------------------------------------
@@ -106,7 +106,7 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
     @Override
     public void setEvents(List<IBaseEventInfo> events) {
         for (Iterator<IBaseEventInfo> iterator = events.iterator(); iterator.hasNext();) {
-            IBaseEventInfo eventInfo = (IBaseEventInfo) iterator.next();
+            IBaseEventInfo eventInfo = iterator.next();
             fEvents.add(eventInfo);
         }
     }
@@ -165,7 +165,7 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
         }
         return true;
     }
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
@@ -183,7 +183,7 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
                 output.append("None");
             } else {
                 for (Iterator<IBaseEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
-                    IBaseEventInfo event = (IBaseEventInfo) iterator.next();
+                    IBaseEventInfo event = iterator.next();
                     output.append(event.toString());
                 }
             }
@@ -191,5 +191,5 @@ public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
             return output.toString();
     }
 
+
 }
This page took 0.06121 seconds and 5 git commands to generate.