aspose file tools*
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 Spring in Action this week in the Spring 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can spring make a class implement an interface?