public interface IPlugin extends AutoCloseable
Modifier and Type | Field and Description |
---|---|
static String |
DATE_PATH_KEY
数据目录 key
|
static String |
JPOM_VERSION_KEY
JPOM 版本
|
Modifier and Type | Method and Description |
---|---|
default void |
close()
系统关闭,插件资源释放
|
default <T> T |
convertResult(Object execute,
Class<T> cls)
转换结果
|
default <T> T |
execute(Object main,
Class<T> cls,
Object... parameters)
执行插件方法
|
Object |
execute(Object main,
Map<String,Object> parameter)
执行插件方法
|
default <T> T |
execute(Object main,
Map<String,Object> parameter,
Class<T> cls)
执行插件方法
|
default Object |
execute(Object main,
Object... parameters)
执行插件方法
|
static final String DATE_PATH_KEY
static final String JPOM_VERSION_KEY
Object execute(Object main, Map<String,Object> parameter) throws Exception
main
- 拦截到到对象parameter
- 执行方法传人的参数Exception
- 异常default Object execute(Object main, Object... parameters) throws Exception
main
- 主参数parameters
- 其他参数Exception
- 异常default <T> T execute(Object main, Class<T> cls, Object... parameters) throws Exception
T
- 泛型main
- 拦截到到对象parameters
- 其他参数cls
- 返回值类型Exception
- 异常default <T> T execute(Object main, Map<String,Object> parameter, Class<T> cls) throws Exception
T
- 泛型main
- 拦截到到对象parameter
- 执行方法传人的参数cls
- 返回值类型Exception
- 异常default <T> T convertResult(Object execute, Class<T> cls)
T
- 泛型execute
- 结果cls
- 返回值类型default void close() throws Exception
close
in interface AutoCloseable
Exception
- 异常Copyright © 2017–2022. All rights reserved.