aboutsummaryrefslogtreecommitdiffstats
path: root/sample/evolve/Evolution.java
diff options
context:
space:
mode:
Diffstat (limited to 'sample/evolve/Evolution.java')
-rw-r--r--sample/evolve/Evolution.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sample/evolve/Evolution.java b/sample/evolve/Evolution.java
index 810f1986..ad6d1281 100644
--- a/sample/evolve/Evolution.java
+++ b/sample/evolve/Evolution.java
@@ -43,16 +43,15 @@ public class Evolution implements Translator {
trapMethod = _pool.getMethod("sample.evolve.Sample", "make");
}
- public void onWrite(ClassPool _pool, String classname)
+ public void onWrite(ClassPool _pool, CtClass clazz)
throws NotFoundException, CannotCompileException
{
- onWriteUpdatable(classname);
+ onWriteUpdatable(clazz.getName());
/*
* Replaces all the occurrences of the new operator with a call
* to _makeInstance().
*/
- CtClass clazz = _pool.get(classname);
CtClass absClass = updatableClass;
CodeConverter converter = new CodeConverter();
converter.replaceNew(absClass, absClass, handlerMethod);