import org.eclipse.tracecompass.internal.statesystem.core.AttributeTree;
import org.eclipse.tracecompass.internal.statesystem.core.StateSystem;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.backend.StateHistoryBackendFactory;
import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
* @param ss
* The real state system
*/
- public void assignUpstream(StateSystem ss) {
- realStateSystem = ss;
+ public void assignUpstream(ITmfStateSystemBuilder ss) {
+ if (!(ss instanceof StateSystem)) {
+ throw new IllegalArgumentException("Partial state system's upstream state system should be of class StateSystem. This one is " + ss.getClass()); //$NON-NLS-1$
+ }
+ realStateSystem = (StateSystem) ss;
ssAssignedLatch.countDown();
}
IStateHistoryBackend partialBackend = new PartialHistoryBackend(id + ".partial", partialProvider, pss, realBackend, granularity); //$NON-NLS-1$
/* 4 */
- @SuppressWarnings("restriction")
- org.eclipse.tracecompass.internal.statesystem.core.StateSystem realSS =
- (org.eclipse.tracecompass.internal.statesystem.core.StateSystem) StateSystemFactory.newStateSystem(partialBackend);
+ ITmfStateSystemBuilder realSS = StateSystemFactory.newStateSystem(partialBackend);
/* 5 */
pss.assignUpstream(realSS);