| Package | org.spicefactory.parsley.dsl.core.impl |
| Class | public class DefaultMethodBuilder |
| Inheritance | DefaultMethodBuilder AbstractParameterBuilder Object |
| Implements | MethodBuilder, ObjectDefinitionBuilderPart |
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance. | DefaultMethodBuilder | ||
apply(target:ObjectDefinition):void
Applies this builder part to the final definition
| DefaultMethodBuilder | ||
Configures this method as a command executor. | DefaultMethodBuilder | ||
Configures this method as a command complete handler. | DefaultMethodBuilder | ||
Configures this method as a command error handler. | DefaultMethodBuilder | ||
Configures this method as a command result handler. | DefaultMethodBuilder | ||
destroyMethod():void
Configures this method to be invoked when the object has been removed from the Context or
the Context gets destroyed. | DefaultMethodBuilder | ||
factory():void
Configures this method as a factory method that produces the actual target
instance to be made available for injection. | DefaultMethodBuilder | ||
initMethod():void
Configures this method to be invoked after the object has been fully intialized. | DefaultMethodBuilder | ||
injectAllByType():void
Instructs the container to inject the matching object for all
parameters of this method. | DefaultMethodBuilder | ||
injectById(id:String):MethodBuilder
Adds a reference by id to another object in the registry to the list of method parameters. | DefaultMethodBuilder | ||
injectByType(type:Class = null):MethodBuilder
Adds a reference by type to another object in the registry to the list of method parameters. | DefaultMethodBuilder | ||
Adds a definition of an object to be created at runtime to the list of method parameters. | DefaultMethodBuilder | ||
Configures this method as a message error handler. | DefaultMethodBuilder | ||
Configures this method as a message handler. | DefaultMethodBuilder | ||
| DefaultMethodBuilder | |||
Configures this method as an object lifecycle observer. | DefaultMethodBuilder | ||
value(value:*):MethodBuilder
Adds a value to the list of method parameters. | DefaultMethodBuilder | ||
| DefaultMethodBuilder | () | Constructor |
public function DefaultMethodBuilder(method:Method, context:ObjectDefinitionContext)Creates a new instance.
Parametersmethod:Method — the method to configure
| |
context: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
|
| command | () | method |
public function command():MessageHandlerBuilderConfigures this method as a command executor. The builder returned by this method should be used to specify further options for the command.
ReturnsMessageHandlerBuilder — a builder to specify the options for the command
|
| commandComplete | () | method |
public function commandComplete():MessageReceiverBuilderConfigures this method as a command complete handler. The builder returned by this method should be used to specify further options for the command complete handler.
ReturnsMessageReceiverBuilder — a builder to specify the options for the command complete handler
|
| commandError | () | method |
public function commandError():MessageReceiverBuilderConfigures this method as a command error handler. The builder returned by this method should be used to specify further options for the command error handler.
ReturnsMessageReceiverBuilder — a builder to specify the options for the command error handler
|
| commandResult | () | method |
public function commandResult():MessageReceiverBuilderConfigures this method as a command result handler. The builder returned by this method should be used to specify further options for the command result handler.
ReturnsMessageReceiverBuilder — a builder to specify the options for the command result handler
|
| destroyMethod | () | method |
public function destroyMethod():void
Configures this method to be invoked when the object has been removed from the Context or
the Context gets destroyed.
This is equivalent of using the [Destroy]
metadata tag above the method in the class definition.
| factory | () | method |
public function factory():void
Configures this method as a factory method that produces the actual target
instance to be made available for injection. This is equivalent of using the [Factory]
metadata tag above the method in the class definition. The type of the target instance
will be deduced by reflecting on the return type of the method. Thus feature
cannot be used to create a generic factory with Object as the return
type. In such a case you should look into writing a custom RootConfigurationElement.
| initMethod | () | method |
public function initMethod():void
Configures this method to be invoked after the object has been fully intialized.
This is equivalent of using the [Init]
metadata tag above the method in the class definition.
| injectAllByType | () | method |
public function injectAllByType():voidInstructs the container to inject the matching object for all parameters of this method. Parameter types will be deduced by reflecting on the method's signature.
| injectById | () | method |
public function injectById(id:String):MethodBuilderAdds a reference by id to another object in the registry to the list of method parameters.
Parameters
id:String — the id of the referenced object
|
MethodBuilder — this builder for method chaining
|
| injectByType | () | method |
public function injectByType(type:Class = null):MethodBuilderAdds a reference by type to another object in the registry to the list of method parameters. If the type parameter is omitted it will be deduced by reflecting on the method'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
|
MethodBuilder — this builder for method chaining
|
| injectFromDefinition | () | method |
public function injectFromDefinition(definition:DynamicObjectDefinition):MethodBuilderAdds a definition of an object to be created at runtime to the list of method parameters. For each injection a new instance will be created from that definition.
Parameters
definition:DynamicObjectDefinition — the definition of the object
|
MethodBuilder — this builder for method chaining
|
| messageError | () | method |
public function messageError():MessageErrorBuilderConfigures this method as a message error handler. The builder returned by this method should be used to specify further options for the error handler.
ReturnsMessageErrorBuilder — a builder to specify the options for the message error handler
|
| messageHandler | () | method |
public function messageHandler():MessageHandlerBuilderConfigures this method as a message handler. The builder returned by this method should be used to specify further options for the handler.
ReturnsMessageHandlerBuilder — a builder to specify the options for the message handler
|
| messageInterceptor | () | method |
| observe | () | method |
public function observe():ObserveMethodBuilderConfigures this method as an object lifecycle observer. The builder returned by this method should be used to specify further options for the observer.
ReturnsObserveMethodBuilder — a builder to specify the options for the observer
|
| value | () | method |
public function value(value:*):MethodBuilder
Adds a value to the list of method parameters. 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 method.
Parameters
value:* — the value to add
|
MethodBuilder — this builder for method chaining
|