📄 dictionaryfactory.java
字号:
/**
*
*/
package org.solol.mmseg.core;
/**
* @author solo L
*
*/
public abstract class DictionaryFactory {
public static final String FACTORY_PROPERTY = "org.solol.mmseg.DictionaryFactory";
public static final String FACTORY_DEFAULT = "org.solol.mmseg.internal.DictionaryFactoryImpl";
private static DictionaryFactory factory = null;
public static DictionaryFactory getFactory() throws ConfigurationException {
if (factory == null) {
ClassLoader contextClassLoader = DictionaryFactory.class
.getClassLoader();
factory = createFactory(FACTORY_DEFAULT, contextClassLoader);
}
return factory;
}
protected static DictionaryFactory createFactory(String factoryClass,
ClassLoader classLoader) throws ConfigurationException {
Class logFactoryClass;
try {
logFactoryClass = classLoader.loadClass(factoryClass);
return (DictionaryFactory) logFactoryClass.newInstance();
} catch (ClassNotFoundException e) {
throw new ConfigurationException(e);
} catch (InstantiationException e) {
throw new ConfigurationException(e);
} catch (IllegalAccessException e) {
throw new ConfigurationException(e);
}
}
public abstract IDictionary createDictionary();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -