Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] adding an aspect at runtime to an object

Hi,
I'm new to AOP and I've got a doubt due to a piece of code I've seen a few time ago. The code was like the following:

Object o = new MyObject();
MyAspect a = new MyAspect();
a.addObject(o);


the idea was to use the aspect a to insert methods and variables into the o object. But it sounds like the addObject method does not exists in AspectJ, thus my question is if it's a feature removed (or another language that I cannot find) and how I can merge an aspect with an object at runtime. And what happen then? Is there a dynamic bytecode manipulation?

Thanks,
Luca
--
Luca Ferrari
fluca1978@xxxxxxxxxxx


Back to the top