|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.webframe.support.driver.ModulePluginUtils
public abstract class ModulePluginUtils
提供框架的模块插件驱动信息获取方法
| Field Summary | |
|---|---|
private static Map<String,ModulePluginDriverInfo> |
cacheDriverInfoMap
|
private static String |
CONFIG_FILE_NAME
|
static String |
DELIMITERS
|
private static List<ModulePluginDriverInfo> |
needUpdateDriverInfos
|
protected static String |
PREFIX_CLASSPATH
|
| Constructor Summary | |
|---|---|
ModulePluginUtils()
|
|
| Method Summary | ||
|---|---|---|
static void |
cacheModulePluginConfig(String realConfigDirectory)
缓存已加载的模块插件配置信息到物理文件 |
|
static ModulePluginDriverInfo |
getDriverInfo(String driverClassName)
根据模块驱动类名称,获取模块驱动类详细信息 |
|
static Enumeration<ModulePluginDriverInfo> |
getDriverInfos()
|
|
static Enumeration<ModulePluginDriverInfo> |
getDriverInfos(Class<? extends ModulePluginDriver> clazz)
获取指定驱动接口的驱动类集合 |
|
static
|
getDrivers(Class<X> clazz)
|
|
protected static List<ModulePluginDriverInfo> |
getNeedUpdateDriverInfos()
|
|
protected static org.springframework.core.io.Resource[] |
getResources(ModulePluginDriverInfo driverInfo,
String pattern)
根据ClassRelativeResourceLoader加载符合pattern的资源 |
|
protected static String |
resolvePath(Class<? extends ModulePluginDriver> loaderClass,
String path)
根据指定class处理path,如果path为null,则返回null;如果path以"/"Begin,则直接返回path; 如果path不以"/"开始,那么返回loaderClass所在包的路径再加上path路径。 |
|
private static void |
serializeDriverInfos(File file,
boolean create)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DELIMITERS
protected static final String PREFIX_CLASSPATH
private static final String CONFIG_FILE_NAME
private static Map<String,ModulePluginDriverInfo> cacheDriverInfoMap
private static List<ModulePluginDriverInfo> needUpdateDriverInfos
| Constructor Detail |
|---|
public ModulePluginUtils()
| Method Detail |
|---|
public static void cacheModulePluginConfig(String realConfigDirectory)
realConfigDirectory - 模块插件配置信息缓存文件夹路径,绝对路径protected static List<ModulePluginDriverInfo> getNeedUpdateDriverInfos()
public static Enumeration<ModulePluginDriverInfo> getDriverInfos()
public static Enumeration<ModulePluginDriverInfo> getDriverInfos(Class<? extends ModulePluginDriver> clazz)
clazz - 继承ModulePluginDriver接口的子接口
public static ModulePluginDriverInfo getDriverInfo(String driverClassName)
throws DriverNotExistException
driverClassName - 模块驱动类名称,字符串(包括包路径)
DriverNotExistExceptionpublic static <X> Enumeration<X> getDrivers(Class<X> clazz)
protected static org.springframework.core.io.Resource[] getResources(ModulePluginDriverInfo driverInfo,
String pattern)
loaderClass - 定位classpattern - 匹配符
protected static String resolvePath(Class<? extends ModulePluginDriver> loaderClass,
String path)
loaderClass - 指定class,根据该clas所在的包来定位path的最终路径path - 包的相对路径,或者是相对于loaderClass的相对路径
private static void serializeDriverInfos(File file,
boolean create)
throws IOException,
FileNotFoundException
IOException
FileNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||