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
.tracecompass
.tmf
.core
.trace
.text
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEventType
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.event
.TmfEvent
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfContext
;
22 * Class to store the common functionality of text trace events.
24 * @author Alexandre Montplaisir
26 public abstract class TextTraceEvent
extends TmfEvent
{
31 * Compared to {@link TmfEvent}'s constructor, 'content' is restricted to a
32 * {@link TextTraceEventContent}.
41 * The event content (payload)
43 public TextTraceEvent(TextTrace
<?
extends TextTraceEvent
> parentTrace
,
44 final ITmfTimestamp timestamp
,
45 final ITmfEventType type
,
46 final TextTraceEventContent content
) {
47 super(parentTrace
, ITmfContext
.UNKNOWN_RANK
, timestamp
, type
, content
);
56 public TextTraceEvent(final @NonNull TextTraceEvent other
) {
61 public TextTrace
<?
extends TextTraceEvent
> getTrace() {
62 /* Cast should be safe, type is restricted by the constructor */
63 return (TextTrace
<?
>) super.getTrace();
67 public TextTraceEventContent
getContent() {
68 /* Cast should be safe, type is restricted by the constructor */
69 return (TextTraceEventContent
) super.getContent();