control: partly revert commit 0e7ea8ac and use clone in handlers
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / handlers / CommandParameter.java
CommitLineData
c56972bb 1/**********************************************************************
68d1057b 2 * Copyright (c) 2012, 2015 Ericsson
11252342 3 *
c56972bb
BH
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
11252342
AM
8 *
9 * Contributors:
c56972bb
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
9bc60be7 12package org.eclipse.tracecompass.internal.lttng2.control.ui.views.handlers;
c56972bb 13
68d1057b 14import org.eclipse.jdt.annotation.NonNullByDefault;
9bc60be7 15import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
c56972bb
BH
16
17/**
dbd4432d 18 * Class containing parameter for the command execution.
11252342
AM
19 *
20 * @author Bernd Hufmann
c56972bb 21 */
68d1057b 22@NonNullByDefault
b8dbc09c 23public class CommandParameter implements Cloneable {
c56972bb
BH
24
25 // ------------------------------------------------------------------------
26 // Attributes
27 // ------------------------------------------------------------------------
28
29 /**
30 * The trace session component.
31 */
32 private TraceSessionComponent fSession;
33
34 // ------------------------------------------------------------------------
35 // Constructors
36 // ------------------------------------------------------------------------
37
38 /**
11252342 39 * Constructor
c56972bb
BH
40 * @param session a trace session component.
41 */
42 public CommandParameter(TraceSessionComponent session) {
43 fSession = session;
44 }
45
46 // ------------------------------------------------------------------------
47 // Accessors
48 // ------------------------------------------------------------------------
49
50 /**
51 * @return the session component.
52 */
53 public TraceSessionComponent getSession() {
54 return fSession;
55 }
b8dbc09c
BH
56
57 // ------------------------------------------------------------------------
58 // Cloneable interface
59 // ------------------------------------------------------------------------
60 @Override
61 protected CommandParameter clone() {
62 CommandParameter clone;
63 try {
64 clone = (CommandParameter) super.clone();
65 clone.fSession = fSession;
66 } catch (CloneNotSupportedException e) {
67 throw new RuntimeException();
68 }
69 return clone;
70 }
c56972bb 71}
This page took 0.075504 seconds and 5 git commands to generate.