草庐IT

InstrumentationImpl

全部标签

java - 如何使用 Javassist 制作 ArrayList

我想在检测期间将arrayList添加到方法中。我按照(JavassistCannotCompileExceptionwhentryingtoaddalinetocreateaMap)中的说明进行了尝试,但它引发了java.lang.VerifyError的不同异常。publicvoidcreateInsertBefore(StringscenarioName,StringclassName,CtMethodmethod,StringinsertBefore)throwsCannotCompileException{method.addLocalVariable("startTime"

java - 如何使用 Javassist 制作 ArrayList

我想在检测期间将arrayList添加到方法中。我按照(JavassistCannotCompileExceptionwhentryingtoaddalinetocreateaMap)中的说明进行了尝试,但它引发了java.lang.VerifyError的不同异常。publicvoidcreateInsertBefore(StringscenarioName,StringclassName,CtMethodmethod,StringinsertBefore)throwsCannotCompileException{method.addLocalVariable("startTime"