1 /*******************************************************************************
2 * Copyright (c) 2011-2012 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 * Contributors: Simon Marchi - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.ctf
.core
.event
.types
;
16 * <b><u>StringDeclaration</u></b>
18 public class StringDeclaration
implements IDeclaration
{
20 // ------------------------------------------------------------------------
22 // ------------------------------------------------------------------------
24 private Encoding encoding
= Encoding
.UTF8
;
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 public Encoding
getEncoding() {
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
38 public StringDeclaration() {
41 public StringDeclaration(Encoding encoding
) {
42 this.encoding
= encoding
;
45 // ------------------------------------------------------------------------
46 // Getters/Setters/Predicates
47 // ------------------------------------------------------------------------
49 public void setEncoding(Encoding encoding
) {
50 this.encoding
= encoding
;
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
58 public StringDefinition
createDefinition(IDefinitionScope definitionScope
,
60 return new StringDefinition(this, definitionScope
, fieldName
);
64 public String
toString() {
65 /* Only used for debugging */
66 return "[declaration] string[" + Integer
.toHexString(hashCode()) + ']'; //$NON-NLS-1$