1 /*******************************************************************************
2 * Copyright (c) 2014 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 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.trace
.text
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEventType
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
20 * Class to store the common functionality of text trace events.
22 * @author Alexandre Montplaisir
25 public abstract class TextTraceEvent
extends TmfEvent
{
30 * Compared to {@link TmfEvent}'s constructor, 'content' is restricted to a
31 * {@link TextTraceEventContent}.
42 * The event content (payload)
46 public TextTraceEvent(TextTrace
<?
extends TextTraceEvent
> parentTrace
,
47 final ITmfTimestamp timestamp
,
49 final ITmfEventType type
,
50 final TextTraceEventContent content
,
51 final String reference
) {
52 super(parentTrace
, timestamp
, source
, type
, content
, reference
);
61 public TextTraceEvent(final TextTraceEvent other
) {
66 public TextTrace
<?
extends TextTraceEvent
> getTrace() {
67 /* Cast should be safe, type is restricted by the constructor */
68 return (TextTrace
<?
>) super.getTrace();
72 public TextTraceEventContent
getContent() {
73 /* Cast should be safe, type is restricted by the constructor */
74 return (TextTraceEventContent
) super.getContent();