feat: add final param in HikageView, HikageViewDeclaration

This commit is contained in:
2025-08-23 22:39:35 +08:00
parent 8e25430d68
commit 76df8fa06c
5 changed files with 50 additions and 33 deletions

View File

@@ -45,6 +45,9 @@ import kotlin.reflect.KClass
* @param requireInit whether to force the `init` parameter to be called, default is false.
* @param requirePerformer whether to force the `performer` parameter to be called, default is false,
* this parameter will be ignored when no `performer` parameter is needed here.
* @param final whether to declare this layout as "final layout", default is false, that is,
* whether this layout inherits from or is [ViewGroup], the `performer` parameter will not be generated.
* After set to `true`, [lparams] and [requirePerformer] will no longer be valid.
*/
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.CLASS)
@@ -53,5 +56,6 @@ annotation class HikageView(
val lparams: KClass<*> = Any::class,
val alias: String = "",
val requireInit: Boolean = false,
val requirePerformer: Boolean = false
val requirePerformer: Boolean = false,
val final: Boolean = false
)

View File

@@ -48,6 +48,9 @@ import kotlin.reflect.KClass
* @param requireInit whether to force the `init` parameter to be called, default is false.
* @param requirePerformer whether to force the `performer` parameter to be called, default is false,
* this parameter will be ignored when no `performer` parameter is needed here.
* @param final whether to declare this layout as "final layout", default is false, that is,
* whether this layout inherits from or is [ViewGroup], the `performer` parameter will not be generated.
* After set to `true`, [lparams] and [requirePerformer] will no longer be valid.
*/
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.CLASS)
@@ -57,5 +60,6 @@ annotation class HikageViewDeclaration(
val lparams: KClass<*> = Any::class,
val alias: String = "",
val requireInit: Boolean = false,
val requirePerformer: Boolean = false
val requirePerformer: Boolean = false,
val final: Boolean = false
)