Package | org.spicefactory.parsley.core.lifecycle |
Interface | public interface ManagedObject |
Property | Defined By | ||
---|---|---|---|
context : Context [read-only]
The Context that managed this object. | ManagedObject | ||
definition : ObjectDefinition [read-only]
The definition the object was created from or the definition that
was applied to an existing instance. | ManagedObject | ||
instance : Object [read-only]
The actual managed instance. | ManagedObject |
Method | Defined By | ||
---|---|---|---|
resolveObjectReference(definition:ObjectDefinition):Object
Resolves the reference to the object with the specified definition, potentially synchronizing
its lifecycle to the lifecycle of this managed object in case the definition is a
DynamicObjectDefinition. | ManagedObject | ||
resolveValue(value:*):*
Resolves the specified value from the perspective of this managed object. | ManagedObject |
context | property |
context:Context
[read-only] The Context that managed this object.
public function get context():Context
definition | property |
definition:ObjectDefinition
[read-only] The definition the object was created from or the definition that was applied to an existing instance.
public function get definition():ObjectDefinition
instance | property |
instance:Object
[read-only] The actual managed instance.
public function get instance():Object
resolveObjectReference | () | method |
public function resolveObjectReference(definition:ObjectDefinition):Object
Resolves the reference to the object with the specified definition, potentially synchronizing its lifecycle to the lifecycle of this managed object in case the definition is a DynamicObjectDefinition.
Parameters
definition:ObjectDefinition — the definition to resolve
|
Object — the resolved object
|
resolveValue | () | method |
public function resolveValue(value:*):*
Resolves the specified value from the perspective of this managed object. This means that object references are fetched from the context this object belongs to and also that any reference that points to a dynamic object definition will automatically get its lifecycle synchronized with this object. The result is that the reference will be removed from the Context as soon as the object represented by this ManagedObject instance will be removed. If the reference points to a singleton object definition then the object is managed by the Context until the Context gets destroyed.
This method is primarily used for values to be injected into this object.
Parameters
value:* — the value to resolve
|
* — the resolved value
|