Merged
Conversation
database-ioc: - 新增 BeanContainer 核心容器,支持 SINGLETON/PLAYER/PROTOTYPE 作用域 - 新增 @Component/@Resource/@PostConstruct/@PreDestroy 注解体系 - 新增 PlayerScope 管理玩家 Bean 生命周期(join/quit/定时保存) - 新增 PlayerOperator 基类,支持选择性字段更新 - 新增 PersistenceManager 桥接 ptc-object 持久化 - 新增 ComponentVisitor 在 ENABLE 阶段扫描 @component 类 - 移除旧的 IOCReader/IOCDatabase/Serialization/Linker 体系 database-ptc-object: - AnalyzedClass 支持字段扫描模式(无带参构造器的 body property 类) - AnalyzedClassMember 新增 FieldWithPropertyAnnotations, 通过检查 Kotlin 生成的 $annotations 合成方法兼容 property 注解 - 注解恢复 PROPERTY 目标,运行时自动兜底
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动概述
重写
database-ioc模块为真正的 IoC 容器,持久化完全交给database-ptc-object。database-ioc 模块(重写)
@Component(scope)/@Resource/@PostConstruct/@PreDestroyupdate(KProperty1...))@Id UUID@Component类database-ptc-object 模块(增强)
class Foo { var x = 0 })FieldWithPropertyAnnotations,通过检查 Kotlin 编译器生成的get<Name>$annotations合成方法,兼容@Id var x和@field:Id var x两种写法PROPERTY目标,运行时自动兜底主要修改文件
module/database/database-ioc/— 整体重写module/database/database-ptc-object/src/main/kotlin/taboolib/expansion/AnalyzedClass.ktmodule/database/database-ptc-object/src/main/kotlin/taboolib/expansion/AnalyzedClassMember.ktmodule/database/database-ptc-object/src/main/kotlin/taboolib/expansion/Annotations.ktCloses #663