Class ApplicationClassGenerator
java.lang.Object
org.ek9lang.compiler.backend.jvm.ApplicationClassGenerator
Generates a single global
_Application JVM class from application registrations.
This is a dumb static struct — no methods, no <clinit>. Just public static fields
where each field stores a registered component or service. Field name is the mangled FQN
of the registered-as type.
The _Application class is a global singleton at the root level (no module prefix).
Only one program runs per runtime, so there is exactly one _Application class.
Injection sites can access it via GETSTATIC without knowing which application
or module populated the fields.
This is the JVM-specific backend for application code generation, called by
CodeGenerationApplications. LLVM backend would have its own equivalent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(List<AggregateSymbol> applications, File outputDirectory) Generate the global _Application.class file.
-
Constructor Details
-
ApplicationClassGenerator
-
-
Method Details
-
generate
Generate the global _Application.class file. Only one program runs per runtime, so this is a root-level singleton.- Parameters:
applications- all application symbols across all modulesoutputDirectory- the base output directory for generated class files
-