Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Hi All ! Got a couple of questions regarding AspectJ

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Koduru, Rajendra Kumar Reddy wrote:
> HI AspectJ users,
> 
> 	I am new to AOP, so just started to know info about aspectJ. Got a
> basic idea with FAQ'S and some paper online. However got few
> queries..Hope that you can help me in this regard.. The list
> follows    
> 
>  ** Note:: Here my questions are related to development aspects.
> Production aspects can be neglected. Of course few are general
> questions. 
> 
> 
> 1.  I have compiled my application using javac. I develop few
> aspects for this application. I only want to compile the aspects
> nothing
> else.  
> Is it possible?
Yes.
 
> 2.  If the answer to the above question is YES, can i use the new
> byte code weaver with this aspect binaries and normal .class files
> [javac output]??  
Yes.
 
> 3.  If i want to instrument only few methods, which i dont know at
> 	compile time of the aspect, what should i do? i.e is it possible
> to 	provide pointcuts and advices for an aspect at run time?? i.e.
> I
> want only few methods of a particular class to be instrumented, and
> i dont know these methods at compile time. I want the user to
> select the methods and packages/classes at runtime via UI. so that
> I can
> have a general aspect, which need not be recompiled.    
You cannot do that with AspectJ. however with e.g. AspectWerkz.

> 4. I have compiled sources and aspects with ajc compiler, and if
> want to deliver to the customer, without the aspects that were
> introduced with the compilation..how can I remove those?? Is
> selective removal of aspects possible?? If so could you please let
> me know the option to be used.    

There is an "unweavable" flag that you can set at compile time and an
"unweave" option to unweave the code lateron. Optionally you can
postpone weaving to loadtime.

Hope that helps,
Eric

- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQhOcy8wiFCm7RlWCEQKK5QCaA1ke8R9UWMRGHN37+qBotfXPZ80AoJ8D
khauILTLL7sY630iY0duInRr
=Y1EP
-----END PGP SIGNATURE-----




Back to the top