Package org.egothor.methodatlas.command
Record Class AiRuntime
java.lang.Object
java.lang.Record
org.egothor.methodatlas.command.AiRuntime
- Record Components:
options- AI configuration for the current run; nevernullengine- AI engine providing per-class suggestions, ornullwhen AI support is disabledoverride- human-reviewed classification overrides; the empty singleton when no override file was suppliedcache- AI result cache keyed by content hash; the empty no-op cache when caching was not enabled
public record AiRuntime(org.egothor.methodatlas.ai.AiOptions options, org.egothor.methodatlas.ai.AiSuggestionEngine engine, org.egothor.methodatlas.emit.ClassificationOverride override, AiResultCache cache)
extends Record
Bundle of AI infrastructure that is constant for the duration of a scan run.
The AiSuggestionEngine, ClassificationOverride, and
AiResultCache for a single CLI invocation are all built once during
argument parsing and then handed to the Command implementations.
Packaging them as one immutable record keeps the per-class scan loop's
method signatures short and prevents accidental substitution of a
different cache or override partway through a run.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionAiRuntime(org.egothor.methodatlas.ai.AiOptions options, org.egothor.methodatlas.ai.AiSuggestionEngine engine, org.egothor.methodatlas.emit.ClassificationOverride override, AiResultCache cache) Creates an instance of aAiRuntimerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncache()Returns the value of thecacherecord component.org.egothor.methodatlas.ai.AiSuggestionEngineengine()Returns the value of theenginerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.egothor.methodatlas.ai.AiOptionsoptions()Returns the value of theoptionsrecord component.org.egothor.methodatlas.emit.ClassificationOverrideoverride()Returns the value of theoverriderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiRuntime
public AiRuntime(org.egothor.methodatlas.ai.AiOptions options, org.egothor.methodatlas.ai.AiSuggestionEngine engine, org.egothor.methodatlas.emit.ClassificationOverride override, AiResultCache cache) Creates an instance of aAiRuntimerecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
options
public org.egothor.methodatlas.ai.AiOptions options()Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
engine
public org.egothor.methodatlas.ai.AiSuggestionEngine engine()Returns the value of theenginerecord component.- Returns:
- the value of the
enginerecord component
-
override
public org.egothor.methodatlas.emit.ClassificationOverride override()Returns the value of theoverriderecord component.- Returns:
- the value of the
overriderecord component
-
cache
Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-