Hello all... I am very new to aspect-oriented programming, so forgive
my simple questions. I'm interesting in applying aspects to base Java
classes... in this particular case I want to modify the painting
behavior of Swing components. I've written a basic aspect like this:
In this case I am theoretically intercepting any calls to
paintComponent() and doing nothing, so I should see nothing on my
GUI. However, everything looks the same. This is the latest in a long
series of test aspects I've written; I can't seem to alter any
painting behavior. Am I doing something wrong with my pointcut?
The second question concerns how to build this stuff. I put the
standard jar as the inpath:
I'm building on a Mac, which explains the unusual location of the
standard classes. The aspect shown above is in the anaglyph.jar. When
I run this the compiler regenerates every single class in the Java
runtime into the output directory, even though only a small number of
classes should be affected by my aspect. I end up with a huge jar
file which essentially duplicates the runtime jar plus my
application. I hope that when I run my modified classes are
overriding the base library, although I'm not sure which ones will
take precedence...