Could anybody help me with the following problem that looks trivial? I need to change a field modifier for a certain class.
my code is:
ClassPool pool = ClassPool.getDefault();
Loader classLoader = new Loader(pool);
CtClass clazz = pool.get("HelloWorld");
CtField f = clazz.getField("text");
The "text" field stayed private, why?
I'm using javassist2.5.1
That was a bug. It has been fixed and the updated
code is in the CVS. You can download it from the
CVS if you need the fix right now.
I'll make a new release package 2.6 by the end of