java.lang.Object
java.lang.Record
org.aya.cli.single.SingleFileCompiler
public record SingleFileCompiler(@NotNull org.aya.util.reporter.Reporter reporter, @Nullable org.aya.util.error.SourceFileLocator locator, org.aya.tyck.trace.Trace.Builder builder)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSingleFileCompiler(@NotNull org.aya.util.reporter.Reporter reporter, @Nullable org.aya.util.error.SourceFileLocator locator, org.aya.tyck.trace.Trace.Builder builder) Creates an instance of aSingleFileCompilerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.aya.tyck.trace.Trace.Builderbuilder()Returns the value of thebuilderrecord component.<E extends IOException>
intcompile(@NotNull Path sourceFile, @NotNull Function<org.aya.util.reporter.Reporter, org.aya.resolve.context.ModuleContext> context, @NotNull CompilerFlags flags, @Nullable org.aya.resolve.ModuleCallback<E> moduleCallback) <E extends IOException>
intcompile(@NotNull Path sourceFile, @NotNull CompilerFlags flags, @Nullable org.aya.resolve.ModuleCallback<E> moduleCallback) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable org.aya.util.error.SourceFileLocatorlocator()Returns the value of thelocatorrecord component.@NotNull org.aya.util.reporter.Reporterreporter()Returns the value of thereporterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SingleFileCompiler
public SingleFileCompiler(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable @Nullable org.aya.util.error.SourceFileLocator locator, @Nullable org.aya.tyck.trace.Trace.Builder builder) Creates an instance of aSingleFileCompilerrecord class.- Parameters:
reporter- the value for thereporterrecord componentlocator- the value for thelocatorrecord componentbuilder- the value for thebuilderrecord component
-
-
Method Details
-
compile
public <E extends IOException> int compile(@NotNull @NotNull Path sourceFile, @NotNull @NotNull CompilerFlags flags, @Nullable @Nullable org.aya.resolve.ModuleCallback<E> moduleCallback) throws IOException - Throws:
IOException
-
compile
public <E extends IOException> int compile(@NotNull @NotNull Path sourceFile, @NotNull @NotNull Function<org.aya.util.reporter.Reporter, org.aya.resolve.context.ModuleContext> context, @NotNull @NotNull CompilerFlags flags, @Nullable @Nullable org.aya.resolve.ModuleCallback<E> moduleCallback) throws IOException- Throws:
IOException
-
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). -
reporter
@NotNull public @NotNull org.aya.util.reporter.Reporter reporter()Returns the value of thereporterrecord component.- Returns:
- the value of the
reporterrecord component
-
locator
@Nullable public @Nullable org.aya.util.error.SourceFileLocator locator()Returns the value of thelocatorrecord component.- Returns:
- the value of the
locatorrecord component
-
builder
@Nullable public org.aya.tyck.trace.Trace.Builder builder()Returns the value of thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-