Package | Description |
---|---|
com.forte.qqrobot.depend |
此包下为依赖注入相关的内容。
|
com.forte.qqrobot.depend.util | |
com.forte.qqrobot.timetask |
Modifier and Type | Class and Description |
---|---|
class |
BasicDepend<V>
基础数据类型的Depend对象
|
Modifier and Type | Method and Description |
---|---|
<T> Depend<T> |
DependCenter.getDepend(Class<T> type)
通过类型获取依赖对象
|
<T> Depend<T> |
DependCenter.getDepend(Class<T> type,
boolean orNull)
Deprecated.
|
Depend |
DependCenter.getDepend(String name)
通过名称获取依赖对象
|
Depend |
DependCenter.getDepend(String name,
boolean orNull)
Deprecated.
|
<T> Depend<T> |
DependCenter.getDepend(String name,
Class<T> type) |
Modifier and Type | Method and Description |
---|---|
int |
Depend.compareTo(Depend o) |
Modifier and Type | Method and Description |
---|---|
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 <T extends TimeJob> |
TimeJob.getDepend(String beanName,
Class<T> type,
Beans beans,
DependCenter center)
提供一个对象,他的@Beans注解对象以及依赖工厂,则如果可以,则。
为了考虑可能存在的优化方案,仅有当参数@Beans注解对象为null的时候才会通过反射去获取注解。
|
Copyright © 2020. All rights reserved.