Here you can find the source of stackTraceElementToString( StackTraceElement element)
private static String stackTraceElementToString( StackTraceElement element)
//package com.java2s; /*/*from ww w .ja va2 s . com*/ * Smart GWT (GWT for SmartClient) * Copyright 2014 and beyond, Isomorphic Software, Inc. * * Smart GWT is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3 * is published by the Free Software Foundation. Smart GWT is also * available under typical commercial license terms - see * http://smartclient.com/license * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ public class Main { private static final String UNKNOWN = "Unknown"; private static String stackTraceElementToString( StackTraceElement element) { String methodName = element.getMethodName(); if (methodName == null || UNKNOWN.equals(methodName)) return null; String frame = " at "; String className = element.getClassName(); if (className != null && !UNKNOWN.equals(className)) frame += className + "."; frame += methodName + "("; String fileName = element.getFileName(); if (fileName != null && !UNKNOWN.equals(fileName)) { frame += fileName; int lineNumber = element.getLineNumber(); if (lineNumber >= 0) frame += ":" + lineNumber; } frame += ")"; return frame; } }