982eb41a4c88ab94d3119ce36ef54cd1ed02fa0f
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / event / scope / FieldsScope.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.ctf.core.event.scope;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19 * A lttng specific speedup node field scope of a lexical scope
20 *
21 * @author Matthew Khouzam
22 */
23 @NonNullByDefault
24 public final class FieldsScope extends LexicalScope {
25
26 /**
27 * The scope constructor
28 *
29 * @param parent
30 * The parent node, can be null, but shouldn't
31 * @param name
32 * the name of the field
33 */
34 FieldsScope(ILexicalScope parent, String name) {
35 super(parent, name);
36 }
37
38 @Override
39 @Nullable
40 public ILexicalScope getChild(String name) {
41 if (name.equals(FIELDS_RET.getName())) {
42 return FIELDS_RET;
43 }
44 if (name.equals(FIELDS_TID.getName())) {
45 return FIELDS_TID;
46 }
47 return super.getChild(name);
48 }
49
50 }
This page took 0.033264 seconds and 4 git commands to generate.