java.lang.Object
java.lang.Record
org.aya.resolve.context.BindContext
- All Implemented Interfaces:
Context
public record BindContext(@NotNull Context parent, @NotNull String name, @NotNull LocalVar ref)
extends Record
implements Context
Introduces a locally bound variable to the context.
-
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
ConstructorsConstructorDescriptionBindContext(@NotNull Context parent, @NotNull String name, @NotNull LocalVar ref) Creates an instance of aBindContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionkala.collection.mutable.MutableList<LocalVar>final 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.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Contextparent()Returns the value of theparentrecord component.@NotNull LocalVarref()Returns the value of therefrecord component.@NotNull org.aya.util.reporter.Reporterreporter()final StringtoString()Returns a string representation of this record class.@NotNull PathMethods 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, derive, derive, get, getMaybe, getModuleMaybe, getQualified, getQualified, getQualifiedMaybe, getQualifiedMaybe, getUnqualified, getUnqualifiedMaybe, iterate, moduleName, reportAndThrow
-
Constructor Details
-
BindContext
public BindContext(@NotNull @NotNull Context parent, @NotNull @NotNull String name, @NotNull @NotNull LocalVar ref) Creates an instance of aBindContextrecord class.- Parameters:
parent- the value for theparentrecord componentname- the value for thenamerecord componentref- the value for therefrecord component
-
-
Method Details
-
parent
Returns the value of theparentrecord component. -
reporter
@NotNull public @NotNull org.aya.util.reporter.Reporter reporter() -
underlyingFile
- Specified by:
underlyingFilein interfaceContext
-
collect
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
ref
Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-