MultiAccessor
| Kind of class: | public class |
|---|---|
| Package: | com.bourre.core |
| Inherits from: | none |
| Implements: | |
| Author: | Cédric Néhémie |
| Classpath: | com.bourre.core.MultiAccessor |
| File last modified: | Monday, 24 November 2008, 11:36:49 |
The
to the specified methods and properties of a single object.
MultiAccessor provides read and write access to the specified methods and properties of a single object.
Summary
Constructor
- MultiAccessor (t:Object, setters:Array, getters:Array = null)
- Creates a new MethodAccessor instance which
Instance methods
- getValue : Array
- Returns an array of all values returned by the specified
- setValue (values:Array) : void
- Sets the new values for the properties and methods handled
- getTarget : Object
- getGetterHelper : Array
- getSetterHelper : Array
- toString : String
- Returns the string representation of this object.
Constructor
MultiAccessor
public function MultiAccessor (
t:Object,
setters:Array,
getters:Array = null)
Creates a new
allow access to the specified
MethodAccessor instance whichallow access to the specified
getter andsetter methods of the passed-in object. Parameters:
o :
object onto which access methods
setters:
names of the setter methods or properties on the object
getters:
names of the getter methods on the object, use only
for function members
for function members
Throws:
- {VISDOC_LINK_0}
NullPointerException— Can't create an accessors
on a null object - {VISDOC_LINK_1}
NoSuchMethodException— There is no setter method
of the specified name - {VISDOC_LINK_2}
NoSuchMethodException— There is no getter method
of the specified name
Instance methods
getGetterHelper
public function getGetterHelper (
) : Array
Returns:
- the string name of all getters access used#
by this accessor
Specified by:
getSetterHelper
public function getSetterHelper (
) : Array
Returns:
- the string name of all setters 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 (
) : Array
Returns an array of all values returned by the specified
properties and methods of the object.
properties and methods of the object.
Returns:
- current values returned by the target getter methods
Throws:
- {VISDOC_LINK_0}
ClassCastException— A getter method
doesn't return a number.
Specified by:
setValue
public function setValue (
values:Array) : void
Sets the new values for the properties and methods handled
by the specified setter methods and properties defined
during the creation of this instance.
by the specified setter methods and properties defined
during the creation of this instance.
Parameters:
value:
the new values for the target setter methods
and properties
and properties
Throws:
- {VISDOC_LINK_0}
ClassCastException— A target setter
methods doesn't accept number as argument.
Specified by:
toString
public function toString (
) : String
Returns the string representation of this object.
Returns:
- the string representation of this object