Package | org.spicefactory.parsley.core.builder |
Interface | public interface SingletonBuilder |
Implementors | DefaultSingletonBuilder |
Method | Defined By | ||
---|---|---|---|
Builds and returns the final definition without registering it. | SingletonBuilder | ||
decorators(value:Array):SingletonBuilder
Sets the additional decorators that should be processed for the definition. | SingletonBuilder | ||
id(value:String):SingletonBuilder
Sets the (optional) id the object should be registered with. | SingletonBuilder | ||
lazy(value:Boolean):SingletonBuilder
Specifies whether this object should be lazily initialized. | SingletonBuilder | ||
order(value:int):SingletonBuilder
Sets the initialization order value for this object. | SingletonBuilder | ||
Builds, registers and returns the final definition. | SingletonBuilder |
build | () | method |
public function build():SingletonObjectDefinition
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.
ReturnsSingletonObjectDefinition — the final definition produced by this builder
|
decorators | () | method |
public function decorators(value:Array):SingletonBuilder
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
|
SingletonBuilder — this builder for method chaining
|
id | () | method |
public function id(value:String):SingletonBuilder
Sets the (optional) id the object should be registered with.
Parameters
value:String — the id the object should be registered with
|
SingletonBuilder — this builder for method chaining
|
lazy | () | method |
public function lazy(value:Boolean):SingletonBuilder
Specifies whether this object should be lazily initialized. If set to false the object will be instantiated upon Context initialization.
Parameters
value:Boolean — whether this object should be lazily initialized
|
SingletonBuilder — this builder for method chaining
|
order | () | method |
public function order(value:int):SingletonBuilder
Sets the initialization order value for this object.
Will be processed in ascending order.
The default value is int.MAX_VALUE
.
Parameters
value:int — the initialization order value for this object
|
SingletonBuilder — this builder for method chaining
|
register | () | method |
public function register():SingletonObjectDefinition
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.
SingletonObjectDefinition — the final definition produced by this builder
|