This content has been marked as final.
Show 3 replies
-
1. Re: Can this be achieved using javassist?
chiba Apr 2, 2004 12:01 PM (in response to wangglei)Please look at javassist.expr.ExprEditor
for (1) and CtClass.setName() for (2). -
2. Re: Can this be achieved using javassist?
wangglei Apr 3, 2004 1:18 PM (in response to wangglei)Thanks chiba. But here what I want to change is not just the name of a class, but I mean a totally different class, including declaration of the class, its members and implementations, such and such. And even though I change the classname of one class, how to make changes to all the related classes that have referenced this name-changed class?
-
3. Re: Can this be achieved using javassist?
chiba Apr 4, 2004 11:18 AM (in response to wangglei)Ok, maybe what you need is CtClass.replaceClassName().
To apply this renaming to a set of classes,
you should call replaceClassName() on
every class. javassist.Translator would help you do this.