| Package | org.spicefactory.parsley.dsl.core.impl |
| Class | public class DefaultConstructorBuilder |
| Inheritance | DefaultConstructorBuilder AbstractParameterBuilder Object |
| Implements | ConstructorBuilder, ObjectDefinitionBuilderPart |
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance. | DefaultConstructorBuilder | ||
apply(target:ObjectDefinition):void
Applies this builder part to the final definition
| DefaultConstructorBuilder | ||
injectAllByType():void
Instructs the container to inject the matching object for all
parameters of this constructor. | DefaultConstructorBuilder | ||
injectById(id:String):ConstructorBuilder
Adds a reference by id to another object in the registry to the list of constructor arguments. | DefaultConstructorBuilder | ||
injectByType(type:Class = null):ConstructorBuilder
Adds a reference by type to another object in the registry to the list of constructor arguments. | DefaultConstructorBuilder | ||
Adds a definition of an object to be created at runtime to the list of constructor arguments. | DefaultConstructorBuilder | ||
value(value:*):ConstructorBuilder
Adds a value to the list of constructor arguments. | DefaultConstructorBuilder | ||
| DefaultConstructorBuilder | () | Constructor |
public function DefaultConstructorBuilder(context:ObjectDefinitionContext)Creates a new instance.
Parameterscontext:ObjectDefinitionContext — the context for this builder
|
| apply | () | method |
public function apply(target:ObjectDefinition):voidApplies this builder part to the final definition
Parameters
target:ObjectDefinition — the final definition to apply this part to
|
| injectAllByType | () | method |
public function injectAllByType():voidInstructs the container to inject the matching object for all parameters of this constructor. Parameter types will be deduced by reflecting on the constructor's signature.
| injectById | () | method |
public function injectById(id:String):ConstructorBuilderAdds a reference by id to another object in the registry to the list of constructor arguments.
Parameters
id:String — the id of the referenced object
|
ConstructorBuilder — this builder for method chaining
|
| injectByType | () | method |
public function injectByType(type:Class = null):ConstructorBuilderAdds a reference by type to another object in the registry to the list of constructor arguments. If the type parameter is omitted it will be deduced by reflecting on the constructor's signature. Using this feature requires that only one object of a matching type is regisrered for the Context.
Parameters
type:Class (default = null) — the type of the referenced object
|
ConstructorBuilder — this builder for method chaining
|
| injectFromDefinition | () | method |
public function injectFromDefinition(definition:DynamicObjectDefinition):ConstructorBuilderAdds a definition of an object to be created at runtime to the list of constructor arguments. For each injection a new instance will be created from that definition.
Parameters
definition:DynamicObjectDefinition — the definition of the object
|
ConstructorBuilder — this builder for method chaining
|
| value | () | method |
public function value(value:*):ConstructorBuilder
Adds a value to the list of constructor arguments. This may be a simple value
or an instance that implements ResolvableValue to be resolved
at the time the value will be injected into the constructor.
Parameters
value:* — the value to add
|
ConstructorBuilder — this builder for method chaining
|