tmf: Make the TmfAbstractAnalysisModule#getTrace public
[deliverable/tracecompass.git] / btf / org.eclipse.tracecompass.btf.core / src / org / eclipse / tracecompass / btf / core / analysis / BtfAnalysisModule.java
CommitLineData
ff71e543
MK
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
7ce90559 13package org.eclipse.tracecompass.btf.core.analysis;
ff71e543 14
e66d73d3
BH
15import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
16
7ce90559 17import org.eclipse.tracecompass.btf.core.trace.BtfTrace;
2bdf0193
AM
18import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
19import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
20import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
21import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
ff71e543
MK
22
23/**
24 * Analysis module for the BTF base analysis
25 *
26 * @author Alexandre Montplaisir
27 */
28public class BtfAnalysisModule extends TmfStateSystemAnalysisModule {
29
30 @Override
f479550c 31 public boolean setTrace(ITmfTrace trace) throws TmfAnalysisException {
ff71e543 32 if (!(trace instanceof BtfTrace)) {
f479550c 33 return false;
ff71e543 34 }
f479550c 35 return super.setTrace(trace);
ff71e543
MK
36 }
37
425af011
MK
38 /**
39 * @since 2.1
40 */
ff71e543 41 @Override
425af011 42 public BtfTrace getTrace() {
ff71e543
MK
43 return (BtfTrace) super.getTrace();
44 }
45
46 @Override
47 protected ITmfStateProvider createStateProvider() {
e66d73d3 48 return new BtfStateProvider(checkNotNull(getTrace()));
ff71e543
MK
49 }
50}
This page took 0.0583 seconds and 5 git commands to generate.