java.lang.Object
java.lang.Record
org.aya.core.visitor.PatTraversal.MetaBind
- All Implemented Interfaces:
Function<Pat,,Pat> PatTraversal,PatTraversal.NoMeta
- Enclosing interface:
PatTraversal
public static record PatTraversal.MetaBind(@NotNull Subst subst, @NotNull org.aya.util.error.SourcePos definition)
extends Record
implements PatTraversal.NoMeta
subst all binding to corresponding MetaPat
TODO[hoshino]: A PatTraversal or a method of Pat?
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.core.visitor.PatTraversal
PatTraversal.MetaBind, PatTraversal.NoMeta -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.aya.util.error.SourcePosReturns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Pat@NotNull Substsubst()Returns the value of thesubstrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.core.visitor.PatTraversal
apply, preMethods inherited from interface org.aya.core.visitor.PatTraversal.NoMeta
descent
-
Constructor Details
-
MetaBind
public MetaBind(@NotNull @NotNull Subst subst, @NotNull @NotNull org.aya.util.error.SourcePos definition) Creates an instance of aMetaBindrecord class.- Parameters:
subst- the value for thesubstrecord componentdefinition- the value for thedefinitionrecord component
-
-
Method Details
-
post
- Specified by:
postin interfacePatTraversal
-
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). -
subst
Returns the value of thesubstrecord component.- Returns:
- the value of the
substrecord component
-
definition
@NotNull public @NotNull org.aya.util.error.SourcePos definition()Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-