Packagecom.bourre.core
Classpublic class MethodAccessor
ImplementsAccessor

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The MethodAccessor provides read and write access to the specified method of an object.



Public Methods
 MethodDefined by
  
MethodAccessor(o:Object, setter:String, getter:String)
Creates a new MethodAccessor instance which allow access to the specified getter and setter methods of the passed-in object.
MethodAccessor
  
getGetterHelper():String
Returns the string name of the getter access used by this accessor to retreive data from its target object.
MethodAccessor
  
getSetterHelper():String
Returns the string name of the setter access used by this accessor to defines new data to its target object.
MethodAccessor
  
getTarget():Object
Returns the target object onto which this accessor operate.
MethodAccessor
  
getValue():Number
Returns the numeric value returned by the getter method specified during the creation of the object.
MethodAccessor
  
setValue(value:Number):void
Sets the new value for the property handled by the specified setter method defined during the creation of this instance.
MethodAccessor
  
toString():String
Returns the string representation of this object.
MethodAccessor
Constructor detail
MethodAccessor()constructor
public function MethodAccessor(o:Object, setter:String, getter:String)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates a new MethodAccessor instance which allow access to the specified getter and setter methods of the passed-in object.

Parameters
o:Object — object onto which access methods
 
setter:String — name of the setter method on the object
 
getter:String — name of the getter method on the object

Throws
NullPointerException — Can't create an accessor on a null object
 
NoSuchMethodException — There is no setter method of the specified name
 
NoSuchMethodException — There is no getter method of the specified name
Method detail
getGetterHelper()method
public function getGetterHelper():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string name of the getter access used by this accessor to retreive data from its target object.

Returns
String — the string name of the getter access used by this accessor
getSetterHelper()method 
public function getSetterHelper():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string name of the setter access used by this accessor to defines new data to its target object.

Returns
String — the string name of the setter access used by this accessor
getTarget()method 
public function getTarget():Object

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the target object onto which this accessor operate.

Returns
Object — the object onto which this accessor operate
getValue()method 
public function getValue():Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the numeric value returned by the getter method specified during the creation of the object.

Returns
Number — current value returned by the target getter method

Throws
ClassCastException — The target getter method doesn't return a number.
setValue()method 
public function setValue(value:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Sets the new value for the property handled by the specified setter method defined during the creation of this instance.

Parameters
value:Number — the new value for the target setter method

Throws
ClassCastException — The target setter method doesn't accept number as argument.
toString()method 
public function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this object.

Returns
String — the string representation of this object