Here you can find the source of extractFileName(StackTraceElement aFrame)
private static String extractFileName(StackTraceElement aFrame)
//package com.java2s; //License from project: Apache License public class Main { private static String extractFileName(StackTraceElement aFrame) { String fileName = aFrame.getFileName(); if (fileName != null) { int atIndex = fileName.indexOf("@"); if (atIndex != -1) { fileName = fileName.substring(0, atIndex); }//from w w w. ja v a2s . c om return fileName; } else { return null; } } }