Annotation Interface StrategyProperty


@Retention(RUNTIME) @Target(FIELD) public @interface StrategyProperty
Declarative annotation for strategy properties. Fields annotated with this are automatically registered as strategy properties. defaultValue is applied the first time the strategy is actually used (dispatch, property lookup, or explicit sweep injection) — not during construction, since a leaf subclass's own field initializers run after the superclass constructor that discovers this annotation, and would otherwise silently overwrite a default written any earlier.

The annotation and the field are the whole declaration — no accessor is required for a value to reach it:

@StrategyProperty(name = "rsi.period", description = "RSI period", defaultValue = "14")
private int rsiPeriod;

A JavaBean setter is still used whenever one exists, so a property that must be validated, clamped or accompanied by a derived value can declare setRsiPeriod(int) and be sure every injection channel goes through it. The field is written directly only when no setter exists at all. It cannot be static (one instance's value would leak into every parallel sweep trial) or final (nothing can assign it after construction); either needs a setter, and declaring one with neither is reported rather than silently ignored.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Default value as string.
    Human-readable label.
    double
    Optional sweep/range hint: suggested maximum value.
    double
    Optional sweep/range hint: suggested minimum value.
    Config key.
    boolean
    true: injected into the field (through its setter when there is one); false: map-only.
    double
    Optional sweep/range hint: suggested step/resolution.
  • Element Details

    • name

      String name
      Config key. Empty uses the field name.
      Default:
      ""
    • description

      String description
      Human-readable label.
      Default:
      ""
    • defaultValue

      String defaultValue
      Default value as string. Empty means no default.
      Default:
      ""
    • reflected

      boolean reflected
      true: injected into the field (through its setter when there is one); false: map-only.
      Default:
      true
    • min

      double min
      Optional sweep/range hint: suggested minimum value. NaN (the default) means "no hint" — purely advisory for parameter sweeps / UI range pre-fills, never used to validate the property value.
      Default:
      0.0/0.0
    • max

      double max
      Optional sweep/range hint: suggested maximum value. NaN = unset.
      Default:
      0.0/0.0
    • step

      double step
      Optional sweep/range hint: suggested step/resolution. NaN = unset.
      Default:
      0.0/0.0