How to dynamically implement proxy pattern in flex action script?

183 Views Asked by At

I need to implement a proxy pattern for flex action script. The source object contains 40-50 methods, and may keep increasing, so I hope I could avoid implementing individual methods in the source object.

I remember in java, I could use reflection to centralized all the proxy calls, is there any similar mechanism in Flex Action Script?

Thanks.

1

There are 1 best solutions below

0
On

I'm not sure what exactly you want to accomplish but there is a handy AVM bytecode library from AS3Commons that allows to create classes on runtime. There is example how to generate dynamic proxy.