btf: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.btf.core / src / org / eclipse / linuxtools / btf / core / analysis / BtfAnalysisModule.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.btf.core.analysis;
14
15 import org.eclipse.linuxtools.btf.core.trace.BtfTrace;
16 import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
17 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
18 import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
19 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
20
21 /**
22 * Analysis module for the BTF base analysis
23 *
24 * @author Alexandre Montplaisir
25 */
26 public class BtfAnalysisModule extends TmfStateSystemAnalysisModule {
27
28 @Override
29 public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
30 if (!(trace instanceof BtfTrace)) {
31 throw new IllegalArgumentException("BtfAnalysisModule: trace should be of type BtfTrace"); //$NON-NLS-1$
32 }
33 super.setTrace(trace);
34 }
35
36 @Override
37 protected BtfTrace getTrace() {
38 return (BtfTrace) super.getTrace();
39 }
40
41 @Override
42 protected ITmfStateProvider createStateProvider() {
43 return new BtfStateProvider(getTrace());
44 }
45 }
This page took 0.039495 seconds and 5 git commands to generate.