Annotation Type CVAR


@Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface CVAR
Annotation for variables accessible to the engine. Variables can be attached to any public getter/setter method or field on EngineElements.

Should be paired up in getters/setters. If only on a getter, it is a read-only variable. It cannot only be on a setter.

The getter is the authority on descriptions and archival.

Author:
Matthew Tropiano
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Checks if this archived as a setting (if not read-only)?
    Variable description.
    boolean
    Checks if this a globally-saved variable (as opposed to user)?
    The variable name.
  • Element Details

    • value

      String value
      The variable name. If not specified (or blank), this uses the field name, or the getter/setter name of the getter/setter method. The name is case-insensitive.
      Returns:
      the variable name to use.
      Default:
      ""
    • archived

      boolean archived
      Checks if this archived as a setting (if not read-only)?
      Returns:
      true if so, false if not.
      Default:
      false
    • global

      boolean global
      Checks if this a globally-saved variable (as opposed to user)?
      Returns:
      true if so, false if not.
      Default:
      false
    • description

      String description
      Variable description.
      Returns:
      the variable description.
      Default:
      "Console variable."