| 1 | /********************************************************************** |
| 2 | * Copyright (c) 2012 Ericsson |
| 3 | * |
| 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 |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Bernd Hufmann - Initial API and implementation |
| 11 | **********************************************************************/ |
| 12 | package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers; |
| 13 | |
| 14 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceEventComponent; |
| 15 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; |
| 16 | |
| 17 | /** |
| 18 | * Class containing parameter for a command execution. |
| 19 | * |
| 20 | * @author Bernd Hufmann |
| 21 | */ |
| 22 | public class EventCommandParameter extends CommandParameter { |
| 23 | |
| 24 | // ------------------------------------------------------------------------ |
| 25 | // Attributes |
| 26 | // ------------------------------------------------------------------------ |
| 27 | private TraceEventComponent fEvent; |
| 28 | |
| 29 | // ------------------------------------------------------------------------ |
| 30 | // Constructors |
| 31 | // ------------------------------------------------------------------------ |
| 32 | |
| 33 | /** |
| 34 | * Constructor |
| 35 | * @param session - a trace session component. |
| 36 | * @param event - a trace event component |
| 37 | */ |
| 38 | public EventCommandParameter(TraceSessionComponent session, TraceEventComponent event) { |
| 39 | super(session); |
| 40 | fEvent = event; |
| 41 | } |
| 42 | |
| 43 | // ------------------------------------------------------------------------ |
| 44 | // Accessors |
| 45 | // ------------------------------------------------------------------------ |
| 46 | |
| 47 | /** |
| 48 | * @return the trace event component |
| 49 | */ |
| 50 | public TraceEventComponent getEvent() { |
| 51 | return fEvent; |
| 52 | } |
| 53 | |
| 54 | // ------------------------------------------------------------------------ |
| 55 | // Operations |
| 56 | // ------------------------------------------------------------------------ |
| 57 | |
| 58 | /* |
| 59 | * (non-Javadoc) |
| 60 | * @see java.lang.Object#clone() |
| 61 | */ |
| 62 | @Override |
| 63 | public EventCommandParameter clone() { |
| 64 | EventCommandParameter clone = (EventCommandParameter) super.clone(); |
| 65 | clone.fEvent = fEvent; |
| 66 | return clone; |
| 67 | } |
| 68 | } |