Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class<? extends SomeClass> proxy = new ByteBuddy()
- .subclass(SomeClass.class)
- .method(ElementMatchers.any())
- .intercept(InvocationHandlerAdapter.of(invocationHandler))
- .make()
- .load(SomeClass.class.getClassLoader());
- Class<? extends SomeClass> proxy = new ByteBuddy()
- .subclass(SomeClass.class)
- .defineField("handler", InvocationHandler.class, Visibility.PUBLIC)
- .method(ElementMatchers.any())
- .intercept(InvocationHandlerAdapter.toField("handler"))
- .make()
- .load(SomeClass.class.getClassLoader());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement