Here you can find the source of className(final Object object)
Parameter | Description |
---|---|
object | object |
public static String className(final Object object)
//package com.java2s; /**/*from w w w. j a v a2s .c o m*/ * This class contains static methods, which are used throughout the project. * The methods are used for dumping error output, debugging information, * getting the application path, etc. * * @author BaseX Team 2005-17, BSD License * @author Christian Gruen */ public class Main { /** * Returns the class name of the specified object, excluding its path. * @param object object * @return class name */ public static String className(final Object object) { return className(object.getClass()); } /** * Returns the name of the specified class, excluding its path. * @param clazz class * @return class name */ public static String className(final Class<?> clazz) { return clazz.getSimpleName(); } }