| Package | flare.util |
| Class | public class Property |
| Implements | IEvaluable, IPredicate |
x.a.b.c or
x.a[1]). To reduce initialization times, this class also
maintains a static cache of all Property instances created using the
static $() method.
| Property | Defined by | ||
|---|---|---|---|
| name : String [read-only] The property name string.
| Property | ||
| proxy : IValueProxy
[static][read-only] A minimal
IValueProxy instance that gets and sets
property values through Property instances. | Property | ||
| Method | Defined by | ||
|---|---|---|---|
|
Property(name:String)
Creates a new Property, in most cases the static
$
method should be used instead of this constructor. | Property | ||
|
[static]
Requests a Property instance for the given property name.
| Property | ||
|
clearCache():void
[static]
Clears the cache of created Property instances
| Property | ||
|
deleteValue(x:Object):void
Deletes a dynamically-bound property from an object.
| Property | ||
|
eval(x:Object = null):*
Gets the value of this property for the input object; this
is the same as
getValue, but provided in order to
implement the IEvaluable interface. | Property | ||
|
getValue(x:Object):*
Gets the value of this property for the input object.
| Property | ||
|
predicate(x:Object):Boolean
Gets the value of this property and casts the result to a
Boolean value.
| Property | ||
|
setValue(x:Object, val:*):void
Sets the value of this property for the input object.
| Property | ||
| name | property |
name:String [read-only]The property name string.
Implementation public function get name():String
| proxy | property |
proxy:IValueProxy [read-only] A minimal IValueProxy instance that gets and sets
property values through Property instances.
public static function get proxy():IValueProxy
| Property | () | constructor |
public function Property(name:String)
Creates a new Property, in most cases the static $
method should be used instead of this constructor.
name:String — the property name string
|
| $ | () | method |
public static function $(name:String):PropertyRequests a Property instance for the given property name. This is a factory method that caches and reuses property instances, saving memory and construction time. This method is the preferred way of getting a property and should be used instead of the constructor.
Parametersname:String — the name of the property
|
Property —
the requested property instance
|
| clearCache | () | method |
public static function clearCache():voidClears the cache of created Property instances
| deleteValue | () | method |
public function deleteValue(x:Object):voidDeletes a dynamically-bound property from an object.
Parametersx:Object — the object from which to delete the property
|
| eval | () | method |
public function eval(x:Object = null):*
Gets the value of this property for the input object; this
is the same as getValue, but provided in order to
implement the IEvaluable interface.
x:Object (default = null) — the object to retrieve the property value for
|
* — the property value
|
| getValue | () | method |
public function getValue(x:Object):*Gets the value of this property for the input object.
Parametersx:Object — the object to retrieve the property value for
|
* — the property value
|
| predicate | () | method |
public function predicate(x:Object):BooleanGets the value of this property and casts the result to a Boolean value.
Parametersx:Object — the object to retrieve the property value for
|
Boolean — the property value as a Boolean
|
| setValue | () | method |
public function setValue(x:Object, val:*):voidSets the value of this property for the input object. If the reset flag is true, all properties along a property chain will be updated. Otherwise, only the last property in the chain is updated.
Parametersx:Object — the object to set the property value for
|
|
val:* — the value to set
|