aspose file tools*
The moose likes Beginning Java and the fly likes Proxy for a Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Proxy for a Class" Watch "Proxy for a Class" New topic
Author

Proxy for a Class

D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Is any way to create a Proxy object for a Class? I tried, but it told only interface can be used. Why so restriction?


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Just because. They could have designed proxies so they could be subclasses of a given class, I suppose, but that wouldn't always work; and especially for classes with no default constructors, or final classes, etc; in fact, the rules might get rather complex. Only doing this for interfaces is much easier to understand!


[Jess in Action][AskingGoodQuestions]
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Thanks, it sounds reasonable. SO I'll cope with hte limitation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Proxy for a Class