Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] declare error & hasmethod

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 */		hasmethod(@javax.validation.constraints..* static * *(..))
/* 97 */		|| hasmethod(static * *(.., @javax.validation.constraints..*
(*), ..))) :
/* 98 */			"can't validate static methods";

Compiler error is:
[ERROR] Failed to execute goal
org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (default-compile)
on project foundation-domain: Compiler errors:
[ERROR] error at hasmethod(@javax.validation.constraints..* static * *(..))
[ERROR]
[ERROR] /Users/matthew/Documents/bitbucket/scispike-foundation/foundation/domain/src/main/aspect/com/scispike/foundation/domain/aspectj/validation/ApacheBvalMethodValidationAspect.aj:96:0::0
Syntax error on token "*", ")" expected

It's complaining about the star following "static" on line 96 above.
Any tips here?

-matthew

-- 
mailto:matthew@xxxxxxxxxxxxxxx
skype:matthewadams12
googletalk:matthew@xxxxxxxxxxxxxxx
http://matthewadams.me
http://www.linkedin.com/in/matthewadams


Back to the top