Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] adding a import statement into a JAR file.

Hi Trishan,

I'm not sure I quite understand why you need to add an import? This is a pretty standard use of aspectJ in my experience and I've always done it by using around advice on the execution or call to the existing logging mechanisms (dependant on where I want to join, or where I am allowed to join for that matter due to licenses). This way the existing logging mechanism is still there but I have overriden it with the new mechanisms. But this approach doesn't lead me to needed to add import statements as the aspect itself then encapsulates the new logging logic, or in turn makes the onward call to the logging mechanism of choice.

Am I not understanding something on this ?

Cheers

Russ Miles


 
On Friday, November 14, 2003, at 03:49AM, Trishan de Lanerolle <tlanerolle@xxxxxxxxxxx> wrote:

>Why do you need it?
>We are looking into using AspectJ to replace a existing loging system (Log4J) with our custom built one, may be implimented using the around advice. (any "advice" you may have on doing this would be appriciated)We would identify the method calls and replace it with our own ones. We are using the JAR file as an experiement, we have the source files to play with as well. However when the program goes into 100-1000s files adding a single statement in becomes tedious to say the least. Its a task given by the architects to try out AspectJ in their projects. 
>Thanks
>Trishan
> 
>
>-----Original Message-----
>From: Wes Isberg [mailto:wes@xxxxxxxxxxxxxx]
>Sent: Thursday, November 13, 2003 11:42 PM
>To: aspectj-users@xxxxxxxxxxx
>Subject: Re: [aspectj-users] adding a import statement into a JAR file.
>
>
>AspectJ doesn't do that.  Why do you need it?
>
>Wes
>
>Trishan de Lanerolle wrote:
>> 		
>> Questions
>> How can I add a new package import for specific java classes contained within a JAR file using aspectJ. 
>> I think it has to be done with around advice. However I am not replacing anything just adding the line. I appologise in advance if the answer is obvious. I am new at this and I'm short for time and thought getting your input on this would help.  
>> Thank you
>> Trishan
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>> 
>
>_______________________________________________
>aspectj-users mailing list
>aspectj-users@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/aspectj-users
>_______________________________________________
>aspectj-users mailing list
>aspectj-users@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top