Package | Description |
---|---|
com.forte.qqrobot |
主要是core所需要的包
|
com.forte.qqrobot.depend |
此包下为依赖注入相关的内容。
|
com.forte.qqrobot.depend.util | |
com.forte.qqrobot.listener.invoker |
Modifier and Type | Method and Description |
---|---|
DependGetter |
BaseConfiguration.getDependGetter()
获取依赖获取器
|
Modifier and Type | Method and Description |
---|---|
T |
BaseConfiguration.setDependGetter(DependGetter dependGetter)
配置依赖获取器
|
Modifier and Type | Class and Description |
---|---|
class |
AdditionalDepends
额外的参数对象
此类主要提供给
ListenerMethod 来在调用函数的时候添加动态参数
此类不区分是否为常量,请保证如果存在常量类型,需要使其类型唯一。 |
class |
DependCenter
依赖资源管理中心
可以通过配置类来配置优先资源获取方法
资源存入时不可覆盖,key值不可重复
|
Modifier and Type | Method and Description |
---|---|
<T> T |
DependCenter.get(Class<T> type,
DependGetter additionalDepends)
通过额外参数对某个对象进行强制注入
|
<T> T |
DependCenter.get(String name,
Class<T> type,
DependGetter additionalDepends)
通过额外参数对某个对象进行强制注入
|
Object |
DependCenter.get(String name,
DependGetter additionalDepends)
通过额外参数对某个对象进行强制注入
|
void |
Depend.injectAdditional(V v,
DependGetter additionalDepends)
通过额外参数对象进行注入
|
Constructor and Description |
---|
DependCenter(DependGetter dependGetter)
构造
|
Constructor and Description |
---|
Depend(String name,
Class<V> type,
boolean single,
Supplier<V> supplier,
Consumer<V> injectDepend,
BiConsumer<V,DependGetter> injectAdditionalDepend,
boolean init,
int priority)
构造
|
Modifier and Type | Method and Description |
---|---|
static <T> BiConsumer<T,DependGetter> |
DependUtil.doInj(Class<T> type,
Field field,
Depend dependAnnotation,
Function<DependGetter,Depend> getter)
对字段进行注入
函数形式
仅使用额外参数
|
Modifier and Type | Method and Description |
---|---|
static <T> BiConsumer<T,DependGetter> |
DependUtil.doInj(Class<T> type,
Field field,
Depend dependAnnotation,
Function<DependGetter,Depend> getter)
对字段进行注入
函数形式
仅使用额外参数
|
Modifier and Type | Method and Description |
---|---|
Function<DependGetter,T> |
ListenerMethod.getListenerGetterWithAddition() |
Copyright © 2020. All rights reserved.