I have a set of classes that implement a certain interface. I have put all those classes in a Hashtable ht like this:
ht.put(str,backend.instructions.ADC.class); But when I call the get() function of the hashtable and try to cast the object as the Interface's object, I am getting a ClassCastException:
InsInterface4 obj=(InsInterface4) ht.get(str); How can I resolve the same? I have to call functions of the class but, I am not even able to cast properly? What is wrong in this?