There is a limit, but it's near impossible to reach. In Java it's 65536 for instance. However, if you find yourself with 20+ interfaces on a single class you should probably think about refactoring your code because it sounds like you're designing something to do too much or giving it too many structures which should be compressed into a smaller number of interfaces. I don't think I've ever needed more than 5 interfaces per a single class. I'm not saying that you should limit yourself to 5 or 20 necessarily, but the code will be hard to maintain if you're designing it like that.
|