Package | Description |
---|---|
com.forte.qqrobot.depend |
此包下为依赖注入相关的内容。
|
com.forte.qqrobot.depend.util | |
com.forte.qqrobot.utils |
Modifier and Type | Method and Description |
---|---|
Depend |
BeansData.depend() |
Modifier and Type | Method and Description |
---|---|
void |
BeansData.setDepend(Depend depend) |
Modifier and Type | Method and Description |
---|---|
static <T> Function<T,Boolean> |
DependUtil.canInj(Class<T> type,
Field field,
Depend dependAnnotation)
判断一个类中的依赖是否可以进行注入
函数形式
|
static <T> BiConsumer<T,DependGetter> |
DependUtil.doInj(Class<T> type,
Field field,
Depend dependAnnotation,
Function<DependGetter,Depend> getter)
对字段进行注入
函数形式
仅使用额外参数
|
static <T> Consumer<T> |
DependUtil.doInj(Class<T> type,
Field field,
Depend dependAnnotation,
Supplier<Depend> getter)
对字段进行注入
函数形式
|
Modifier and Type | Method and Description |
---|---|
static Depend |
AnnotationUtils.getDepend(AnnotatedElement from)
获取Depend注解。
如果获取不到Depend, 则尝试获取
Resource |
Copyright © 2020. All rights reserved.