Class OverrideLoader
ClassificationOverride
instances.
Override files carry human-reviewed corrections to AI classification
results. They are persisted in YAML using the
ClassificationOverride schema and re-applied on every subsequent
MethodAtlas run so that reviewer decisions reproduce deterministically
across CI builds.
Null handling
Passing null as the override path is a legitimate signal that the
caller wants the empty no-op singleton — typical when no
-override-file flag was supplied. The loader returns
ClassificationOverride.empty() in that case rather than throwing,
because the absence of an override file is normal, not exceptional.
Thread safety
This class is thread-safe. It carries no instance state and the underlying
ClassificationOverride.load(Path) call is itself stateless.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OverrideLoader
public OverrideLoader()Creates a new override loader. The loader carries no instance state.
-
-
Method Details
-
load
Loads the classification override file at the given path, or returns the empty no-op singleton when no override file was configured.The empty singleton is a sentinel: callers can apply it unconditionally to every classification without checking for
null, which simplifies the orchestration loops in theCommandimplementations.- Parameters:
overrideFile- path to the YAML override file, ornullwhen the caller wants the empty no-op singleton- Returns:
- loaded override set, or the empty singleton; never
null - Throws:
IllegalArgumentException- if the file exists but cannot be read or contains invalid YAML
-