22a25bc2d6982531c12c1879f9134fa734d6bf0d
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.ust.core / src / org / eclipse / tracecompass / lttng2 / ust / core / analysis / debuginfo / SourceCallsite.java
1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9
10 package org.eclipse.tracecompass.lttng2.ust.core.analysis.debuginfo;
11
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.eclipse.tracecompass.tmf.core.event.lookup.TmfCallsite;
14
15 /**
16 * Extension of {@link TmfCallsite} specifically for the debug-info analysis,
17 * which will not print the function name in the event table. This name will be
18 * available by a separate aspect.
19 *
20 * @author Alexandre Montplaisir
21 * @since 2.0
22 */
23 public class SourceCallsite extends TmfCallsite {
24
25 /**
26 * Constructor
27 *
28 * @param fileName
29 * File name
30 * @param functionName
31 * Function name
32 * @param lineNumber
33 * Line number
34 */
35 public SourceCallsite(String fileName, @Nullable String functionName, long lineNumber) {
36 super(fileName, functionName, lineNumber);
37 }
38
39 @Override
40 public String toString() {
41 StringBuilder builder = new StringBuilder();
42 builder.append(getFileName()).append(':');
43 builder.append(Long.toString(getLineNumber()));
44 return builder.toString();
45 }
46
47 }
This page took 0.031231 seconds and 4 git commands to generate.