1 /*******************************************************************************
2 * Copyright (c) 2011, 2014 Ericsson, Ecole Polytechnique de Montreal and others
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
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
12 package org
.eclipse
.tracecompass
.ctf
.core
.event
.types
;
14 import org
.eclipse
.jdt
.annotation
.NonNull
;
15 import org
.eclipse
.tracecompass
.ctf
.core
.event
.scope
.IDefinitionScope
;
18 * Simple Datatype definition is a datatype that allows the addition of
19 * getIntegerValue and getStringValue to a class.
21 * @author Matthew Khouzam
24 public abstract class SimpleDatatypeDefinition
extends Definition
{
27 * Create a new SimpleDatatypeDefinition
30 * definition's declaration
31 * @param definitionScope
32 * The scope of this definition
34 * The name of the field matching this definition in the parent
38 public SimpleDatatypeDefinition(@NonNull IDeclaration declaration
, IDefinitionScope definitionScope
,
39 @NonNull String fieldName
) {
40 super(declaration
, definitionScope
, fieldName
);
44 * Gets the value in integer form
46 * @return the integer in a Long, can be null
48 public Long
getIntegerValue() {
53 * Gets the value in string form
55 * @return the integer in a String, can be null
57 public String
getStringValue() {