Module aya.base

Record Class ModuleExport

java.lang.Object
java.lang.Record
org.aya.resolve.context.ModuleExport

public record ModuleExport(@NotNull ModuleSymbol<DefVar<?,?>> symbols, @NotNull kala.collection.mutable.MutableMap<ModuleName.Qualified,ModuleExport> modules) extends Record
A data class that contains all public definitions/re-exports of some module.
  • Constructor Details

    • ModuleExport

      public ModuleExport()
    • ModuleExport

      public ModuleExport(@NotNull @NotNull ModuleExport that)
    • ModuleExport

      public ModuleExport(@NotNull @NotNull ModuleSymbol<DefVar<?,?>> symbols, @NotNull @NotNull kala.collection.mutable.MutableMap<ModuleName.Qualified,ModuleExport> modules)
      Creates an instance of a ModuleExport record class.
      Parameters:
      symbols - the value for the symbols record component
      modules - the value for the modules record component
  • Method Details

    • export

      public boolean export(@NotNull @NotNull ModuleName modName, @NotNull @NotNull String name, @NotNull @NotNull DefVar<?,?> ref)
      Returns:
      false if there already exist a symbol with the same name.
    • export

      public boolean export(@NotNull ModuleName.Qualified componentName, @NotNull @NotNull ModuleExport module)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • symbols

      @NotNull public @NotNull ModuleSymbol<DefVar<?,?>> symbols()
      Returns the value of the symbols record component.
      Returns:
      the value of the symbols record component
    • modules

      @NotNull public @NotNull kala.collection.mutable.MutableMap<ModuleName.Qualified,ModuleExport> modules()
      Returns the value of the modules record component.
      Returns:
      the value of the modules record component