java - do not understand Class<? extends VersionedProtocol> protocol; -
when reading java program, meet following piece line of code
class<? extends versionedprotocol> protocol; what <? extends versionedprotocol> stand for? mechanism define class?
the class class has generic type parameter represents itself. here class<? extends versionedprotocol> means class object representing versionedprotocol class or subclass of versionedprotocol.
this known upper-bounded wildcard in java generics.
Comments
Post a Comment