package { public class ObjectBinder { public var targetInstance:*; public function ObjectBinder( targetInstance:*) { this.targetInstance = targetInstance; } public function property( key:String, value:*):ObjectBinder { targetInstance[ key] = value; return this; } public function method( methodName:String, args:Array = null):ObjectBinder { targetInstance[ methodName].apply( args, targetInstance); return this; } } }