1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are made
5 * 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 * Matthew Khouzam - Initial API and implementation
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.ctf
.core
.event
;
16 import java
.util
.Objects
;
18 import org
.eclipse
.jdt
.annotation
.NonNullByDefault
;
19 import org
.eclipse
.jdt
.annotation
.Nullable
;
22 * Callsite information to help with cdt integration
24 * @author Matthew Khouzam
28 public class CTFCallsite
{
32 private final String fEventName
;
35 * the file name of the callsite
37 private final String fFileName
;
40 * the instruction pointer
42 private final long fIp
;
47 private final String fFunctionName
;
50 * the line number of the callsite
52 private final long fLineNumber
;
55 * The callsite constructor
62 * the instruction pointer of the callsite
64 * the file name of the callsite
66 * the line number of the callsite
68 public CTFCallsite(String en
, String func
, long ip
, String fn
, long line
) {
77 * @return the eventName
79 public String
getEventName() {
84 * @return the fileName
86 public String
getFileName() {
98 * @return the functionName
100 public String
getFunctionName() {
101 return fFunctionName
;
105 * @return the lineNumber
107 public long getLineNumber() {
112 public int hashCode() {
113 return Objects
.hash(fEventName
, fFileName
, fIp
, fFunctionName
, fLineNumber
);
117 public boolean equals(@Nullable Object obj
) {
124 if (getClass() != obj
.getClass()) {
127 CTFCallsite other
= (CTFCallsite
) obj
;
128 if (!fEventName
.equals(other
.fEventName
)) {
131 if (!fFileName
.equals(other
.fFileName
)) {
134 if (!fFunctionName
.equals(other
.fFunctionName
)) {
137 if (fIp
!= other
.fIp
) {
140 if (fLineNumber
!= other
.fLineNumber
) {
147 public String
toString() {
148 return fFileName
+ "/" + fFunctionName
+ ":" + fLineNumber
; //$NON-NLS-1$ //$NON-NLS-2$
This page took 0.049831 seconds and 5 git commands to generate.