Package | Description |
---|---|
com.forte.qqrobot |
主要是core所需要的包
|
com.forte.qqrobot.anno | |
com.forte.qqrobot.anno.depend | |
com.forte.qqrobot.depend |
此包下为依赖注入相关的内容。
|
com.forte.qqrobot.intercept |
拦截器包,部分AOP接口
|
com.forte.qqrobot.scanner | |
com.forte.qqrobot.timetask | |
com.forte.qqrobot.utils |
Modifier and Type | Class and Description |
---|---|
class |
CoreConfiguration
核心的配置注入类
|
Modifier and Type | Method and Description |
---|---|
BotManager |
CoreConfiguration.defaultBotManager() |
LimitIntercept |
CoreConfiguration.limitIntercept()
限流拦截器
|
Modifier and Type | Class and Description |
---|---|
interface |
DIYFilter
自定义过滤规则的
|
interface |
ExceptionCatch
在监听器中进行异常处理, 标注在实现了ExceptionHandle接口的类上
|
interface |
HttpTemplate
将标注的、实现了
HttpClientAble 的类注册到HttpClientHelper 中 |
interface |
Listen
标记用
添加此注解,标注为一个监听器类 标注在类上将会记录全部的方法 标注在方法上将会记录此方法 当监听函数存在返回值且未标记@ListenBody的时候,部分返回值存在特殊含义: 如果返回值本身为ListenResult对象则其他参数均无效,以其本身为主。 布尔类型代表函数是否执行成功。 返回值为null的时候代表执行未成功。 数值类型小于0代表执行未成功。 |
static interface |
Listen.ByName
通过额外注册的监听类型进行监听器注册,最终会转化为
Listen |
Modifier and Type | Class and Description |
---|---|
interface |
AutoBeans
一般用于自动装配的模组上,此注解与
Beans 的区别在于此注解为默认会初始化一次的。
但是其他参数不可选,默认即为单例、 |
Modifier and Type | Method and Description |
---|---|
static List<Beans> |
BeansFactory.getBeans(Beans beansAnno,
Class<?>... classCollection)
从Class列表中过滤并转化为Beans列表
传入的calss默认认为全部可以转化为Beans对象,过滤判断交给调用方
|
static BeansData |
BeansData.getInstance(Beans beans)
根据注解获取实例
|
DependCenter |
DependCenter.load(Beans beanAnno,
Class<?>... loadsClasses)
判断规则默认为非接口、非抽象类且存在@Beans注解的class对象
|
DependCenter |
DependCenter.load(Beans BeansAnno,
Predicate<Class> classTest,
Class<?>... loadsClasses)
加载一批依赖对象
|
Modifier and Type | Class and Description |
---|---|
interface |
Intercept
拦截器注解,目前暂时仅用于标记@Beans
|
Modifier and Type | Method and Description |
---|---|
void |
ScannerManager.registerDependCenterWithoutAnnotation(Beans beans)
不需要@Beans注解的依赖注入
|
void |
Register.registerDependCenterWithoutAnnotation(Beans beans)
不需要@Beans注解的依赖注入
|
Modifier and Type | Method and Description |
---|---|
default Beans |
TimeJob.getBeans()
获取Beans注解,当返回值不为null的时候会进行注入
|
Modifier and Type | Method and Description |
---|---|
static <T extends TimeJob> |
TimeJob.getDepend(String beanName,
Class<T> type,
Beans beans,
DependCenter center)
提供一个对象,他的@Beans注解对象以及依赖工厂,则如果可以,则。
为了考虑可能存在的优化方案,仅有当参数@Beans注解对象为null的时候才会通过反射去获取注解。
|
Modifier and Type | Method and Description |
---|---|
static Beans |
AnnotationUtils.getBeansAnnotationIfListen(Class<?> from)
尝试从一个类对象中获取到@Beans注解
|
Copyright © 2020. All rights reserved.