优化了对于类路径递归的算法
添加了MariataPluginBase,里面继承PluginBase,并添加了中枢方法
- getReflectLoader方法
规定:使用该PluginBase作为主类的插件必须使用mariata.oml
自定义中枢方法的使用
//this为继承MariataPluginBase的主类
this.getReflectLoader(this,(obj,clz)->{
//对象处理
if(obj instanceof xxx){
对象的处理
}
},new String[]{根包名});
使用该方法后,所有的对象都会在这里被加载,并且在lambada表达式可以对全部对象加载
如:处理全部继承AAA类的对象
this.getReflectLoader(this,(obj,clz)->{
//对象处理
if(obj instanceof AAA){
}
},new String[]{根包名});