wood burning stoves 2.0*
The moose likes Spring and the fly likes Can spring make a class implement an interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Can spring make a class implement an interface?" Watch "Can spring make a class implement an interface?" New topic
Author

Can spring make a class implement an interface?

Kurt Xu
Ranch Hand

Joined: Sep 29, 2009
Posts: 32
In our project ,we need to intercept some concrete classes not implement any interfaces and we are not granted to refactor the code either cause it's developed by another department ,we can only use the common jar they offer. And another bad news is we can't easily add other opensource aop lib, like cglib, so the only intercepting way is to use jdk dynamic proxy, but it's no way to intercept classes without interface implement either. Is that possible to make a class implement a interface which includes all the method in the concrete class dynamically through spring ,then spring can intercept the class. I'm not sure if it's possible. The version is 2.0.6.
Many thanks.
 
Consider Paul's rocket mass heater.
 
subject: Can spring make a class implement an interface?
 
Similar Threads
what is the difference between
Interfaces
inheritance
Inheritence or Abstract class
Difference between abstract and interface,not Syntactical diff