Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Proxy for a Class

 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is any way to create a Proxy object for a Class? I tried, but it told only interface can be used. Why so restriction?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it sounds reasonable. SO I'll cope with hte limitation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic