Here you can find the source of shorten(String className)
static String shorten(String className)
//package com.java2s; //License from project: Apache License public class Main { static String shorten(String className) { String[] split = className.split("\\."); StringBuilder sb = new StringBuilder(); sb.append(split[split.length - 1]); return sb.toString(); }//w w w. j av a 2 s . c o m }