| Package | org.granite.reflect |
| Class | public class DynamicProperty |
| Inheritance | DynamicProperty DescribedElement |
| Implements | IMember, IVisitableElement |
Type instance.
Note: dynamic properties are never returned as part of Type's members.
They belong, by definition, to instances, not classes, and their purpose is
to represent a special kind of property when visiting a dynamic object or key/value
pair class instances (such as Dictionary and the various collection
classes with numeric keys).
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | declaredBy : Type
The
Type instance this described element belongs to. | DescribedElement | |
| holder : Object [read-only]
The instance thet holds this dynamic property.
| DynamicProperty | ||
| key : * [read-only]
The key (name or object) of this dynamic property.
| DynamicProperty | ||
| propertyKey : String [read-only]
The String representation of this member (field or method qName, key of a
dynamic property or dictionary, index of an array, etc.)
| DynamicProperty | ||
| type : Type
[read-only]
The
Type of the value of this dynamic property. | DynamicProperty | ||
| value : *
The value of this dynamic property.
| DynamicProperty | ||
| Method | Defined by | ||
|---|---|---|---|
|
DynamicProperty(holder:Object, key:Function, getter:Function = null, setter:* = null)
Constructs a new
DynamicProperty instance. | DynamicProperty | ||
![]() |
equals(o:*):Boolean
Tells if this
DescribedElement instance is equal to the supplied
o parameter. | DescribedElement | |
|
isAccessor():Boolean
Checks if this member is an accessor (get/set) field.
| DynamicProperty | ||
|
isConstant():Boolean
Checks if this member is a constant field.
| DynamicProperty | ||
|
isConstructor():Boolean
Checks if this member is a constructor.
| DynamicProperty | ||
|
isDynamicProperty():Boolean
Checks if this member is a dynamic property (always
false for
Member, always true for DynamicProperty). | DynamicProperty | ||
|
isMethod():Boolean
Checks if this member is a method.
| DynamicProperty | ||
|
isReadable():Boolean
Checks if this member is readable (fields only).
| DynamicProperty | ||
|
isStatic():Boolean
Checks if this member is static.
| DynamicProperty | ||
|
isVariable():Boolean
Checks if this member is a variable field.
| DynamicProperty | ||
|
isWriteable():Boolean
Checks if this member is writeable (fields only).
| DynamicProperty | ||
![]() |
toString():String
Returns the a string (XML) representation of this described element.
| DescribedElement | |
| holder | property |
holder:Object [read-only]The instance thet holds this dynamic property.
Implementation public function get holder():Object
| key | property |
key:* [read-only]The key (name or object) of this dynamic property.
Implementation public function get key():*
| propertyKey | property |
propertyKey:String [read-only]The String representation of this member (field or method qName, key of a dynamic property or dictionary, index of an array, etc.)
Implementation public function get propertyKey():String
| type | property |
type:Type [read-only]
The Type of the value of this dynamic property.
public function get type():Type
| value | property |
value:* [read-write]The value of this dynamic property.
Implementation public function get value():*
public function set value(value:*):void
| DynamicProperty | () | constructor |
public function DynamicProperty(holder:Object, key:Function, getter:Function = null, setter:* = null)
Constructs a new DynamicProperty instance.
The optional getter and setter functions are expected to have the following signatures:
function (holder:Object, key:*):*
function (holder:Object, key:*, value:*):void
If no getter or setter functions are provided, it is expected that getting and setting this dynamic property value will follow this standard:
holder[key]
holder[key] = value
Parameters
holder:Object — the Type instance this dynamic property belongs to.
|
|
key:Function — the key (name or object) of this dynamic property.
|
|
getter:Function (default = null) — the getter function to be used to get this dynamic property value.
|
|
setter:* (default = null) — the setter function to be used to set this dynamic property value.
|
| isAccessor | () | method |
public function isAccessor():BooleanChecks if this member is an accessor (get/set) field.
ReturnsBoolean — true if this member is an accessor, false
otherwise.
|
| isConstant | () | method |
public function isConstant():BooleanChecks if this member is a constant field.
ReturnsBoolean — true if this member is a constant, false
otherwise.
|
| isConstructor | () | method |
public function isConstructor():BooleanChecks if this member is a constructor.
ReturnsBoolean — true if this member is a constructor, false
otherwise.
|
| isDynamicProperty | () | method |
public function isDynamicProperty():Boolean
Checks if this member is a dynamic property (always false for
Member, always true for DynamicProperty).
Boolean — true if this member is a dynamic property, false
otherwise.
|
| isMethod | () | method |
public function isMethod():BooleanChecks if this member is a method.
ReturnsBoolean — true if this member is a method, false
otherwise.
|
| isReadable | () | method |
public function isReadable():BooleanChecks if this member is readable (fields only).
ReturnsBoolean — true if this member is readable, false
otherwise.
|
| isStatic | () | method |
public function isStatic():BooleanChecks if this member is static.
ReturnsBoolean — true if this member is static, false
otherwise.
|
| isVariable | () | method |
public function isVariable():BooleanChecks if this member is a variable field.
ReturnsBoolean — true if this member is a variable, false
otherwise.
|
| isWriteable | () | method |
public function isWriteable():BooleanChecks if this member is writeable (fields only).
ReturnsBoolean — true if this member is writeable, false
otherwise.
|