Package | Description |
---|---|
com.forte.qqrobot |
主要是core所需要的包
|
com.forte.qqrobot.depend |
此包下为依赖注入相关的内容。
|
com.forte.qqrobot.scanner | |
com.forte.qqrobot.timetask | |
com.forte.qqrobot.utils |
Modifier and Type | Method and Description |
---|---|
static DependCenter |
ResourceDispatchCenter.getDependCenter()
获取一个DependCenter单例对象
|
DependCenter |
BaseApplication.getDependCenter()
获取依赖获取器
|
DependCenter |
SimpleRobotContext.getDependCenter()
获取依赖管理中心
|
Modifier and Type | Method and Description |
---|---|
protected void |
BaseApplication.afterDepend(CONFIG config,
Application<CONFIG> app,
Register register,
DependCenter dependCenter)
依赖扫描之后
同时也是监听函数扫描之前
|
protected void |
BaseApplication.beforeRegisterListener(CONFIG config,
Application<CONFIG> app,
ListenerMethodScanner scanner,
DependCenter dependCenter)
监听函数注册之前,可以执行重写并进行额外的监听注入
|
protected abstract CONTEXT |
BaseApplication.getComponentContext(MsgSender defaultMsgSender,
BotManager manager,
MsgParser msgParser,
MsgProcessor processor,
DependCenter dependCenter)
获取一个组件专属的SimpleRobotContext对象
|
protected abstract MsgSender |
BaseApplication.getDefaultSender(DependCenter dependCenter,
ListenerManager manager,
BotManager botManager)
获取一个不使用在监听函数中的默认送信器
|
protected abstract String |
BaseApplication.runServer(DependCenter dependCenter,
ListenerManager manager,
MsgProcessor msgProcessor,
MsgParser msgParser)
启动一个服务,这有可能是http或者是ws的监听服务
|
Constructor and Description |
---|
SimpleRobotContext(SEND sender,
SET setter,
GET getter,
BotManager manager,
MsgParser msgParser,
MsgProcessor processor,
DependCenter dependCenter)
构造函数
|
Modifier and Type | Method and Description |
---|---|
DependCenter |
DependCenter.load(Beans beanAnno,
Class<?>... loadsClasses)
判断规则默认为非接口、非抽象类且存在@Beans注解的class对象
|
DependCenter |
DependCenter.load(Beans BeansAnno,
Predicate<Class> classTest,
Class<?>... loadsClasses)
加载一批依赖对象
|
DependCenter |
DependCenter.load(Class<?>... loadsClasses)
判断规则默认为非接口、抽象类且存在@Beans注解的class对象
|
DependCenter |
DependCenter.load(Collection<Class<?>> list)
判断规则默认为非接口、抽象类且存在@Beans注解的class对象
|
DependCenter |
DependCenter.load(Predicate<Class> classTest,
Class<?>... loadsClasses)
加载一批依赖对象
|
DependCenter |
DependCenter.load(Predicate<Class> classTest,
Collection<Class<?>> list)
加载一批依赖对象
|
<T> DependCenter |
DependCenter.load(String name,
T bean)
根据一个对象直接添加,默认为单例模式
|
<T> DependCenter |
DependCenter.load(T bean)
根据一个对象直接添加,默认为单例模式
依赖名称默认使用类名
|
<T> DependCenter |
DependCenter.loadIgnoreThrow(T bean)
根据一个对象直接添加,默认为单例模式
依赖名称默认使用类名
无视出现的异常 |
Modifier and Type | Method and Description |
---|---|
void |
ScannerManager.registerDependCenter(DependCenter dependCenter)
进行依赖注入
|
void |
Register.registerDependCenter(DependCenter dependCenter)
进行依赖注入
|
Modifier and Type | Method and Description |
---|---|
static DependCenter |
TimeTaskContext.getDependCenter(org.quartz.JobExecutionContext context)
从一个Context中取出DependCenter
|
Modifier and Type | Method and Description |
---|---|
static <T extends TimeJob> |
TimeJob.getDepend(String beanName,
Class<T> type,
Beans beans,
DependCenter center)
提供一个对象,他的@Beans注解对象以及依赖工厂,则如果可以,则。
为了考虑可能存在的优化方案,仅有当参数@Beans注解对象为null的时候才会通过反射去获取注解。
|
static void |
TimeTaskContext.giveDependCenter(org.quartz.JobDataMap jobDataMap,
DependCenter dependCenter)
保存一个DependCenter
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
BeansUtils.getInstance(Class<T> clazz,
DependCenter dependCenter)
如果存在@Constr,使用Constr,否则尝试使用无参构造,如果还是不行则尝试使用依赖获取
|
Copyright © 2020. All rights reserved.