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 * Vincent Perot - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.tmf
.pcap
.core
.event
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.jdt
.annotation
.Nullable
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEventField
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEventType
;
21 * Class that represents the type of a PcapEvent.
23 * @author Vincent Perot
25 public class PcapEventType
extends TmfEventType
{
27 private static final String EMPTY_STRING
= ""; //$NON-NLS-1$
30 * The default Context ID for a PcapEvent
32 @SuppressWarnings("null")
33 public static final @NonNull String DEFAULT_PCAP_CONTEXT_ID
= Messages
.PcapEventType_DefaultContext
== null ? EMPTY_STRING
: Messages
.PcapEventType_DefaultContext
;
36 * The default Pcap Type ID for a PcapEvent
38 @SuppressWarnings("null")
39 public static final @NonNull String DEFAULT_PCAP_TYPE_ID
= Messages
.PcapEventType_DefaultTypeID
== null ? EMPTY_STRING
: Messages
.PcapEventType_DefaultTypeID
;
44 public PcapEventType() {
45 this(DEFAULT_PCAP_TYPE_ID
, null);
56 public PcapEventType(final String typeId
, final @Nullable ITmfEventField root
) {
57 super(DEFAULT_PCAP_CONTEXT_ID
, typeId
, root
);
66 public PcapEventType(final PcapEventType type
) {
71 public @Nullable String
toString() {