[PRL] aspects to eliminate aspects
Jeffrey Palm
jpalm at ccs.neu.edu
Wed May 18 11:40:09 EDT 2005
Matthias Felleisen wrote:
> Question 1: Is it possible to write an aspect that monitors a class to
> discover the intervention of _other_ aspects?
Sure. For example, in AspectJ, walk the bytecode at class loading time
or right after class initialization.
This is ugly: You could also place two pieces advice on every method not
in that aspect (the intervention discoverer). One before advice that
walks the stack the see if the method one up is an aspect and two up is
the class in question. If so throw an exception. That exception is
caught by the second piece of advice, which is around advice.
> Question 2: If the answer is 'yes', is it possible to use the
> information to modify the program syntactically (via reflection, for
> example) so that aspects can no longer mess with the class?
Rewrite the bytecode.
> -- Matthias
>
>
> _______________________________________________
> PRL mailing list
> PRL at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/prl
>
>
--
Jeffrey Palm --> http://www.ccs.neu.edu/home/jpalm
More information about the PRL
mailing list