Here you can find the source of stackTraceElementWithLinenumberAsString(StackTraceElement stackTraceElement)
public static String stackTraceElementWithLinenumberAsString(StackTraceElement stackTraceElement)
//package com.java2s; public class Main { /**// ww w .ja va 2 s . c o m * for the string representation of calling code. */ public static final String LINE_NUMBER_SEPARATOR = "#"; public static String stackTraceElementWithLinenumberAsString(StackTraceElement stackTraceElement) { if (null != stackTraceElement) { return stackTraceElement.getClassName() + LINE_NUMBER_SEPARATOR + stackTraceElement.getLineNumber(); } else { return "Internal ERROR stackTraceElement should not be null"; } } }