getAndRename public CompileTimeClass getAndRename(java.lang.String orgName, java.lang.String newName) throws NotFoundExceptionReads a class file and constructs a CtClass object with a new name. This method is useful if that class file has been already loaded and the resulting class is frozen. Parameters: orgName - the original (fully-qualified) class name newName - the new class name
调查结果如下: 在修改jar包中的class文件时出现runtimeException异常javassist的API中有相应的信息CtClass的代码如下: if (isFrozen()) throw new RuntimeException (getName() + " class is frozen");就是不知道为什么我要修改得class是frozen的 究竟是什么原因让class变成frozen的呢?
public CompileTimeClass getAndRename(java.lang.String orgName,
java.lang.String newName)
throws NotFoundExceptionReads a class file and constructs a CtClass object with a new name. This method is useful if that class file has been already loaded and the resulting class is frozen. Parameters:
orgName - the original (fully-qualified) class name
newName - the new class name
在修改jar包中的class文件时出现runtimeException异常javassist的API中有相应的信息CtClass的代码如下:
if (isFrozen())
throw new RuntimeException (getName() + " class is frozen");就是不知道为什么我要修改得class是frozen的
究竟是什么原因让class变成frozen的呢?