Dynamically modifying Java class structure
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hendrik_Gani
Posted On:   Tuesday, October 16, 2007 12:35 AM

Hi, I am trying to develop a solution to automatically insert new constructors to existing classes. I've considered using AspectJ to do it, however as far as I know it will only work if the name of the class to be modified was known beforehand (has to be hardcoded in the aspect), which is not applicable in my case. So, can anyone give me some suggestions or recommendations on this? Especially in terms of: - Is Aspectj the best tool to do this? If so, how to do it without hardcoding class names? - Should I look at bytecode engineering/manipulation tools instead? If so, what's the most suitable library for my case (since I am aware that there are a lot of choices out there when it comes to bytecode manipulation)?    More>>
			
Hi,

I am trying to develop a solution to automatically insert new constructors to existing classes. I've considered using AspectJ to do it, however as far as I know it will only work if the name of the class to be modified was known beforehand (has to be hardcoded in the aspect), which is not applicable in my case.

So, can anyone give me some suggestions or recommendations on this? Especially in terms of:
- Is Aspectj the best tool to do this? If so, how to do it without hardcoding class names?
- Should I look at bytecode engineering/manipulation tools instead? If so, what's the most suitable library for my case (since I am aware that there are a lot of choices out there when it comes to bytecode manipulation)?

Thanks a lot for any helps, suggestions, and ideas.

Regards,

Hendrik
   <<Less
About | Sitemap | Contact