PropertyAccessor
| Kind of class: | public class |
|---|---|
| Package: | com.bourre.core |
| Inherits from: | none |
| Implements: | |
| Author: | Cédric Néhémie |
| Classpath: | com.bourre.core.PropertyAccessor |
| File last modified: | Monday, 24 November 2008, 11:36:49 |
The
to the specified property of an object.
PropertyAccessor provides read and write access to the specified property of an object.
Summary
Constructor
- PropertyAccessor (o:Object, p:String)
- Creates a new PropertyAccessor instance which
Instance methods
- getValue : Number
- Returns the numeric value stored in the property specified
- setValue (value:Number) : void
- Sets the new value for the property handled by this
- getTarget : Object
- getGetterHelper : String
- getSetterHelper : String
- getProperty : String
- Returns the property's name onto which this accessor
- toString : String
- Returns the string representation of this object.
Constructor
PropertyAccessor
public function PropertyAccessor (
o:Object,
p:String)
Creates a new
allow access to the specified property of the passed-in object.
PropertyAccessor instance whichallow access to the specified property of the passed-in object.
Parameters:
o:
object onto which access methods
p:
name of the property of the object
Throws:
- {VISDOC_LINK_0}
NullPointerException— Can't create an accessor
on a null object - {VISDOC_LINK_1}
NoSuchFieldException— There is no property
of the specified name
Instance methods
getGetterHelper
public function getGetterHelper (
) : String
Returns:
- the string name of the getter access used#
by this accessor
Specified by:
getProperty
public function getProperty (
) : String
Returns the property's name onto which this accessor
operate.
operate.
Returns:
- the property's name onto which this accessor
operate
getSetterHelper
public function getSetterHelper (
) : String
Returns:
- the string name of the setter access used#
by this accessor
Specified by:
getTarget
public function getTarget (
) : Object
Returns:
- the object onto which this accessor operate#
Specified by:
getValue
public function getValue (
) : Number
Returns the numeric value stored in the property specified
during the creation of the object.
during the creation of the object.
Returns:
- current value stored in the target property
Throws:
- {VISDOC_LINK_0}
ClassCastException— The target property
doesn't store a number.
Specified by:
setValue
public function setValue (
value:Number) : void
Sets the new value for the property handled by this
accessor defined during the creation of this instance.
accessor defined during the creation of this instance.
Parameters:
value:
the new value for the target property
Throws:
- {VISDOC_LINK_0}
ClassCastException— The target property
doesn't store a number.
Specified by:
toString
public function toString (
) : String
Returns the string representation of this object.
Returns:
- the string representation of this object