There are two ways to load a generated context class at runtime:
The com.aurorasoftworks.signal.runtime.core.context.ContextClassLoader
class can be used directly, for example:
IContext ctx = ContextClassLoader.getInstance().loadContext("some.package.SomeContext");
Alternatively, the context can be loaded by subclassing
com.aurorasoftworks.signal.runtime.ui.mvc.ApplicationMIDlet,
for example:
public class ContextMIDlet extends ApplicationMIDlet
{
public ContextMIDlet() throws Exception
{
super("some.package.SomeContext");
IContext ctx = super.getContext();
}
}
Once a reference to an context object is established the
com.aurorasoftworks.signal.runtime.core.context.IContext.getBean
method can be used to retrieve beans.
For more information refer to the Context API
Javadoc
and the signal.examples.context subproject in the source distribution.