1 /**********************************************************************
2 * Copyright (c) 2012 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 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
;
14 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.IProbeEventInfo
;
17 * <b><u>ProbleEventInfo</u></b>
19 * Implementation of the trace event interface (IProbeEventInfo) to store probe event
23 public class ProbeEventInfo
extends EventInfo
implements IProbeEventInfo
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 * The dynamic probe address (null if symbol is used).
31 private String fAddress
;
33 * The dynamic probe offset (if symbol is used).
35 private String fOffset
;
38 * The symbol name (null if address is used)
40 private String fSymbol
;
43 // ------------------------------------------------------------------------
45 // ------------------------------------------------------------------------
48 * @param name - name of event
50 public ProbeEventInfo(String name
) {
56 * @param other - the instance to copy
58 public ProbeEventInfo(ProbeEventInfo other
) {
60 fAddress
= other
.fAddress
;
61 fOffset
= other
.fOffset
;
62 fSymbol
= other
.fSymbol
;
65 // ------------------------------------------------------------------------
67 // ------------------------------------------------------------------------
71 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getAddress()
74 public String
getAddress() {
80 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setAddress(java.lang.String)
83 public void setAddress(String address
) {
89 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getOffset()
92 public String
getOffset() {
98 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setOffset(java.lang.String)
101 public void setOffset(String offset
) {
107 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getSymbol()
110 public String
getSymbol() {
116 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setSymbol(java.lang.String)
119 public void setSymbol(String symbol
) {
123 // ------------------------------------------------------------------------
125 // ------------------------------------------------------------------------
129 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#hashCode()
132 public int hashCode() {
133 final int prime
= 31;
134 int result
= super.hashCode();
135 result
= prime
* result
+ ((fAddress
== null) ?
0 : fAddress
.hashCode());
136 result
= prime
* result
+ ((fOffset
== null) ?
0 : fOffset
.hashCode());
137 result
= prime
* result
+ ((fSymbol
== null) ?
0 : fSymbol
.hashCode());
143 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#equals(java.lang.Object)
146 public boolean equals(Object obj
) {
150 if (!super.equals(obj
)) {
153 if (getClass() != obj
.getClass()) {
156 ProbeEventInfo other
= (ProbeEventInfo
) obj
;
157 if (fAddress
== null) {
158 if (other
.fAddress
!= null) {
161 } else if (!fAddress
.equals(other
.fAddress
)) {
164 if (fOffset
== null) {
165 if (other
.fOffset
!= null) {
168 } else if (!fOffset
.equals(other
.fOffset
)) {
171 if (fSymbol
== null) {
172 if (other
.fSymbol
!= null) {
175 } else if (!fSymbol
.equals(other
.fSymbol
)) {
184 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.EventInfo#toString()
186 @SuppressWarnings("nls")
188 public String
toString() {
189 StringBuffer output
= new StringBuffer();
190 output
.append("[ProbeEventInfo(");
191 output
.append(super.toString());
192 if (fAddress
!= null) {
193 output
.append(",fAddress=");
194 output
.append(fAddress
);
196 output
.append(",fOffset=");
197 output
.append(fOffset
);
198 output
.append(",fSymbol=");
199 output
.append(fSymbol
);
202 return output
.toString();
This page took 0.037464 seconds and 5 git commands to generate.