jlibs.core.lang
Class ClassUtil
java.lang.Object
jlibs.core.lang.ClassUtil
public class ClassUtil
- extends Object
- Author:
- Santhosh Kumar T
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassUtil
public ClassUtil()
getClassPath
public static String getClassPath(Class clazz)
- Returns the classpath resource(directory or jar) from which
specified class is loaded.
- Parameters:
clazz - class
- Returns:
- resource from which the class is loaded
getClassLoader
public static ClassLoader getClassLoader(Class clazz)
- Returns the classloader for the speficied
clazz. Unlike
Class.getClassLoader() this will never return null.
unbox
public static Class unbox(Class clazz)
isPrimitiveWrapper
public static boolean isPrimitiveWrapper(Class clazz)
box
public static Class box(Class clazz)
getPrimitiveType
public static Class getPrimitiveType(String className)
getClassingClass
public static Class getClassingClass(int offset)
- returns the calling class.
offset 0 returns class who is calling this method
offset 1 returns class who called your method
and so on
getClassingClass
public static Class getClassingClass()
getClassingClassLoader
public static ClassLoader getClassingClassLoader()
Copyright © 2018. All rights reserved.