How do I restrict the creation of an anonymous subclass (Java)

Posted by Ad on Stack Overflow See other posts from Stack Overflow or by Ad
Published on 2010-04-22T15:50:45Z Indexed on 2010/04/22 15:53 UTC
Read the original article Hit count: 142

Filed under:
|

Hi

I have an abstract class A in a package P with subclasses B and C. I don't want it to be possible to create an anonymous subclass to the class A from outside the package P.

© Stack Overflow or respective owner

Related posts about anonymous

Related posts about inheritance