Record Class FieldTarget
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.support.FieldTarget
- Record Components:
objectVar- the object (oftenthis)fieldName- the field's nameownerType- the fully qualified type that owns the fieldfieldType- the fully qualified type of the fieldfieldIndex- the field's index, orOwnershipInstr.NO_FIELD_INDEX
public record FieldTarget(String objectVar, String fieldName, String ownerType, String fieldType, int fieldIndex)
extends Record
A field as
STORE_FIELD describes it - the object, the field's name, the type that owns it, the field's type
and its index (or OwnershipInstr.NO_FIELD_INDEX where STORE_FIELD looks it up by name). What
VariableMemoryManagement.fieldAssigned(FieldTarget, String, OwnershipInstr.AssignMode, boolean, DebugInfo) stores into.-
Constructor Summary
ConstructorsConstructorDescriptionFieldTarget(String objectVar, String fieldName, String ownerType, String fieldType, int fieldIndex) Creates an instance of aFieldTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldTargetA field stored by name, without an index.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefieldIndexrecord component.Returns the value of thefieldNamerecord component.Returns the value of thefieldTyperecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theobjectVarrecord component.Returns the value of theownerTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FieldTarget
public FieldTarget(String objectVar, String fieldName, String ownerType, String fieldType, int fieldIndex) Creates an instance of aFieldTargetrecord class.- Parameters:
objectVar- the value for theobjectVarrecord componentfieldName- the value for thefieldNamerecord componentownerType- the value for theownerTyperecord componentfieldType- the value for thefieldTyperecord componentfieldIndex- the value for thefieldIndexrecord component
-
-
Method Details
-
byName
public static FieldTarget byName(String objectVar, String fieldName, String ownerType, String fieldType) A field stored by name, without an index. -
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. -
objectVar
-
fieldName
-
ownerType
-
fieldType
-
fieldIndex
public int fieldIndex()Returns the value of thefieldIndexrecord component.- Returns:
- the value of the
fieldIndexrecord component
-