Annotation 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 ElementsModifier and TypeOptional ElementDescriptionDefault value as string.Human-readable label.doubleOptional sweep/range hint: suggested maximum value.doubleOptional sweep/range hint: suggested minimum value.Config key.booleantrue: injected into the field (through its setter when there is one); false: map-only.doubleOptional sweep/range hint: suggested step/resolution.
-
Element Details
-
name
-
description
-
defaultValue
-
reflected
boolean reflectedtrue: injected into the field (through its setter when there is one); false: map-only.- Default:
true
-
min
double minOptional 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 maxOptional sweep/range hint: suggested maximum value.NaN= unset.- Default:
0.0/0.0
-
step
double stepOptional sweep/range hint: suggested step/resolution.NaN= unset.- Default:
0.0/0.0
-