try {
Class redefinerClass = ContextClassLoader.loadClass(HOTSWAP_REDEFINER_CLASS_NAME);
return (Redefiner) redefinerClass.newInstance();
} catch (ClassNotFoundException e) {
// TODO this message will be wrong if Java 5 did not started a preMain
throw new WrappedRuntimeException(
"redefiner class [HotSwapRedefiner] could not be found on classpath, make sure you have the aspectwerkz extensions jar file in your classpath",
e
);
} catch (Exception e) {
// TODO this message will be wrong upon Java 5..
throw new WrappedRuntimeException("redefiner class [HotSwapRedefiner] could not be instantiated", e);
}
}
} else if (type.equals(Type.JVMTI)) {
throw new UnsupportedOperationException("JVMTI is not supported yet");