Record Class LeafField
java.lang.Object
java.lang.Record
org.ek9lang.compiler.support.inputvariety.LeafField
- Record Components:
ownerTypeFullyQualifiedName- the record type declaring the field (the value on the stack)fieldName- the field to readfieldTypeFullyQualifiedName- the field's declared type (the value left on the stack)
public record LeafField(String ownerTypeFullyQualifiedName, String fieldName, String fieldTypeFullyQualifiedName)
extends Record
One field step in a
LeafPath โ everything a backend needs to load that field from the value
on the stack, with no further symbol lookup.
A record is transparent (ยง4.5), so the input-variation numerator reads a record parameter's
fields rather than treating the record as one opaque value. The step carries exactly what a
LOAD_FIELD instruction needs โ owner, field, field type โ because the decomposition is
emitted as ordinary LOAD_FIELD IR rather than anything probe-specific. That keeps record
support entirely in the shared IR: every backend already implements field loads, so none of them
needs to learn about records for this feature.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldNamerecord component.Returns the value of thefieldTypeFullyQualifiedNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theownerTypeFullyQualifiedNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LeafField
public LeafField(String ownerTypeFullyQualifiedName, String fieldName, String fieldTypeFullyQualifiedName) Creates an instance of aLeafFieldrecord class.- Parameters:
ownerTypeFullyQualifiedName- the value for theownerTypeFullyQualifiedNamerecord componentfieldName- the value for thefieldNamerecord componentfieldTypeFullyQualifiedName- the value for thefieldTypeFullyQualifiedNamerecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
ownerTypeFullyQualifiedName
Returns the value of theownerTypeFullyQualifiedNamerecord component.- Returns:
- the value of the
ownerTypeFullyQualifiedNamerecord component
-
fieldName
-
fieldTypeFullyQualifiedName
Returns the value of thefieldTypeFullyQualifiedNamerecord component.- Returns:
- the value of the
fieldTypeFullyQualifiedNamerecord component
-