java.lang.Object
java.lang.Record
org.aya.resolve.context.EmptyContext
- All Implemented Interfaces:
Context
public record EmptyContext(@NotNull org.aya.util.reporter.Reporter reporter, @NotNull Path underlyingFile)
extends Record
implements Context
- API Note:
- in each file's dependency tree there should be one and only one EmptyContext which is also the tree root.
- Implementation Note:
- EmptyContext is the context storing the underlying file, and its Reporter in the resolving stage.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.resolve.context.Context
Context.ResolvingInterruptedException -
Field Summary
Fields inherited from interface org.aya.resolve.context.Context
TOP_LEVEL_MOD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionEmptyContext(@NotNull org.aya.util.reporter.Reporter reporter, @NotNull Path underlyingFile) Creates an instance of aEmptyContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getModuleLocalMaybe(@NotNull kala.collection.immutable.ImmutableSeq<String> modName) @Nullable AnyVargetQualifiedLocalMaybe(@NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> modName, @NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) @Nullable AnyVargetUnqualifiedLocalMaybe(@NotNull String name, @NotNull org.aya.util.error.SourcePos sourcePos) final inthashCode()Returns a hash code value for this object.@Nullable Contextparent()@NotNull org.aya.util.reporter.Reporterreporter()Returns the value of thereporterrecord component.final StringtoString()Returns a string representation of this record class.@NotNull PathReturns the value of theunderlyingFilerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.resolve.context.Context
bind, bind, bind, collect, derive, derive, get, getMaybe, getModuleMaybe, getQualified, getQualified, getQualifiedMaybe, getQualifiedMaybe, getUnqualified, getUnqualifiedMaybe, iterate, moduleName, reportAndThrow
-
Constructor Details
-
EmptyContext
public EmptyContext(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull Path underlyingFile) Creates an instance of aEmptyContextrecord class.- Parameters:
reporter- the value for thereporterrecord componentunderlyingFile- the value for theunderlyingFilerecord component
-
-
Method Details
-
parent
-
getUnqualifiedLocalMaybe
@Nullable public @Nullable AnyVar getUnqualifiedLocalMaybe(@NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) - Specified by:
getUnqualifiedLocalMaybein interfaceContext
-
getQualifiedLocalMaybe
@Nullable public @Nullable AnyVar getQualifiedLocalMaybe(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<@NotNull String> modName, @NotNull @NotNull String name, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos) - Specified by:
getQualifiedLocalMaybein interfaceContext
-
getModuleLocalMaybe
@Nullable public @Nullable kala.collection.mutable.MutableMap<String,AnyVar> getModuleLocalMaybe(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<String> modName) - Specified by:
getModuleLocalMaybein interfaceContext
-
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. -
underlyingFile
Returns the value of theunderlyingFilerecord component.- Specified by:
underlyingFilein interfaceContext- Returns:
- the value of the
underlyingFilerecord component
-