declare error & type pattern?

View: New views
2 Messages — Rating Filter:   Alert me  

declare error & type pattern?

by matthewadams12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Currently, declare error only accepts a pointcut expression.  It would
be nice if it also accepted a type pattern.

For example:

declare error: (@Endable *) && (!hasmethod(protected * end(Date)) :
"no protected end(Date) method";

It's kind of like compile-time enforcement of interface methods, only
I want it to support non-public methods.

How can I do this at compile time without having declare error
enhanced to support type patterns?

Thanks,
Matthew

--
mailto:matthew@...
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadams12@...
msn:matthew@...
http://matthewadams.me
http://www.linkedin.com/in/matthewadams
_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: declare error & type pattern?

by matthewadams12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Filed enhancement request for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292264

matthewadams12 wrote:
Currently, declare error only accepts a pointcut expression.  It would
be nice if it also accepted a type pattern.

For example:

declare error: (@Endable *) && (!hasmethod(protected * end(Date)) :
"no protected end(Date) method";

It's kind of like compile-time enforcement of interface methods, only
I want it to support non-public methods.

How can I do this at compile time without having declare error
enhanced to support type patterns?

Thanks,
Matthew

--
mailto:matthew@matthewadams.me
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadams12@gmail.com
msn:matthew@matthewadams.me
http://matthewadams.me
http://www.linkedin.com/in/matthewadams
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users