Commit | Line | Data |
---|---|---|
c56972bb BH |
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.TraceSessionComponent; | |
15 | ||
16 | /** | |
dbd4432d BH |
17 | * Class containing parameter for the command execution. |
18 | * | |
19 | * @author Bernd Hufmann | |
c56972bb BH |
20 | */ |
21 | public class CommandParameter implements Cloneable { | |
22 | ||
23 | // ------------------------------------------------------------------------ | |
24 | // Attributes | |
25 | // ------------------------------------------------------------------------ | |
26 | ||
27 | /** | |
28 | * The trace session component. | |
29 | */ | |
30 | private TraceSessionComponent fSession; | |
31 | ||
32 | // ------------------------------------------------------------------------ | |
33 | // Constructors | |
34 | // ------------------------------------------------------------------------ | |
35 | ||
36 | /** | |
37 | * Constructor | |
38 | * @param session a trace session component. | |
39 | */ | |
40 | public CommandParameter(TraceSessionComponent session) { | |
41 | fSession = session; | |
42 | } | |
43 | ||
44 | // ------------------------------------------------------------------------ | |
45 | // Accessors | |
46 | // ------------------------------------------------------------------------ | |
47 | ||
48 | /** | |
49 | * @return the session component. | |
50 | */ | |
51 | public TraceSessionComponent getSession() { | |
52 | return fSession; | |
53 | } | |
54 | ||
55 | // ------------------------------------------------------------------------ | |
56 | // Operations | |
57 | // ------------------------------------------------------------------------ | |
58 | ||
59 | /* | |
60 | * (non-Javadoc) | |
61 | * @see java.lang.Object#clone() | |
62 | */ | |
63 | @Override | |
64 | public CommandParameter clone() { | |
65 | CommandParameter clone = null; | |
66 | try { | |
67 | clone = (CommandParameter) super.clone(); | |
68 | clone.fSession = fSession; | |
69 | } catch (CloneNotSupportedException e) { | |
70 | } | |
71 | return clone; | |
72 | } | |
73 | } |