javassist
javassist copied to clipboard
Java bytecode engineering toolkit
make a class `UDF2` ```java public abstract class UDF2 { public abstract void reset(BUF buf); } ``` create a interface called `com.daml.dti.function.Function` ,Make `UDF2` implement the interface ```java ClassPool pool...
I have been trying to use javassist to create some classes dynamically and I want to add some annotations to them, which is supposed to create separate helper classes when...
I thee the following NPE ocasionally when detaching a class ``` java.lang.NullPointerException at java.base/java.util.Hashtable.put(Unknown Source) at javassist.ClassPool.cacheCtClass(ClassPool.java:236) at javassist.CtClass.detach(CtClass.java:1427) ``` Code used here: ``` CtClass ctClass = pool.makeClass(new ByteArrayInputStream(getClassBytes())); try...
I'm using javassist for bytecode instrumentation, and I want all methods (declared in some class file) instrumented. However, I found ClassFile.getMethods() and CtClass.getDeclaredBehaviors() failed to give me all methods when...
I'm wondering whether `ProxyFactory` is expected to work when used from Kotlin. I'm trying unsuccessfully to make this real simple test pass: ```kotlin class ProxyFactoryKotlinTest { open class LongLoader {...
jdk13 ``` Exception in thread "main" java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by javassist.Loader @45283ce2 cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:877) at javassist.Loader.findClass(Loader.java:419) at javassist.Loader.loadClass(Loader.java:350) at...
We develop the SDK for Android, final product is _aar_ package. After switching to new android R8 tool, some unit tests in clients' projects that are using [PowerMock](https://github.com/powermock/powermock) to mock...
Hi, I want to introduce a local variable and access it from catch block. Normally, as mentioned in the docs, it is not possible with the current API. But I...
See https://stackoverflow.com/q/65896989/1082681 and my answer with an ugly workaround there. ```java package com.demo; public class OuterClass { private static int staticNum = 1; private int instanceNum = 2; public Runnable...