Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] how to introduce a new "declare" statememt?

Take a look at the "parseDeclare" method of PatternParser (which
you'll be familiar with by now). As long as your new declare statement
starts with the "declare" prefix, then the  process is similar to the
one you followed before. There are two fundamental types of Declare
objects :- "advice-like" and non advice-like. Advice-like declares use
a shadow munging technique to implement their behaviour.
Non-advice-like declares are what we call "type mungers" and are
processed in a different phase. Looking at the Declare family in
org.aspectj.weaver.patterns should give you a good idea of how to get
started.

Regards, Adrian.

On 28/10/05, lingli zhang <lingli_z@xxxxxxxxx> wrote:
> Hi,
>
> Previously, I have learned how to add a new pointcut
> pattern. Now I wonder, how to introduce a new
> "delcare" statement similar to declare warning or
> declare error. Is it possible to implement without it
> touching the grammar deep down in jdt-core? If so, is
> there any document discussing this? If not, how to
> introduce a new terminal to the grammar? Any
> workarounds? Any suggestion will be greatly
> appreciated!
>
> Thanks!
> Lingli
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


--
-- Adrian
adrian.colyer@xxxxxxxxx


Back to the top