Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The method getReplacementKeys() has to return a collection of keys which the provider wants to offer. This will be called each time before a OdysseusScript-File is executed (so the list of available keys can change during run-time, if needed). The second method getReplacementValue() finally has to return the value for the given key. It is expected that since the provider provides the key, a value non-null is retured. If the second method return null, OdysseusScript uses an empty string (""). The method is called each time the key is used inside one OdysseusScript file.

Example

The developer wants to add the current date as a constant variable. The class could be implemented as follows:

...