TMF: Add base class and interface for state system analysis
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / ITmfTrace.java
index 8d858d193f506aaa3156fd49743f6a17c6835dca..292102e19452c55d38db11b7eb396d205ff15b04 100644 (file)
@@ -16,7 +16,6 @@
 package org.eclipse.linuxtools.tmf.core.trace;
 
 import java.util.Collections;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.resources.IProject;
@@ -27,6 +26,7 @@ import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystemAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform;
 import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
@@ -208,7 +208,12 @@ public interface ITmfTrace extends ITmfDataProvider {
      *
      * @return The map of state systems
      * @since 2.0
+     * @deprecated State systems now should be provided by analysis and use
+     *             {@link ITmfStateSystemAnalysisModule} and retrieve the modules
+     *             with {@link TmfTrace#getAnalysisModules(Class)} with Class
+     *             being TmfStateSystemAnalysisModule.class
      */
+    @Deprecated
     Map<String, ITmfStateSystem> getStateSystems();
 
     /**
@@ -223,7 +228,10 @@ public interface ITmfTrace extends ITmfDataProvider {
      * @param ss
      *            The already-built state system
      * @since 2.0
+     * @deprecated State systems now should be provided by analysis and use
+     *             {@link ITmfStateSystemAnalysisModule}
      */
+    @Deprecated
     void registerStateSystem(String id, ITmfStateSystem ss);
 
     /**
@@ -247,13 +255,14 @@ public interface ITmfTrace extends ITmfDataProvider {
     IAnalysisModule getAnalysisModule(String analysisId);
 
     /**
-     * Return a list of analysis modules that are of a given class
+     * Return a map of analysis modules that are of a given class. Module are
+     * already casted to the requested class
      *
      * @param moduleclass
      *            Class returned module must extend
-     * @return List of {@link IAnalysisModule} of class moduleclass
+     * @return List of modules of class moduleclass
      */
-    List<IAnalysisModule> getAnalysisModules(Class<? extends IAnalysisModule> moduleclass);
+    <T> Map<String, T> getAnalysisModules(Class<T> moduleclass);
 
     /**
      * Returns a map of analysis modules applicable to this trace. The key is
This page took 0.024832 seconds and 5 git commands to generate.