Rafael Winterhalter
Rafael Winterhalter
Given .implement(EnhancedInstance.class) .intercept(FieldAccessor.ofField(CONTEXT_ATTR_NAME)); Could you show the class `EnhancedInstance`.
I cannot reproduce it if I specify the field bit last: ```java import net.bytebuddy.ByteBuddy; import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.dynamic.DynamicType; import net.bytebuddy.implementation.FieldAccessor; import net.bytebuddy.implementation.MethodDelegation; import net.bytebuddy.matcher.ElementMatcher; import net.bytebuddy.matcher.ElementMatchers; import org.objectweb.asm.Opcodes; public class...
This is tricky, the annotation contract dictates that annotations with missing types are not to be rendered. So to speak, if net.bytebuddy.description.annotation.AbstractAnnotationListTest$Foo net.bytebuddy.description.annotation.AbstractAnnotationListTest$Bar cannot be located, there will not be...
If you wanted to avoid the lookup, you can create a custom `TypePool` where you return the annotation type without looking it up from disk. Would that be a solution?...
That's impossible, you would need to register the names. You can however do so by maintaining a set of names that are looked up? The look up is triggered after...
Alternatively, you could extend the type pool and ovverride the methods for reading annotations. The types are protected to type pool instances.
Yes, you would have something like: Set annotations = new HashSet(); TypePool typePool = makePoolWithAssumedAnnotations(annotations); annotations.add("my.Annotation"); assert typePool.describe("myType").resolve()getDeclaredAnnotations().filter(named("my.Annotation").size() == 1; The pool would simply return a mocked up type description...
The `VerifyError` is a bug and I think I already understood it and have a fix ready. I will look into further optimizing the stack map frame; if a constructor...
The bug should be fixed by https://github.com/raphw/byte-buddy/commit/3fb9bbb85e7fe3af2d631d41df71f905b90577b3 - can you validate that this patch works for you by building master yourself?
I think these issues are fixed, closing the ticket for it.