java.lang.Object
java.lang.Record
org.aya.ide.Resolver.UsageResolver
- All Implemented Interfaces:
Function<org.aya.concrete.stmt.Stmt,,kala.collection.SeqView<org.aya.util.error.SourcePos>> org.aya.concrete.visitor.ExprFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>,org.aya.concrete.visitor.PatternFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>,org.aya.concrete.visitor.StmtFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>
- Enclosing interface:
Resolver
public static record Resolver.UsageResolver(@NotNull org.aya.ref.AnyVar target)
extends Record
implements org.aya.concrete.visitor.StmtFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>
This class finds usages of a variable. So we only traverse variable references.
-
Constructor Summary
ConstructorsConstructorDescriptionUsageResolver(@NotNull org.aya.ref.AnyVar target) Creates an instance of aUsageResolverrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull kala.collection.SeqView<org.aya.util.error.SourcePos>foldVarRef(@NotNull kala.collection.SeqView<org.aya.util.error.SourcePos> refs, @NotNull org.aya.ref.AnyVar var, @NotNull org.aya.util.error.SourcePos pos, @NotNull kala.value.LazyValue<org.aya.core.term.Term> type) final inthashCode()Returns a hash code value for this object.@NotNull kala.collection.SeqView<org.aya.util.error.SourcePos>init()@NotNull org.aya.ref.AnyVartarget()Returns the value of thetargetrecord 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.concrete.visitor.ExprFolder
fold, foldParamDecl, withTermTypeMethods inherited from interface org.aya.concrete.visitor.PatternFolder
apply, fold, foldVar, foldVarDecl, lazyType, noType, varTypeMethods inherited from interface org.aya.concrete.visitor.StmtFolder
apply, fold, fold, foldModuleDecl, foldModuleRef
-
Constructor Details
-
UsageResolver
public UsageResolver(@NotNull @NotNull org.aya.ref.AnyVar target) Creates an instance of aUsageResolverrecord class.- Parameters:
target- the value for thetargetrecord component
-
-
Method Details
-
init
@NotNull public @NotNull kala.collection.SeqView<org.aya.util.error.SourcePos> init()- Specified by:
initin interfaceorg.aya.concrete.visitor.ExprFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>- Specified by:
initin interfaceorg.aya.concrete.visitor.PatternFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>
-
foldVarRef
@NotNull public @NotNull kala.collection.SeqView<org.aya.util.error.SourcePos> foldVarRef(@NotNull @NotNull kala.collection.SeqView<org.aya.util.error.SourcePos> refs, @NotNull @NotNull org.aya.ref.AnyVar var, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull kala.value.LazyValue<org.aya.core.term.Term> type) - Specified by:
foldVarRefin interfaceorg.aya.concrete.visitor.PatternFolder<kala.collection.SeqView<org.aya.util.error.SourcePos>>
-
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). -
target
@NotNull public @NotNull org.aya.ref.AnyVar target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-