# HikageViewDeclaration

@ Target (allowedTargets = [ AnnotationTarget.CLASS ])
annotation class HikageViewDeclaration (val view: KClass <*>, val lparams: KClass <*> = Any::class, val alias: String = "", val requireInit: Boolean = false, val requirePerformer: Boolean = false)

Declare annotations to generate the Hikage.Performer function for the specified view at compile time.

You can declare a class for View that does not belong to your own View or third-party library.

The class name you define can be as good as you like, and notice it must to use the `object` keyword to modify it.

Usage:

    @HikageViewDeclaration(ThirdPartyView::class, FrameLayout.LayoutParams::class, alias = "ThirdPartyView")
    object ThirdPartyViewDeclaration

Content copied to clipboard

#### Parameters

view

the view class, only View can be specified.

lparams

the layout params class, only ViewGroup can be specified, after specifying, the `performer` parameter will be generated for the function. The parameters must be a class inherited from ViewGroup.LayoutParams, if the current View does not inherit from ViewGroup, this parameter will be ignored and warned.

alias

the view's class name alias will naming the function, default is the view class name.

requireInit

whether to force the `init` parameter to be called, default is false.

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.

## Properties

alias
Link copied to clipboard
val alias : String
lparams
Link copied to clipboard
val lparams : KClass <*>
requireInit
Link copied to clipboard
val requireInit : Boolean = false
requirePerformer
Link copied to clipboard
val requirePerformer : Boolean = false
view
Link copied to clipboard
val view : KClass <*>