HelperLoader.java
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.smart4j.framework;
import org.smart4j.framework.aop.AopHelper;
import org.smart4j.framework.dao.DatabaseHelper;
import org.smart4j.framework.ioc.BeanHelper;
import org.smart4j.framework.ioc.IocHelper;
import org.smart4j.framework.mvc.ActionHelper;
import org.smart4j.framework.orm.EntityHelper;
import org.smart4j.framework.plugin.PluginHelper;
import org.smart4j.framework.util.ClassUtil;
/**
* 加载相应的 Helper 类
*
* @author huangyong
* @since 2.0
*
* 执行顺序:1
*/
public final class HelperLoader {
public static void init() {
// 定义需要加载的 Helper 类
Class<?>[] classList = {
//数据库
DatabaseHelper.class,
//表--类 对应关系
EntityHelper.class,
//
ActionHelper.class,
BeanHelper.class,
AopHelper.class,
IocHelper.class,
PluginHelper.class,
};
// 按照顺序加载类
for (Class<?> cls : classList) {
ClassUtil.loadClass(cls.getName());
}
}
}