Packageorg.spicefactory.parsley.runtime
Classpublic class RuntimeContextBuilder
InheritanceRuntimeContextBuilder Inheritance Object

Static entry point methods for building a Context from existing instances. The 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.



Public Methods
 MethodDefined By
  
build(instances:Array, viewRoot:DisplayObject = null):Context
[static] Builds a Context that only contains the specified existing instances.
RuntimeContextBuilder
Method Detail
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

Returns
Context — a new Context instance, possibly not fully initialized yet