tmf/ctf: Make CtfLocationInfo inline with code style
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfTmfEventType.java
CommitLineData
b1baa808
MK
1/*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
ce2388e0
FC
12package org.eclipse.linuxtools.tmf.core.ctfadaptor;
13
14import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
15import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
aa572e22 16import org.eclipse.linuxtools.tmf.core.event.TmfEventTypeManager;
ce2388e0 17
b1baa808 18/**
063f0d27
AM
19 * The CTF extension of the TMF event type
20 *
d09f973b
FC
21 * @version 1.0
22 * @author Matthew khouzam
b1baa808 23 */
ce2388e0
FC
24public class CtfTmfEventType extends TmfEventType {
25
aa572e22 26 private static final String CONTEXT_ID = "Ctf Event"; //$NON-NLS-1$
063f0d27 27
b1baa808
MK
28 /**
29 * Constructor for CtfTmfEventType.
063f0d27
AM
30 *
31 * @param eventName
32 * String
33 * @param content
34 * ITmfEventField
b1baa808 35 */
e30ce12e 36 public CtfTmfEventType(String eventName, ITmfEventField content) {
aa572e22 37 super(CONTEXT_ID, eventName, content);
ce2388e0
FC
38 }
39
b1baa808
MK
40 /**
41 * Method toString.
063f0d27 42 *
b1baa808
MK
43 * @return String
44 */
ce2388e0 45 @Override
e30ce12e 46 public String toString() {
ce2388e0
FC
47 return this.getName();
48 }
aa572e22 49
9ac2eb62
MK
50 /**
51 * gets the event type for an event name
063f0d27
AM
52 *
53 * @param eventName
54 * the event name
9ac2eb62
MK
55 * @return the event type
56 */
aa572e22
MK
57 public static CtfTmfEventType get(String eventName){
58 return (CtfTmfEventType) TmfEventTypeManager.getInstance().getType(CONTEXT_ID, eventName);
59 }
ce2388e0 60}
This page took 0.041655 seconds and 5 git commands to generate.