- Minor modification of the FW API (better trace/parser integration)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng / src / org / eclipse / linuxtools / lttng / event / LttngEventField.java
1 /*******************************************************************************
2 * Copyright (c) 2009 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 * William Bourque (wbourque@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.lttng.event;
14
15 import org.eclipse.linuxtools.tmf.event.*;
16
17 /**
18 * <b><u>LttngEventField</u></b>
19 * <p>
20 * Lttng specific implementation of the TmfEventField
21 * <p>
22 * Lttng LttngEventField add a "Name" attribute to the Tmf implementation
23 * This mean the fields will have a name and a value.
24 */
25 public class LttngEventField extends TmfEventField
26 {
27 private String fieldName = "";
28
29 /**
30 * Constructor with parameters<br>
31 *
32 * @param newContent The parsedContent we want to populate the field with.
33 *
34 * @see org.eclipse.linuxtools.lttng.jni.ParsedContent
35 */
36 public LttngEventField(String name, Object newContent) {
37 super( newContent );
38
39 fieldName = name;
40 }
41
42 /**
43 * getter for the name attribute.
44 */
45 public String getName() {
46 return fieldName;
47 }
48
49 /**
50 * overrided toString() method.<br>
51 * <br>
52 * Print both field name and value.
53 */
54 @Override
55 public String toString() {
56 return fieldName + " : " + getValue().toString();
57 }
58 }
59
This page took 0.030706 seconds and 5 git commands to generate.