package com.xiaoleilu.hutool.demo;

import java.util.Set;

import com.xiaoleilu.hutool.ClassUtil;

/**
 * ClassUtil Demo
 * @author Looly
 *
 */
public class ClassUtilDemo {
	public static void main(String[] args) throws ClassNotFoundException {
		//获得指定包下所有类
//		Set<Class<?>> packageSet = ClassUtil.scanPackage("");
//		for (Class<?> clazz : packageSet) {
//			System.out.println(clazz);
//		}
		
		Class<?> primitive = ClassUtil.castToPrimitive(Integer.class);
		System.out.println(primitive);
	}
}

@@ -95,16 +95,93 @@
 ssUtil;%0D
+%0Aimport com.xiaoleilu.hutool.DateTime;%0D%0Aimport com.xiaoleilu.hutool.StrUtil;%0D
 %0A%0D%0A/**%0D%0A
@@ -344,18 +344,16 @@
 %E5%AE%9A%E5%8C%85%E4%B8%8B%E6%89%80%E6%9C%89%E7%B1%BB%0D%0A
-//
 %09%09Set%3CCl
@@ -400,15 +400,26 @@
 ge(%22
+com.xiaoleilu
 %22);%0D%0A
-//
 %09%09fo
@@ -453,18 +453,16 @@
 Set) %7B%0D%0A
-//
 %09%09%09Syste
@@ -484,18 +484,16 @@
 lazz);%0D%0A
-//
 %09%09%7D%0D%0A%09%09%0D
@@ -493,16 +493,33 @@
 %09%7D%0D%0A%09%09%0D%0A
+%09%09//%E8%BD%AC%E6%8D%A2%E5%8C%85%E8%A3%85%E7%B1%BB%E5%9E%8B%E4%B8%BA%E5%9F%BA%E6%9C%AC%E7%B1%BB%E5%9E%8B%0D%0A
 %09%09Class%3C
@@ -610,15 +610,527 @@
 tive);%0D%0A
+%09%09%0D%0A%09%09//%E8%8E%B7%E5%BE%97%E5%BD%93%E5%89%8D%E7%9A%84ClassLoader%0D%0A%09%09ClassLoader classLoader = ClassUtil.getClassLoader();%0D%0A%09%09System.out.println(classLoader);%0D%0A%09%09%0D%0A%09%09//%E8%8E%B7%E5%BE%97ClassPath%0D%0A%09%09Set%3CString%3E resources = ClassUtil.getClassPathResources();%0D%0A%09%09for (String resource : resources) %7B%0D%0A%09%09%09System.out.println(resource);%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%09//%E5%85%8B%E9%9A%86%E5%AF%B9%E8%B1%A1%EF%BC%88%E5%BD%93%E8%BF%99%E4%B8%AA%E5%AF%B9%E8%B1%A1%E6%B2%A1%E6%9C%89%E5%AE%9E%E7%8E%B0Cloneable%E6%8E%A5%E5%8F%A3%E6%97%B6%EF%BC%89%0D%0A%09%09DateTime dateTime1 = new DateTime();%0D%0A%09%09DateTime dateTime2 = ClassUtil.cloneObj(dateTime1);%0D%0A%09%09System.out.println(StrUtil.format(%22Is dateTime1 equals dateTime2: %7B%7D%22, dateTime1 == dateTime2));%0D%0A
 %09%7D%0D%0A%7D%0D%0A

Add ClassUtil demo