Re: [aspectj-users] Post-compile time weaving: howto

2012-09-11 Thread Alexander Kriegisch
Not having read the thread, just noticing that question, let me say this: whichever class comes first in the classpath of any given classloader will be found and loaded. Others will be ignored, and there will be no "re-loading" of already defined classes. Disclaimer: You can create a new classl

Re: [aspectj-users] Method & constructor validation pointcuts

2012-09-11 Thread Andy Clement
Hi Matthew, >From a quick look you don't appear to be using the right syntax for parameter annotations: pointcut executingValidatedConstructorParameters() : execution(*.new(.., @javax.validation.constraints..* *, ..)); That means any constructor with a parameter *whose type* is annotated with an

Re: [aspectj-users] Method & constructor validation pointcuts

2012-09-11 Thread Matthew Adams
Thanks, Andy. That was it! Very subtle -- it didn't cross my mind to consider parameter v. type annotations there. That's a gem -- maybe add it to the FAQ or quick reference? -matthew On Tue, Sep 11, 2012 at 10:25 AM, Andy Clement wrote: > Hi Matthew, > > From a quick look you don't appear to

[aspectj-users] declare error & hasmethod

2012-09-11 Thread Matthew Adams
In light of the fact that bean validation still doesn't support static methods, I'd like to add a declare error statement that makes it a compiler error to try to do that. I'm doing something wrong here. The following fails to compile: /* 95 */declare error : /* 96 */hasme

Re: [aspectj-users] declare error & hasmethod

2012-09-11 Thread Andy Clement
it *is* user error strictly speaking, but you can blame me for the unhelpful message you are getting :) You are missing a leading 'paren' ahead of the first hasmethod. Instead of: declare error : hasmethod(@javax.validation.constraints..* static * *(..)) || hasmethod(static * *(.., @javax.valida

Re: [aspectj-users] declare error & hasmethod

2012-09-11 Thread Matthew Adams
OMG. Total copy/paste error. I actually copied an extra paren at the end by accident. It's not the leading one that was missing, it was the trailing one that was extraneous. Thanks! On Tue, Sep 11, 2012 at 12:40 PM, Andy Clement wrote: > it *is* user error strictly speaking, but you can blame