Class CapturedCopy
java.lang.Object
org.ek9lang.compiler.support.CapturedCopy
- All Implemented Interfaces:
BiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>
public final class CapturedCopy
extends Object
implements BiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>
THE copy a dynamic function or class makes from one argument of its capture list (
CaptureAliases follows
these). Was RecordedSymbols.capturedCopy (no-statics lane S3, 2026-10-29).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded, EK9Parser.ExpressionParamContext param) The copy a dynamic function or class makes from one argument of its capture list -(acc)and(total: acc)both make a copy, namedaccandtotal- which shares the object the argument refers to.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
CapturedCopy
public CapturedCopy()
-
-
Method Details
-
apply
public Optional<ISymbol> apply(Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded, EK9Parser.ExpressionParamContext param) The copy a dynamic function or class makes from one argument of its capture list -(acc)and(total: acc)both make a copy, namedaccandtotal- which shares the object the argument refers to. Empty whenparamis not a capture argument or no copy is recorded.- Specified by:
applyin interfaceBiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>- Parameters:
recorded- the recorded-symbol lookup of the phase asking (symbolsAndScopes or parsedModule)param- one argument of a capture list
-