fc.util
Class ClassUtil
java.lang.Object
fc.util.ClassUtil
public class ClassUtil
- extends Object
ClassUtil
public ClassUtil()
getClassLoaderInfo
public static String getClassLoaderInfo(Object obj)
- Returns classloader information about the specified object
getClassLoaderInfo
public static String getClassLoaderInfo(Class c)
- Returns classloader information about the specified class.
getClassName
public static String getClassName()
- This method can be called from a static method and
returns the class name in which the calling static method
was declared.
Important note: The returned class name is the name
where the static method was declared, NOT the runtime class
since static methods are not virtual.
For example:
Class A
{
static void foo(...) {
System.out.print(ClassUtil.getClassName());
}
}
public class B extends A
{
}
% java B
will print A [NOT B]
main
public static void main(String[] args)