java - Iterate over an enum, which saves classes, then init the classes and put them into a map -
i have made interface, classes implement, , have enum counstructor takes class<?>
arguement. enum(class<?> class)
, , enum has function return class. how can make class
arguement must implement interface, , how later loop through values()
of enum, classes, init them , put them hashmap.
thanks help.
use upper bound on wildcard:
class<? extends yourinterface>
Comments
Post a Comment