1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
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
10 * William Bourque (wbourque@gmail.com) - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.core
.event
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEventContent
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEventField
;
19 * <b><u>LttngEventField</u></b><p>
21 * Lttng specific implementation of the TmfEventField.<p>
23 * LttngEventField add a "name" attribute to the Tmf implementation This
24 * mean the fields will have a name and a value.
26 public class LttngEventField
extends TmfEventField
{
29 * Constructor with parameters.<p>
31 * @param parent Parent content for this field
32 * @param id Name (label) of this field
34 public LttngEventField(TmfEventContent parent
, String id
) {
35 super(parent
, id
, null);
39 * Constructor with parameters with optional value.<p>
41 * @param parent Parent content for this field
42 * @param id Name (label) of this field
43 * @param value Parsed value (payload) of this field
45 public LttngEventField(TmfEventContent parent
, String id
, Object value
) {
46 super(parent
, id
, value
);
50 * Copy constructor.<p>
52 * @param oldField the field to copy from
54 public LttngEventField(LttngEventField oldField
) {
55 this(oldField
.getParent(), oldField
.getId(), oldField
.getValue());
59 @SuppressWarnings("nls")
60 public String
toString() {
61 Object value
= getValue();
62 return getId() + ":" + ((value
!= null) ? value
.toString() : "null");
66 public LttngEventField
clone() {
67 LttngEventField clone
= (LttngEventField
) super.clone();
68 clone
.fValue
= fValue
;
This page took 0.036899 seconds and 5 git commands to generate.