Hi,

In here:

http://www.eclipse.org/aspectj/doc/next/devguide/ltw-configuration.html

take a look at the use of 'concrete-aspect'

cheers,
Andy

On 21 September 2011 11:27, Amina & Asad Jawahar <[email protected]> wrote:
> Thanks Andy. Having our users compile aspects would be acceptable. I think it 
> might be best to provide abstract aspects that users can provide concrete 
> implementations of (basically the pointcut). This would allow them to use the 
> framework advices with their own pointcuts.
>
> You mentioned that something like this is already doable in XML, can you 
> point me to an example of that?
>
> -Asad
>
> --- On Wed, 9/21/11, Andy Clement <[email protected]> wrote:
>
>> From: Andy Clement <[email protected]>
>> Subject: Re: [aspectj-users] Stand-alone advice?
>> To: [email protected]
>> Date: Wednesday, September 21, 2011, 10:58 AM
>> Hi Asad,
>>
>> I touched on this in the other thread that was talking
>> about named
>> signature patterns a day or so ago.  Currently you
>> can't do this, but
>> it wouldn't be too hard to add support for wiring aspects
>> up in XML.
>> You can already define concrete aspects in XML, which
>> concretize
>> abstract aspects (by filling in abstract pointcuts), but
>> you can't
>> build them from scratch by defining a pointcut and naming a
>> Java
>> method.
>>
>> The best you could do right now is allow the users to
>> define pointcuts
>> and very simply advice bodies that called your framework
>> advices.
>>
>> class Framework {
>>   static void advice1(JoinPoint.StaticPart jpsp) {
>>      System.out.println(jpsp);
>>   }
>> }
>>
>> then the user just has to write something small
>>
>> aspect X {
>>   before(): execution(* *(..)) {
>> Framework.advice1(thisJoinPointStaticPart); }
>> }
>>
>> I guess it depends on whether you want them writing aspects
>> (and so
>> compiling them), or you want them to express that in some
>> other form
>> (like XML)?
>>
>> cheers
>> Andy
>>
>> On 20 September 2011 14:04, Amina & Asad Jawahar <[email protected]>
>> wrote:
>> > Hi,
>> > I am new to AspectJ and considering to use it for a
>> framework that I am developing. I want to provide some
>> advices as part of the framework that users of my framework
>> should be able to use with their own pointcuts. I see that
>> in Spring AOP this is doable because you can reference
>> advices and pointcuts to compose arbitrary aspects (at least
>> from the examples it looks like it) but I could not find a
>> way in AspectJ. Is there a way to just provide an advice in
>> AspectJ and let someone else construct an Aspect using it?
>> >
>> > Thanks,
>> > -Asad
>> > _______________________________________________
>> > aspectj-users mailing list
>> > [email protected]
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> _______________________________________________
>> aspectj-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to