Module aya.base

Record Class Expr.Field

java.lang.Object
java.lang.Record
org.aya.concrete.Expr.Field
Record Components:
resolvedField - will be modified during tycking for LSP to function properly.
Enclosing interface:
Expr

public static record Expr.Field(@NotNull org.aya.util.error.WithPos<String> name, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.error.WithPos<LocalVar>> bindings, @NotNull Expr body, @NotNull kala.value.MutableValue<AnyVar> resolvedField) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Field(@NotNull org.aya.util.error.WithPos<String> name, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.error.WithPos<LocalVar>> bindings, @NotNull Expr body, @NotNull kala.value.MutableValue<AnyVar> resolvedField)
    Creates an instance of a Field record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.error.WithPos<LocalVar>>
    Returns the value of the bindings record component.
    @NotNull Expr
    Returns the value of the body record component.
    @NotNull Expr.Field
    descent(@NotNull UnaryOperator<@NotNull Expr> f)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull org.aya.util.error.WithPos<String>
    Returns the value of the name record component.
    @NotNull kala.value.MutableValue<AnyVar>
    Returns the value of the resolvedField record component.
    final String
    Returns a string representation of this record class.
    @NotNull Expr.Field
    update(@NotNull Expr body)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Field

      public Field(@NotNull @NotNull org.aya.util.error.WithPos<String> name, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.error.WithPos<LocalVar>> bindings, @NotNull @NotNull Expr body, @NotNull @NotNull kala.value.MutableValue<AnyVar> resolvedField)
      Creates an instance of a Field record class.
      Parameters:
      name - the value for the name record component
      bindings - the value for the bindings record component
      body - the value for the body record component
      resolvedField - the value for the resolvedField record component
  • Method Details

    • update

      @NotNull public @NotNull Expr.Field update(@NotNull @NotNull Expr body)
    • descent

      @NotNull public @NotNull Expr.Field descent(@NotNull @NotNull UnaryOperator<@NotNull Expr> f)
    • 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.
    • name

      @NotNull public @NotNull org.aya.util.error.WithPos<String> name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • bindings

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.error.WithPos<LocalVar>> bindings()
      Returns the value of the bindings record component.
      Returns:
      the value of the bindings record component
    • body

      @NotNull public @NotNull Expr body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • resolvedField

      @NotNull public @NotNull kala.value.MutableValue<AnyVar> resolvedField()
      Returns the value of the resolvedField record component.
      Returns:
      the value of the resolvedField record component