Interface Variable


public interface Variable
The Variable interface defines the contract for objects that represent a variable within a scripting context. It provides methods to manage the state and properties of a variable, such as whether its value should be remembered, if it's sensitive, and its current value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the current value of the variable.
    Checks if the variable's value should be remembered across sessions.
    Checks if the variable's value is considered sensitive (e.g., a password or private key).
    void
    setRemembered(Boolean remembered)
    Sets whether the variable's value should be remembered across sessions.
    void
    setSensitive(Boolean sensitive)
    Sets whether the variable's value is considered sensitive.
    void
    Sets the value of the variable.
  • Method Details

    • isRemembered

      Boolean isRemembered()
      Checks if the variable's value should be remembered across sessions.
      Returns:
      true if the variable's value is remembered, false otherwise.
    • setRemembered

      void setRemembered(Boolean remembered)
      Sets whether the variable's value should be remembered across sessions.
      Parameters:
      remembered - true to remember the value, false otherwise.
    • getValue

      Object getValue()
      Retrieves the current value of the variable.
      Returns:
      The current value of the variable as an Object.
    • setValue

      void setValue(Object value)
      Sets the value of the variable.
      Parameters:
      value - The new value to set for the variable.
    • isSensitive

      Boolean isSensitive()
      Checks if the variable's value is considered sensitive (e.g., a password or private key). Sensitive values require special handling, such as not being logged or displayed.
      Returns:
      true if the variable's value is sensitive, false otherwise.
    • setSensitive

      void setSensitive(Boolean sensitive)
      Sets whether the variable's value is considered sensitive.
      Parameters:
      sensitive - true if the value is sensitive, false otherwise.