Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { @SuppressWarnings("rawtypes") public static String getObjShortClassName(Object object) { Class clazz = object.getClass(); return clazz.getName().substring(clazz.getName().lastIndexOf(".") + 1); } }