All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zusmart.basic.toolkit.ClassUtils Maven / Gradle / Ivy

Go to download

基础模块,提供配置,日志,SPI,图排序,路径匹配,资源扫描,包扫描,常用工具类

There is a newer version: 0.0.3
Show newest version
package com.zusmart.basic.toolkit;

public final class ClassUtils {
	
	public static ClassLoader getClassLoader(Class clazz){
		ClassLoader classLoader = null;
		try{
			classLoader = Thread.currentThread().getContextClassLoader();
		}catch(Throwable t){
			//IGNORE
		}
		if(null == classLoader){
			classLoader = clazz.getClassLoader();
			if(null == classLoader){
				try{
					classLoader = ClassLoader.getSystemClassLoader();
				}catch(Throwable tt){
					//IGNORE
				}
			}
		}
		return classLoader;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy