btf: fix sonar warning about null safety
[deliverable/tracecompass.git] / btf / org.eclipse.tracecompass.btf.core / src / org / eclipse / tracecompass / 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.tracecompass.btf.core.analysis;
14
15 import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
16
17 import org.eclipse.tracecompass.btf.core.trace.BtfTrace;
18 import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
19 import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
20 import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
21 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
22
23 /**
24 * Analysis module for the BTF base analysis
25 *
26 * @author Alexandre Montplaisir
27 */
28 public class BtfAnalysisModule extends TmfStateSystemAnalysisModule {
29
30 @Override
31 public boolean setTrace(ITmfTrace trace) throws TmfAnalysisException {
32 if (!(trace instanceof BtfTrace)) {
33 return false;
34 }
35 return super.setTrace(trace);
36 }
37
38 @Override
39 protected BtfTrace getTrace() {
40 return (BtfTrace) super.getTrace();
41 }
42
43 @Override
44 protected ITmfStateProvider createStateProvider() {
45 return new BtfStateProvider(checkNotNull(getTrace()));
46 }
47 }
This page took 0.030119 seconds and 5 git commands to generate.