Packageorg.spicefactory.lib.reflect
Classpublic class Property
InheritanceProperty Inheritance Member Inheritance MetadataAware Inheritance Object

Represents a single property. The property may have been declared with var, const or implicit getter/setter functions



Public Properties
 PropertyDefined By
 InheriteddeclaredBy : ClassInfo
[read-only] The type declaring this member.
Member
  isStatic : Boolean
[read-only] Determines if this instance represents a static property.
Property
 Inheritedname : String
[read-only] The name of this member.
Member
 InheritednamespaceURI : String
[read-only] The namespace URI for this member or null if this is a public member.
Member
 Inheritedowner : ClassInfo
[read-only] The owner of this member.
Member
  readable : Boolean
[read-only] Determines if this instance represents a readable property.
Property
  type : ClassInfo
[read-only] Returns the type of this Property.
Property
  writable : Boolean
[read-only] Determines if this instance represents a writable property.
Property
Public Methods
 MethodDefined By
 Inherited
getAllMetadata(validate:Boolean = true):Array
Returns all metadata tags for this type in no particular order.
MetadataAware
 Inherited
getMetadata(type:Object, validate:Boolean = true):Array
Returns all metadata tags for the specified type for this element.
MetadataAware
  
getValue(instance:Object):*
Returns the value of the property represented by this instance in the specified target instance.
Property
 Inherited
hasMetadata(type:Object):Boolean
Indicates whether this element has at least one metadata tag of the specified type.
MetadataAware
  
setValue(instance:Object, value:*):*
Sets the value of the property represented by this instance in the specified target instance.
Property
Property Detail
isStaticproperty
isStatic:Boolean  [read-only]

Determines if this instance represents a static property.


Implementation
    public function get isStatic():Boolean
readableproperty 
readable:Boolean  [read-only]

Determines if this instance represents a readable property.


Implementation
    public function get readable():Boolean
typeproperty 
type:ClassInfo  [read-only]

Returns the type of this Property.


Implementation
    public function get type():ClassInfo
writableproperty 
writable:Boolean  [read-only]

Determines if this instance represents a writable property. Properties declared with var or an implicit setter method are writable. Properties declared with const or with an implicit getter without matching setter method are not writable.


Implementation
    public function get writable():Boolean
Method Detail
getValue()method
public function getValue(instance:Object):*

Returns the value of the property represented by this instance in the specified target instance.

Parameters

instance:Object — the instance whose property value should be retrieved or null if the property is static

Returns
* — the value of the property represented by this instance in the specified target instance

Throws
PropertyError — if the property is not readable or if the specified target instance is not of the required type
setValue()method 
public function setValue(instance:Object, value:*):*

Sets the value of the property represented by this instance in the specified target instance.

Parameters

instance:Object — the instance whose property value should be set or null if the property is static
 
value:* — the new value for the property

Returns
* — the (probably converted) value that was set for the property in the target instance

Throws
ConversionError — if the specified value is not of the required type and cannot be converted
 
PropertyError — if the property is not writable or if the specified target instance is not of the required type