PlasticUser Guide
Plastic is a support library that aids Alien-Factory in the development of other libraries, frameworks and applications. Though you are welcome to use it, you may find features are missing and the documentation incomplete.
Overview
Plastic is a library for dynamically generating and compiling Fantom code.
Plastic is the cornerstone of IoC proxied services and Embedded Fantom (efan) templates.
Quick Start
model := PlasticClassModel("MyClass", true) model.addMethod(Str#, "greet", "Str name", """ "Hello \${name}!" """) model.toFantomCode// -->// const class MyClass {// new make(|This|? f := null) {// f?.call(this)// }//// sys::Str greet(Str name) {// "Hello ${name}!"// }// }myType := PlasticCompiler().compileModel(model) myType.make->greet("Mum")// --> Hello Mum!