Packageorg.spicefactory.parsley.core.builder
Interfacepublic interface DynamicObjectBuilder
Implementors DefaultDynamicObjectBuilder

Builder for a definition of a dynamic object. Such an object can be removed from the Context, either by application code or, in case of injections, by the container when the target object gets disposed.



Public Methods
 MethodDefined By
  
Builds and returns the final definition without registering it.
DynamicObjectBuilder
  
Sets the additional decorators that should be processed for the definition.
DynamicObjectBuilder
  
id(value:String):DynamicObjectBuilder
Sets the (optional) id the object should be registered with.
DynamicObjectBuilder
  
Builds, registers and returns the final definition.
DynamicObjectBuilder
Method Detail
build()method
public function build():DynamicObjectDefinition

Builds and returns the final definition without registering it. An object that does not get registered cannot be used for injection and cannot be retrieved through the Context API. But this definition can be used as a nested (inline) reference or adding it to the Context dynamically at a later point.

Returns
DynamicObjectDefinition — the final definition produced by this builder
decorators()method 
public function decorators(value:Array):DynamicObjectBuilder

Sets the additional decorators that should be processed for the definition. Since version 2.3 it is no longer recommended to programmatically create and apply decorators since the new configuration DSL provides a more convenient mechanism. This method should be used by tag implementations that allow to specify decorators as nested tags (like the root <Object> tag).

Parameters

value:Array — decorators that should be processed for the definition

Returns
DynamicObjectBuilder — this builder for method chaining
id()method 
public function id(value:String):DynamicObjectBuilder

Sets the (optional) id the object should be registered with.

Parameters

value:String — the id the object should be registered with

Returns
DynamicObjectBuilder — this builder for method chaining
register()method 
public function register():DynamicObjectDefinition

Builds, registers and returns the final definition. This method delegates to the build method to produce the final definition and then registers it with the underlying registry.

Returns
DynamicObjectDefinition — the final definition produced by this builder