Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] adding methods to annotated classes

Hi,

 

Is there a way to add methods to classes annotated with a particular annotation?

 

For example,

 

CLASS 1

---------------

 

@MyAnnotation public class BeanA

{

   // …

}

 

 

 

CLASS 2

 

@MyAnnotation public class BeanB

{

   // …

}

 

Now, I need an aspect to insert a method, let’s call it foo(), to all classes annotated with @MyAnnotation

 

Is this doable and if so, how?

 

 

Thanks

Dmitry


Back to the top