Record Class CaptureEvaluationScope.OuterField
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase3.CaptureEvaluationScope.OuterField
- Enclosing class:
CaptureEvaluationScope
static record CaptureEvaluationScope.OuterField(ISymbol field, boolean fromDynamicClass, boolean denied)
extends Record
A field of the code around a dynamic body, whether that body is a dynamic class's (else a function's), and
whether the code around it is itself denied the field (a super's property, D81).
-
Constructor Summary
ConstructorsConstructorDescriptionOuterField(ISymbol field, boolean fromDynamicClass, boolean denied) Creates an instance of aOuterFieldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandenied()Returns the value of thedeniedrecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.booleanReturns the value of thefromDynamicClassrecord component.final inthashCode()Returns a hash code value for this object.(package private) Stringmessage()The error text: the body cannot read it directly - capture it (shared) or capture a copy.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OuterField
OuterField(ISymbol field, boolean fromDynamicClass, boolean denied) Creates an instance of aOuterFieldrecord class.- Parameters:
field- the value for thefieldrecord componentfromDynamicClass- the value for thefromDynamicClassrecord componentdenied- the value for thedeniedrecord component
-
-
Method Details
-
message
String message()The error text: the body cannot read it directly - capture it (shared) or capture a copy. A field the code around the body cannot reach either (a super's property) is the same denial as naming it there. -
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
fromDynamicClass
public boolean fromDynamicClass()Returns the value of thefromDynamicClassrecord component.- Returns:
- the value of the
fromDynamicClassrecord component
-
denied
public boolean denied()Returns the value of thedeniedrecord component.- Returns:
- the value of the
deniedrecord component
-