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. 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. 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. -igor On Thu, Sep 18, 2008 at 7:14 PM, James Carman <[EMAIL PROTECTED]> wrote: > On Thu, Sep 18, 2008 at 9:48 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: >> read my email, i said it is possible without salve. salve just makes >> it easier by letting you put the annotation on any method of any >> class. >> > > Ok, the Spring annotations/aspects do have a limitation that they need > to be on at least protected methods, I think. > >> salve ships with 3 instrumentation options. there is the agent for >> load time weaving, a maven2 plugin for compile time weaving, and an >> eclipse plugin for dev time weaving. > > Cool. So, why doesn't Salve just use aspects and AspectJ to achieve > what it wants (AspectJ supports the same 3 instrumentation options)? > Did you write your own instrumentation? Do you not like the > syntax/architecture of AspectJ? Just curious. I'm all about writing > stuff my own way. :) > >> >> i have also recently added something cool for wicket - expression >> checking. if you use salve's contract instrumentor you can have it >> validate property expressions, so you can do >> >> new PropertyModel(contact, new PE(Contact.class, >> "address.street1").toString()) and get an instrumentation, read >> compile, time error if there is no contact.getaddress().getstreet1(). >> doesnt refactor like the proxy idea but is also much more light weight >> and works on map and list properties. > > That is pretty cool! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]