Thanks,
Bob
Rapha�l Pi�roni wrote:
hello,
for a program i want to implement i'm asking myself how to implement
some kind of aspect at runtime.
let me explain by an example.
A class "AspectedClass" has a method "AspectedMethod" that returns an
int. at runtime, after the clas has been loaded and his method used
several times, i got a method "X" from a class "Y" that wants to change
the behavior of the AspectedMethod by systematically adding 1 to all
the results before the return. after several use of the modified
AspectedMethod, the class X is asked to redo what it has done on the
AspectedMethod and re-changing it by adding an additionnal 1 to the
result. after another several use, the class X is asked to undo the two
changes it has done on the AspectedMethod and get it back to the
initial behavior.
As a following question : what if i also have an interface
AspectedInterface defining the AspectedMethod. the classes A implements
the AspectedInterface, B extends A. and obviously A and B override the
AspectedMethod. the hypothetically clas X from the previous question
has to modify the behavior of all the classes implementing the
AspectedInterface (without knowing all of them ;)).
as a java programmer, i'm not very good at knowig how the JVM is
working. do you think these examples are possible using bcel or any
other java API ?
in advance thank you
Rapha�l Pi�roni.
ps: happy new year.
pps: in the case of the examples are possibles to implement and the
implementation is not already done, i'll be happy to add a little of my
time to the commnity.
=====
------------------------------------
| Rapha�l Pi�roni |
| 33+ 223 351 354 |
| mailto:[EMAIL PROTECTED] |
| http://www.dexem.com |
| mailing:[EMAIL PROTECTED] |
------------------------------------
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
