Class MayBeExistingObject
java.lang.Object
org.ek9lang.compiler.support.sharing.MayBeExistingObject
- All Implemented Interfaces:
BiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
public final class MayBeExistingObject
extends Object
implements BiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
May the value of this expression BE an object that exists already - rather than a fresh one: a variable (not a
constant, which is read as a copy),
this/super, a call whose RETAINS says its result may be its
receiver's interior or an argument (MayAlias), or a coalescing operator's result or a
ternary's when EITHER operand may be (the result is one of them: the same route ObjectSharing follows for
the operand itself). Parentheses are looked through. A literal, a constructor call and a call that hands back
something fresh are not.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
MayBeExistingObject
public MayBeExistingObject()
-
-
Method Details
-
test
public boolean test(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) - Specified by:
testin interfaceBiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
-