类 SharedClassServiceImpl
- java.lang.Object
-
- io.esastack.cabin.container.service.share.SharedClassServiceImpl
-
- 所有已实现的接口:
SharedClassService
public class SharedClassServiceImpl extends Object implements SharedClassService
Different modules could export same packages, but should not export same classes!
-
-
构造器概要
构造器 构造器 说明 SharedClassServiceImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddSharedClass(String className, Module module)voidaddSharedClass(String className, Class<?> clazz)voidaddSharedPackage(String packageName, Module module)booleancontainsClass(String className)voiddestroyModuleClasses(String moduleName)Remove from class/package map first, avoiding added to cachedClasses after destroy module.Class<?>getSharedClass(String className)This method would be called only after all module had been exported.intgetSharedClassCount()Map<String,Class<?>>getSharedClassMap()voidpreLoadAllSharedClasses()No Exception should be thrown, because the loading class may extends superclass or implement interface from other lib modules or biz modules; In these situations, we just ignore the failure.
-
-
-
方法详细资料
-
addSharedPackage
public void addSharedPackage(String packageName, Module module)
- 指定者:
addSharedPackage在接口中SharedClassService
-
preLoadAllSharedClasses
public void preLoadAllSharedClasses()
No Exception should be thrown, because the loading class may extends superclass or implement interface from other lib modules or biz modules; In these situations, we just ignore the failure.- 指定者:
preLoadAllSharedClasses在接口中SharedClassService
-
getSharedClass
public Class<?> getSharedClass(String className)
This method would be called only after all module had been exported. At this time, all the class/package, module mappings have been established. If load a class while exporting a module, it may implement an interface or inherit a super class which is contained and exported by an other module which has not been exported; In this situation, the interface or super class loading may fail.- 指定者:
getSharedClass在接口中SharedClassService
-
addSharedClass
public void addSharedClass(String className, Class<?> clazz)
- 指定者:
addSharedClass在接口中SharedClassService
-
addSharedClass
public void addSharedClass(String className, Module module)
- 指定者:
addSharedClass在接口中SharedClassService
-
getSharedClassMap
public Map<String,Class<?>> getSharedClassMap()
- 指定者:
getSharedClassMap在接口中SharedClassService
-
getSharedClassCount
public int getSharedClassCount()
- 指定者:
getSharedClassCount在接口中SharedClassService
-
containsClass
public boolean containsClass(String className)
- 指定者:
containsClass在接口中SharedClassService
-
destroyModuleClasses
public void destroyModuleClasses(String moduleName)
Remove from class/package map first, avoiding added to cachedClasses after destroy module.- 指定者:
destroyModuleClasses在接口中SharedClassService- 参数:
moduleName- module to destroy
-
-