Here you can find the source of simpleClassName(Object o)
public static String simpleClassName(Object o)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w . ja v a 2 s . c o m * The shortcut to {@link #simpleClassName(Class) * simpleClassName(o.getClass())}. */ public static String simpleClassName(Object o) { return simpleClassName(o.getClass()); } /** * Generates a simplified name from a {@link Class}. Similar to * {@link Class#getSimpleName()}, but it works fine with anonymous classes. */ public static String simpleClassName(Class<?> clazz) { Package pkg = clazz.getPackage(); if (pkg != null) { return clazz.getName().substring(pkg.getName().length() + 1); } else { return clazz.getName(); } } }