Class PropertyAccessedDirectly
java.lang.Object
org.ek9lang.compiler.support.PropertyAccessedDirectly
- All Implemented Interfaces:
BiPredicate<EK9Parser.ObjectAccessExpressionContext, Predicate<EK9Parser.ObjectAccessStartContext>>
public final class PropertyAccessedDirectly
extends Object
implements BiPredicate<EK9Parser.ObjectAccessExpressionContext, Predicate<EK9Parser.ObjectAccessStartContext>>
THE parse half of "is this a property of the object whose code is running?" (
OwnProperty is the symbol
half): the form this.prop (or alias.prop when the caller's receiver test accepts the start), one
step from the receiver, never through a further property or a call, which reach another object.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Predicate<EK9Parser.ObjectAccessStartContext> The receiver test when onlythisitself will do. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(EK9Parser.ObjectAccessExpressionContext objectAccessExpression, Predicate<EK9Parser.ObjectAccessStartContext> receiverTest) True when the object access is a single property step (start.prop, no further access, no call) from a start the receiver test accepts -THIS_RECEIVERforthis.proponly.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Field Details
-
THIS_RECEIVER
The receiver test when onlythisitself will do.
-
-
Constructor Details
-
PropertyAccessedDirectly
public PropertyAccessedDirectly()
-
-
Method Details
-
test
public boolean test(EK9Parser.ObjectAccessExpressionContext objectAccessExpression, Predicate<EK9Parser.ObjectAccessStartContext> receiverTest) True when the object access is a single property step (start.prop, no further access, no call) from a start the receiver test accepts -THIS_RECEIVERforthis.proponly.- Specified by:
testin interfaceBiPredicate<EK9Parser.ObjectAccessExpressionContext, Predicate<EK9Parser.ObjectAccessStartContext>>
-