Package | org.spicefactory.parsley.runtime |
Class | public class RuntimeContextBuilder |
Inheritance | RuntimeContextBuilder Object |
build
method will very likely be rarely used as it is usually
not recommended to determine all context objects at runtime.
But the merge
method may be useful for adding individual existing
instances to otherwise static configuration artifacts.
This class may also be useful in UnitTests.
These static entry points only allow to add existing instances without specifying
an id or any further configuration, so only metadata will be processed.
For more options and more fine-grained control the RuntimeConfigurationProcessor
should be used directly and then added to a CompositeContextBuilder
.
For details see 3.5 Runtime Configuration in the Parsley Manual.
Method | Defined By | ||
---|---|---|---|
[static]
Builds a Context that only contains the specified existing instances. | RuntimeContextBuilder |
build | () | method |
public static function build(instances:Array, viewRoot:DisplayObject = null):Context
Builds a Context that only contains the specified existing instances.
The returned Context instance may not be fully initialized if it requires asynchronous operations.
You can check its state with its configured
and initialized
properties.
Parameters
instances:Array — the instances to include in the Context
| |
viewRoot:DisplayObject (default = null ) — the initial view root for dynamically wiring view objects
|
Context — a new Context instance, possibly not fully initialized yet
|