🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### [修饰符关键字](http://www.kotlincn.net/docs/reference/keyword-reference.html#修饰符关键字) 以下符号作为声明中修饰符列表中的关键字,并可用作其他上下文中的标识符: * `actual`表示[多平台项目](http://www.kotlincn.net/docs/reference/multiplatform.html)中的一个平台相关实现 * `abstract`将一个类或成员标记为[抽象](http://www.kotlincn.net/docs/reference/classes.html#抽象类) * `annotation`声明一个[注解类](http://www.kotlincn.net/docs/reference/annotations.html) * `companion`声明一个[伴生对象](http://www.kotlincn.net/docs/reference/object-declarations.html#伴生对象) * `const`将属性标记为[编译期常量](http://www.kotlincn.net/docs/reference/properties.html#编译期常量) * `crossinline`禁止[传递给内联函数的 lambda 中的非局部返回](http://www.kotlincn.net/docs/reference/inline-functions.html#非局部返回) * `data`指示编译器[为类生成典型成员](http://www.kotlincn.net/docs/reference/data-classes.html) * `enum`声明一个[枚举](http://www.kotlincn.net/docs/reference/enum-classes.html) * `expect`将一个声明标记为[平台相关](http://www.kotlincn.net/docs/reference/multiplatform.html),并期待在平台模块中实现。 * `external`将一个声明标记为不是在 Kotlin 中实现(通过[JNI](http://www.kotlincn.net/docs/reference/java-interop.html#在-kotlin-中使用-jni)访问或者在[JavaScript](http://www.kotlincn.net/docs/reference/js-interop.html#external-修饰符)中实现) * `final`禁止[成员覆盖](http://www.kotlincn.net/docs/reference/classes.html#覆盖方法) * `infix`允许以[中缀表示法](http://www.kotlincn.net/docs/reference/functions.html#中缀表示法)调用函数 * `inline`告诉编译器[在调用处内联传给它的函数和 lambda 表达式](http://www.kotlincn.net/docs/reference/inline-functions.html) * `inner`允许在[嵌套类](http://www.kotlincn.net/docs/reference/nested-classes.html)中引用外部类实例 * `internal`将一个声明标记为[在当前模块中可见](http://www.kotlincn.net/docs/reference/visibility-modifiers.html) * `lateinit`允许[在构造函数之外初始化非空属性](http://www.kotlincn.net/docs/reference/properties.html#延迟初始化属性与变量) * `noinline`关闭[传给内联函数的 lambda 表达式的内联](http://www.kotlincn.net/docs/reference/inline-functions.html#禁用内联) * `open`允许[一个类子类化或覆盖成员](http://www.kotlincn.net/docs/reference/classes.html#继承) * `operator`将一个函数标记为[重载一个操作符或者实现一个约定](http://www.kotlincn.net/docs/reference/operator-overloading.html) * `out`将类型参数标记为[协变](http://www.kotlincn.net/docs/reference/generics.html#声明处型变) * `override`将一个成员标记为[超类成员的覆盖](http://www.kotlincn.net/docs/reference/classes.html#覆盖方法) * `private`将一个声明标记为[在当前类或文件中可见](http://www.kotlincn.net/docs/reference/visibility-modifiers.html) * `protected`将一个声明标记为[在当前类及其子类中可见](http://www.kotlincn.net/docs/reference/visibility-modifiers.html) * `public`将一个声明标记为[在任何地方可见](http://www.kotlincn.net/docs/reference/visibility-modifiers.html) * `reified`将内联函数的类型参数标记为[在运行时可访问](http://www.kotlincn.net/docs/reference/inline-functions.html#具体化的类型参数) * `sealed`声明一个[密封类](http://www.kotlincn.net/docs/reference/sealed-classes.html)(限制子类化的类) * `suspend`将一个函数或 lambda 表达式标记为挂起式(可用做[协程](http://www.kotlincn.net/docs/reference/coroutines.html)) * `tailrec`将一个函数标记为[尾递归](http://www.kotlincn.net/docs/reference/functions.html#尾递归函数)(允许编译器将递归替换为迭代) * `vararg`允许[一个参数传入可变数量的参数](http://www.kotlincn.net/docs/reference/functions.html#可变数量的参数varargs)