On Thu, Sep 18, 2008 at 11:20 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > aspectj is pretty cool, but its expression language is somewhat > limited. for example salve allows > > public void somefunction(@NotNull Integer a, @NotEmpty String b) {} > > aspectj, at least when i started salve, did not have an expression > that would let you match a function if its argument was annotated with > a specific annot.
Point taken. I'm not sure about this particular case, but I know the annotation support for AspectJ has been improved. > > also i need things like removing/adding fields and contributing to > clinit. aspectj is great for quickly matching on something and then > adding something around, not for complex bytecode manipulation. AspectJ can add in fields, but it's not good at adding in a dynamically-generated set of fields. > > i started out writing salve with javassist, but i got tired of writing > java code in strings. i wanted to be in complete control of bytecode > to make sure it was as efficient as possible so in the end i learned a > bit about bytecode and ended up using ASM. Javassist can be a big PITA at first. The HiveMind project has helper classes around it to assist with stuff, but it was still confusing. That's one of the reasons I wrote Apache Commons Proxy, so I wouldn't have to write another bit of Javassist to do proxying! :) Thanks for taking the time to discuss. I'm going to have to check out Salve a bit more in-depth. It's going into my Geek Queue! :) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]