| Package | org.spicefactory.parsley.core.builder |
| Interface | public interface ObjectDefinitionBuilder |
| Implementors | DefaultObjectDefinitionBuilder |
| Property | Defined By | ||
|---|---|---|---|
| registry : ObjectDefinitionRegistry [read-only]
The registry associated with this builder. | ObjectDefinitionBuilder | ||
| typeInfo : ClassInfo [read-only]
The type of object to be created by this builder. | ObjectDefinitionBuilder | ||
| Method | Defined By | ||
|---|---|---|---|
Allows to specify options for a dynamic object and to build and register the final definition. | ObjectDefinitionBuilder | ||
Allows to specify options for a singleton object and to build and register the final definition. | ObjectDefinitionBuilder | ||
Sets this object as asynchronously initializing. | ObjectDefinitionBuilder | ||
constructorArgs(... args):ObjectDefinitionBuilder
Allows to specify injections or simple values to be passed
to the constructor when the target instance gets instantiated. | ObjectDefinitionBuilder | ||
Sets the object responsible for creating instances from this definition. | ObjectDefinitionBuilder | ||
method(name:String):MethodBuilder
Allows to specify injections or other features for a single method
| ObjectDefinitionBuilder | ||
Adds a processor for the objects configured by this definition. | ObjectDefinitionBuilder | ||
property(name:String):PropertyBuilder
Allows to specify injections or other features for a single property
| ObjectDefinitionBuilder | ||
Sets the instance that will replace (or wrap) the final object definition. | ObjectDefinitionBuilder | ||
| registry | property |
registry:ObjectDefinitionRegistry [read-only] The registry associated with this builder.
public function get registry():ObjectDefinitionRegistry| typeInfo | property |
typeInfo:ClassInfo [read-only] The type of object to be created by this builder.
public function get typeInfo():ClassInfo| asDynamicObject | () | method |
public function asDynamicObject():DynamicObjectBuilderAllows to specify options for a dynamic object and to build and register the final definition. In contrast to a registered singleton, a dynamic object can spawn multiple instances from the same definition and get removed from the Context.
ReturnsDynamicObjectBuilder — a builder that allows to specify options for a dynamic object object
and to build and register the final definition
|
| asSingleton | () | method |
public function asSingleton():SingletonBuilderAllows to specify options for a singleton object and to build and register the final definition.
ReturnsSingletonBuilder — a builder that allows to specify options for a singleton object and to build and register the final definition
|
| asyncInit | () | method |
public function asyncInit():AsyncInitBuilderSets this object as asynchronously initializing. Such an object will not be considered as fully initialized before it has thrown its complete event. Only has an effect for singleton definition.
ReturnsAsyncInitBuilder — a builder for asynchronous object initialization in case custom event types need to be specified
|
| constructorArgs | () | method |
public function constructorArgs(... args):ObjectDefinitionBuilderAllows to specify injections or simple values to be passed to the constructor when the target instance gets instantiated.
Parameters
... args |
ObjectDefinitionBuilder — this builder for method chaining
|
| instantiate | () | method |
public function instantiate(value:ObjectInstantiator):ObjectDefinitionBuilderSets the object responsible for creating instances from this definition.
Parameters
value:ObjectInstantiator — the object responsible for creating instances from this definition.
|
ObjectDefinitionBuilder — this builder for method chaining
|
| method | () | method |
public function method(name:String):MethodBuilderAllows to specify injections or other features for a single method
Parameters
name:String — the name of the method
|
MethodBuilder — a builder that allows to specify injections or other features for a single method
|
| process | () | method |
public function process(processor:ObjectProcessor):ObjectProcessorBuilderAdds a processor for the objects configured by this definition.
Parameters
processor:ObjectProcessor — the object processor to add
|
ObjectProcessorBuilder — a builder for configuring the processor
|
| property | () | method |
public function property(name:String):PropertyBuilderAllows to specify injections or other features for a single property
Parameters
name:String — the name of the property
|
PropertyBuilder — a builder that allows to specify injections or other features for a single property
|
| replace | () | method |
public function replace(replacer:ObjectDefinitionReplacer):ObjectDefinitionBuilderSets the instance that will replace (or wrap) the final object definition. This is an advanced feature. From all the builtin tags only the Factory tag uses this hook.
Parameters
replacer:ObjectDefinitionReplacer — the instance that will replace the final object definition
|
ObjectDefinitionBuilder — this builder for method chaining
|