Main entry point when you want to initialise the Ceylon system when you are not running JBoss modules and have all the relevant Ceylon libraries in your JVM classpath. This will allow you to initialize the metamodel with {@link Main#setupMetamodel()}, which you only need to do once before you execute code from a Ceylon module. Once initialized, the metamodel will remain useable until you reset it, from every thread and user of the system ClassLoader. You can repeatedly call {@link Main#setupMetamodel()} to add new Ceylon modules to the metamodel.
If you need to reset the metamodel you can call {@link Main#resetMetamodel()}, but again beware that the metamodel is static to the system ClassLoader, so it may be shared by other threads, and any Ceylon code that continues to run after you reset it will likely fail at some point.
You can also directly run Ceylon programs by using {@link Main#runModule(String,String,Class,String)}or {@link Main#runModule(String,String,String,String)}, which will first initialize the metamodel, then run the given Java Class’s main method (which sets up the process.arguments
and executes the given toplevel Ceylon class or method.
WARNING: this API is not supported and will be superseded by an official API later.
@author Stéphane Épardaud
|
|