Here you can find the source of simpleClassName(Object object)
public static String simpleClassName(Object object)
//package com.java2s; //License from project: Apache License public class Main { public static String simpleClassName(Object object) { if (object == null) { return "null_object"; }/*from ww w. j av a 2 s . co m*/ Class clazz = object.getClass(); Package pkg = clazz.getPackage(); if (pkg != null) { return clazz.getName().substring(pkg.getName().length() + 1); } else { return clazz.getName(); } } }