Packageorg.spicefactory.parsley.core.builder.ref
Classpublic class ObjectTypeReference
InheritanceObjectTypeReference Inheritance Object
Implements ResolvableValue
Subclasses ImplicitObjectTypeReference

Represent a reference to an object in the Parsley Context by type.



Public Properties
 PropertyDefined By
  required : Boolean
[read-only] Indicates whether this instance represents a required dependency.
ObjectTypeReference
  type : Class
[read-only] The type of the referenced object.
ObjectTypeReference
Public Methods
 MethodDefined By
  
ObjectTypeReference(type:Class, required:Boolean = true, defaultValue:Object = null)
Creates a new instance.
ObjectTypeReference
  
ObjectTypeReference
Protected Methods
 MethodDefined By
  
setType(type:Class):void
Sets the type of the referenced object.
ObjectTypeReference
Property Detail
requiredproperty
required:Boolean  [read-only]

Indicates whether this instance represents a required dependency.


Implementation
    public function get required():Boolean
typeproperty 
type:Class  [read-only]

The type of the referenced object.


Implementation
    public function get type():Class
Constructor Detail
ObjectTypeReference()Constructor
public function ObjectTypeReference(type:Class, required:Boolean = true, defaultValue:Object = null)

Creates a new instance.

Parameters
type:Class — the type of the referenced object
 
required:Boolean (default = true) — whether this instance represents a required dependency
 
defaultValue:Object (default = null)
Method Detail
resolve()method
public function resolve(target:ManagedObject):*

Parameters

target:ManagedObject

Returns
*
setType()method 
protected function setType(type:Class):void

Sets the type of the referenced object. May be used by subclasses that determine the expected type lazily.

Parameters

type:Class — the type of the referenced object