Packageorg.spicefactory.parsley.core.processor.impl
Classpublic class DefaultObjectProcessorConfig
InheritanceDefaultObjectProcessorConfig Inheritance Object
Implements ObjectProcessorConfig

Default implementation of the ObjectProcessorConfig interface. The configuration instance encapsulates the target processor and clones it if necessary when prepareForNextTarget is invoked.



Public Properties
 PropertyDefined By
  destroyPhase : DestroyPhase
[read-only] The phase the processor should be invoked in when the target instance gets removed from the Context or the Context gets destroyed.
DefaultObjectProcessorConfig
  initPhase : InitPhase
[read-only] The phase the processor should be invoked in during initialization.
DefaultObjectProcessorConfig
  processor : ObjectProcessor
[read-only] The processor configured by this instance.
DefaultObjectProcessorConfig
  target : Member
[read-only] The target member (property or method) to get processed.
DefaultObjectProcessorConfig
Public Methods
 MethodDefined By
  
DefaultObjectProcessorConfig(processor:ObjectProcessor, init:InitPhase, destroy:DestroyPhase, target:Member = null, singleton:Boolean = false, initializer:Function = null)
Creates a new instance.
DefaultObjectProcessorConfig
  
Prepares a processor for the next target instance.
DefaultObjectProcessorConfig
Property Detail
destroyPhaseproperty
destroyPhase:DestroyPhase  [read-only]

The phase the processor should be invoked in when the target instance gets removed from the Context or the Context gets destroyed.


Implementation
    public function get destroyPhase():DestroyPhase
initPhaseproperty 
initPhase:InitPhase  [read-only]

The phase the processor should be invoked in during initialization.


Implementation
    public function get initPhase():InitPhase
processorproperty 
processor:ObjectProcessor  [read-only]

The processor configured by this instance.


Implementation
    public function get processor():ObjectProcessor
targetproperty 
target:Member  [read-only]

The target member (property or method) to get processed. May be null if the processor does not explitly deal with just one member of the target instance. The majority of built-in processors have this property set.


Implementation
    public function get target():Member
Constructor Detail
DefaultObjectProcessorConfig()Constructor
public function DefaultObjectProcessorConfig(processor:ObjectProcessor, init:InitPhase, destroy:DestroyPhase, target:Member = null, singleton:Boolean = false, initializer:Function = null)

Creates a new instance.

Parameters
processor:ObjectProcessor — the processor configured by this instance
 
init:InitPhase — the phase the processor should be invoked in during initialization
 
destroy:DestroyPhase — the phase the processor should be invoked in when the target gets removed from the Context
 
target:Member (default = null) — the member (property or method - if any) to get processed
 
singleton:Boolean (default = false) — whether the processor gets applied to a singleton definition
 
initializer:Function (default = null) — the initializer to call before handing out a new processor
Method Detail
prepareForNextTarget()method
public function prepareForNextTarget():ObjectProcessorConfig

Prepares a processor for the next target instance. This includes cloning the processor in case it is stateful and gets applied to a non-singleton object. Otherwise this instance may just return itself.

Returns
ObjectProcessorConfig — a processor for the next target instance