Annotation Interface Environment


@Target(FIELD) @Retention(CLASS) public @interface Environment
Environment 标记的属性表示一个环境

An attribute marked by Environment represents an environment

  • 必需元素概要

    所需元素
    修饰符和类型
    必需的元素
    说明
     
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
     
    boolean
    一个 Module 中必须有且只有一个 Environment 的 isDefault 的值为 true,否则会编译失败。
  • 元素详细资料

    • value

      String value
      返回:
      当前环境的具体的值,必须指定具体的值

      Specific value of the current environment, you must specify a specific value

    • isDefault

      boolean isDefault
      一个 Module 中必须有且只有一个 Environment 的 isDefault 的值为 true,否则会编译失败。

      There must be one and only one Environment of isDefault in a Module with a value of true, otherwise the compilation will fail.

      返回:
      默认返回 false,当返回 true 时,当前 Environment 就是所属 Module 的默认环境,以及 App 编译时的环境。

      By default, false is returned. When true is returned, the current Environment is the default environment for the Module and the environment when the app was compiled by default.

      默认值:
      false
    • alias

      String alias
      返回:
      用来指定当前 Environment 的别名

      Used to specify the current alias for Environment

      默认值:
      ""