Class Field
java.lang.Object
org.ek9lang.compiler.ir.Field
- All Implemented Interfaces:
INode
Represents a field/property declaration in an EK9 construct (class, record, component, etc.).
Note that this also include 'capture' variables in dynamic classes and dynamic functions.
Fields are structural declarations that define the data members of a construct, separate from the behavioral operations (methods). They map directly to: - JVM: Field declarations in .class files - LLVM: Member declarations in struct types
Unlike REFERENCE instructions which declare runtime variable storage, Field IR represents compile-time structural metadata about the construct's layout.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(INodeVisitor visitor) Get debug information for this field.getName()
Get the field name.Get the symbol representing this field.Get the fully qualified type name.toString()
-
Constructor Details
-
Field
Create a new Field IR node.- Parameters:
symbol
- The VariableSymbol representing this property fieldname
- The field name (e.g., "aField")typeName
- The fully qualified type name (e.g., "org.ek9.lang::String")debugInfo
- Source location information
-
-
Method Details
-
getSymbol
Get the symbol representing this field.- Returns:
- The underlying VariableSymbol
-
getName
-
getTypeName
Get the fully qualified type name.- Returns:
- The type name (e.g., "org.ek9.lang::String")
-
getDebugInfo
Get debug information for this field.- Returns:
- Debug info containing source location, or null if not available
-
accept
-
toString
-