(no commit message)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng / src / org / eclipse / linuxtools / lttng / event / LttngEventReference.java
CommitLineData
5d10d135
ASL
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
13package org.eclipse.linuxtools.lttng.event;
14
15import org.eclipse.linuxtools.tmf.event.*;
16
17/**
18 * <b><u>LttngEventReference</u></b><p>
19 *
20 * Lttng specific implementation of the TmfEventReference
21 */
22public class LttngEventReference extends TmfEventReference {
23
24 private String tracename = "";
25
26 /**
27 * Constructor with parameters.<p>
28 *
29 * @param newTraceName Trace name
30 */
31 public LttngEventReference(String newTraceName) {
32 super("");
33 tracename = newTraceName;
34 }
35
36 /**
37 * Constructor with parameters with optional tracefile path.<p>
38 *
39 * @param newTracefilePath Complete tracefile path
40 * @param newTraceName Trace name
41 */
42 public LttngEventReference(String newTracefilePath, String newTraceName) {
43 super(newTracefilePath);
44
45 // Save the name of the trace
46 tracename = newTraceName;
47 }
48
49 /**
50 * Copy Constructor.<p>
51 *
52 * @param oldReference LttngEventReference to copy from.
53 */
54 public LttngEventReference(LttngEventReference oldReference) {
55 this( oldReference.getValue().toString(), oldReference.getTracepath() );
56 }
57
58
59 public String getTracepath() {
60 return tracename;
61 }
62
63 public void setTracepath(String tracename) {
64 this.tracename = tracename;
65 }
66
67 public String getValue() {
68 return (String)fReference;
69 }
70
71 public void setValue(String newReference) {
72 fReference = newReference;
73 }
74
75 /**
76 * toString() method.<p>
77 *
78 * We return only tracename, as it will be used directly in the eventsView.
79 * Returning only tracename gives a better output.
80 *
81 * @return tracename as String
82 */
83 @Override
84 public String toString() {
85 return tracename;
86 }
87
88}
This page took 0.044264 seconds and 5 git commands to generate.