When pruning is enabled, Javassist discard unnecessary attributes while pruning that object.
How to enable pruning?
ClassPool.doPruning = true;
How to disallow pruning for a particular CtClass?
Use stopPruning method of CtClass.
CtClass ctClass = pool.makeClass("com.sample.app.Arithmetic");
ctClass.stopPruning(true);
No comments:
Post a Comment