Here you can find the source of simpleClassName(Class klass)
public static String simpleClassName(Class klass)
//package com.java2s; /*//from w w w . j a v a2 s. co m * Copyright 2001-2013 Geert Bevin (gbevin[remove] at uwyn dot com) * Licensed under the Apache License, Version 2.0 (the "License") */ public class Main { public static String simpleClassName(Class klass) { String class_name = klass.getName(); if (klass.getPackage() != null) { class_name = class_name.substring(klass.getPackage().getName().length() + 1); } return class_name; } }