since everybody else talks about how dorky they are. If you want to cast something dynamically. ie.
ABCD abdc = (DynamicCastHere) something.get("abcd");
Lets say, you dont know what DynamicCastHere is until runtime. I had to pull all this BS.
// Get the python interpreter, reflection code added due to classloading issues.
Class clJy1 = objJyPlugin.getClass().getClassLoader().loadClass("org.spirit.util.JythonUtilPlugin");
Method m = clJy1.getMethod("getInterpreter", null);
log.info("Method: " + m);
PythonInterpreter interp = (PythonInterpreter) m.invoke(objJyPlugin, null);
log.info(">>> Interpreter=" + interp);
Method m2 = clJy1.getMethod("getInternalName", null);
String intName = (String) m2.invoke(objJyPlugin, null);
log.info(">>> InternalName =" + intName);