• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cast to anonymous class name at compilation time  RSS feed

 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code:

The reason of introduction of anonymous class, because method setMappingTable in base class is protected. Now I need to cast access to newly public method, because otherwise compiler will issue compilation error. I do casting just see name of anonymous class in compilation result. However this approach doesn't look like robust.
Please do not recommend me to create a regular class, I'd like solve the problem using anonymous. Please do not ask me why I need so also.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!