Here you can find the source of shortenClassName(Class klass)
public static String shortenClassName(Class klass)
//package com.java2s; /*/*from ww w. j a v a 2 s. c om*/ * 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 shortenClassName(Class klass) { return simpleClassName(klass).replace('$', '_').toLowerCase(); } 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; } }