I have a hashmap defined as the following
Map<Class, Object> runners = new HashMap<Class, Object>();
runners.put(Entity.class, new EntityRunner());
In a function I get passed an element that contains a method getClass().
this class corresponds to a key in the hash map defined above.
What I want to do is be able to get the corresponding Object from the hash map, assign it to a variable, and then cast it to the corresponding object and be able to execute that objects methods
Any ideas?