+ private def setBodyChecked(CtMethod method, String body) {
+ try {
+ method.setBody(body);
+ } catch (CannotCompileException e) {
+ log.error("Cannot compile method: {}#{} {}, Reason: {} Body: {}", method.declaringClass, method.name,
+ method.signature, e.message, body)
+ throw e;
+ }
+ }
+
+ private def <V> V withClassLoaderAndLock(ClassLoader cls, Lock lock, Callable<V> function) throws Exception {
+ appendClassLoaderIfMissing(cls);
+ ClassLoaderUtils.withClassLoaderAndLock(cls, lock, function);
+ }
+