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 * Jonathan Rajotte - Initial API and implementation
11 **********************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
;
16 * Trace domain type enumeration.
18 * @author Jonathan Rajotte
20 public enum TraceChannelOutputType
{
21 /** Channel output type : splice */
22 SPLICE("splice()", "SPLICE" ), //$NON-NLS-1$ //$NON-NLS-2$
23 /** Channel output type : mmap */
24 MMAP("mmap()", "MMAP"), //$NON-NLS-1$ //$NON-NLS-2$
25 /** Channel output type : unknown */
26 UNKNOWN("unknown", "unknown"); //$NON-NLS-1$ //$NON-NLS-2$
28 private final String fInName
;
29 private final String fInMiName
;
31 private TraceChannelOutputType(String name
, String miName
) {
39 * @return The type's name
41 public String
getInName() {
48 * @return The type's name
50 public String
getInMiName() {
55 * Return the corresponding {@link TraceChannelOutputType} of string miName
58 * name of the Trace domain type to look for
59 * @return the corresponding {@link TraceChannelOutputType}
61 public static TraceChannelOutputType
valueOfString(String name
) {
63 throw new IllegalArgumentException();
65 for (TraceChannelOutputType tdType
: TraceChannelOutputType
.values()) {
66 boolean isEqual
= tdType
.getInName().equalsIgnoreCase(name
) || tdType
.getInMiName().equalsIgnoreCase(name
);