1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.ctf
.core
.event
.metadata
.tsdl
.integer
;
12 import org
.antlr
.runtime
.tree
.CommonTree
;
13 import org
.eclipse
.jdt
.annotation
.NonNull
;
14 import org
.eclipse
.tracecompass
.internal
.ctf
.core
.event
.metadata
.ICommonTreeParser
;
17 * A reference to the clock map in a given integer.
19 * @author Matthew Khouzam
22 public final class ClockMapParser
implements ICommonTreeParser
{
24 private static final @NonNull String EMPTY_STRING
= ""; //$NON-NLS-1$
29 public static final ClockMapParser INSTANCE
= new ClockMapParser();
31 private ClockMapParser() {
35 public String
parse(CommonTree tree
, ICommonTreeParserParameter param
) {
36 String clock
= tree
.getChild(1).getChild(0).getChild(0).getText();
37 return clock
== null ? EMPTY_STRING
: clock
;