mirror of
https://github.com/BetterAndroid/Hikage.git
synced 2025-09-05 10:15:37 +08:00
feat: add final param in HikageView, HikageViewDeclaration
This commit is contained in:
@@ -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
|
||||
)
|
@@ -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
|
||||
)
|
Reference in New Issue
Block a user