Java Class Name Get className(Object value)

Here you can find the source of className(Object value)

Description

Returns the type name of the given value

License

Apache License

Declaration

public static String className(Object value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from ww  w.  j a v  a2 s .co  m
     * Returns the type name of the given value
     */
    public static String className(Object value) {
        return name(value != null ? value.getClass() : null);
    }

    /**
     * Returns the type name of the given type or null if the type variable is
     * null
     */
    public static String name(Class<?> type) {
        return type != null ? type.getName() : null;
    }
}

Related

  1. className(Object o)
  2. className(Object o)
  3. classname(Object obj)
  4. className(Object obj)
  5. className(Object object)
  6. className(String classFile, String pre)
  7. className(String classFullName)
  8. className(String fullyQualifiedName)
  9. className(String nodeName)