Record Class CompilationContext
java.lang.Object
java.lang.Record
org.ek9lang.cli.CompilationContext
record CompilationContext(CommandLine commandLine, Compiler compiler, FileCache sourceFileCache, boolean muteReportedErrors, CompilationResult compilationResult)
extends Record
A context to hold all the essential objects needed for compiling.
Includes mutable CompilationResult for tracking compilation state.
-
Constructor Summary
ConstructorsConstructorDescriptionCompilationContext(CommandLine commandLine, Compiler compiler, FileCache sourceFileCache, boolean muteReportedErrors, CompilationResult compilationResult) Creates an instance of aCompilationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecommandLinerecord component.Returns the value of thecompilationResultrecord component.compiler()Returns the value of thecompilerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themuteReportedErrorsrecord component.Returns the value of thesourceFileCacherecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompilationContext
CompilationContext(CommandLine commandLine, Compiler compiler, FileCache sourceFileCache, boolean muteReportedErrors, CompilationResult compilationResult) Creates an instance of aCompilationContextrecord class.- Parameters:
commandLine- the value for thecommandLinerecord componentcompiler- the value for thecompilerrecord componentsourceFileCache- the value for thesourceFileCacherecord componentmuteReportedErrors- the value for themuteReportedErrorsrecord componentcompilationResult- the value for thecompilationResultrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
commandLine
Returns the value of thecommandLinerecord component.- Returns:
- the value of the
commandLinerecord component
-
compiler
Returns the value of thecompilerrecord component.- Returns:
- the value of the
compilerrecord component
-
sourceFileCache
Returns the value of thesourceFileCacherecord component.- Returns:
- the value of the
sourceFileCacherecord component
-
muteReportedErrors
public boolean muteReportedErrors()Returns the value of themuteReportedErrorsrecord component.- Returns:
- the value of the
muteReportedErrorsrecord component
-
compilationResult
Returns the value of thecompilationResultrecord component.- Returns:
- the value of the
compilationResultrecord component
-