Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Simplified a couple examples

...

Code Block
java
java
public class MyService implements MyServiceInterface
{
  private boolean productionMode;

  public MyService(@Value("${tapestry.production-mode}") boolean productionMode, ...)
  {
    if this.productionMode = productionMode;
(productionMode) {
      . . .

Here Tapestry has coerced the "tapestry.production-mode" symbol to a boolean to be injected.

...

Code Block
java
java
public class MyService implements MyServiceInterface
{
  private boolean productionMode;

  public MyService(@Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode, ...)
  {
    if this.productionMode = productionMode;
(productionMode) {
      . . .

This is very useful when a constant value is defined for the symbol; it means that the compiler can catch a typo, rather than detecting it a runtime.

...

Symbols are resolved by the SymbolSource service. The SymbolSource service checks against an ordered list of SymbolProvider objects.

...