Re-structure LTTng sub-project as per the Linux Tools guidelines
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / stubs / org / eclipse / linuxtools / tmf / stubs / event / TmfEventContentStub.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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.stubs.event;
14
15 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
16 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
17 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
18
19 /**
20 * <b><u>TmfEventContentStub</u></b>
21 * <p>
22 * TODO: Implement me. Please.
23 */
24 @SuppressWarnings("nls")
25 public class TmfEventContentStub extends TmfEventContent {
26
27 public TmfEventContentStub(TmfEvent parent, Object content) {
28 super(parent, content);
29 }
30
31 public TmfEventContentStub(TmfEventContentStub other) {
32 super(other);
33 }
34
35 @Override
36 protected void parseContent() {
37 Object field1 = new Integer(1);
38 Object field2 = new Integer(-10);
39 Object field3 = new Boolean(true);
40 Object field4 = new String("some string");
41 Object field5 = new TmfTimestamp(1, (byte) 2, 3);
42 fFields = new Object[] { field1, field2, field3, field4, field5 };
43 }
44
45 @Override
46 public TmfEventContent clone() {
47 TmfEventContentStub content = new TmfEventContentStub(this);
48 content.fRawContent = "Some content";
49 content.fFields = null;
50 return content;
51 }
52
53 // @Override
54 // public String toString() {
55 // Object[] fields = getFields();
56 // StringBuilder result = new StringBuilder("[TmfEventContent(");
57 // for (int i = 0; i < fields.length; i++) {
58 // if (i > 0) result.append(",");
59 // result.append(fields[i]);
60 // }
61 // result.append(")]");
62 // return result.toString();
63 // }
64 }
This page took 0.03224 seconds and 5 git commands to generate.