Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class HiltApi

声明该api将提供注入实体

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class HiltDao(val entities: Array<KClass<*>> = [], val views: Array<KClass<*>> = [], val node: KClass<*> = Any::class)

用于声明此Dao为可提供注入的

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class HiltRoom(val name: String, val version: Int, val nodes: Array<KClass<*>> = [], val exportSchema: Boolean = false, val autoMigrations: Array<AutoMigration> = [], val inMemory: Boolean = false, val interceptor: KClass<out HiltPlusInterceptor<*>> = HiltPlusInterceptor::class, val printSql: Boolean = false)

用于定义数据库

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class HiltRoomNode(val node: KClass<*>, val entities: Array<KClass<*>> = [], val views: Array<KClass<*>> = [], val daoList: Array<KClass<*>> = [])

由在HiltDao.node中指向的同一自定义注解,代码自动生成。