Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new ByteBuddy().subclass(AbstractService.class)
- .name(serviceName)
- .method(ElementMatchers.named("start").and(
- ElementMatchers.takesArguments(0)))
- .intercept(
- MethodDelegation.toInstanceField(service, "consumer")
- .filter(ElementMatchers.isAnnotatedWith(Start.class)))
- .method(ElementMatchers.named("stop").and(
- ElementMatchers.takesArguments(0)))
- .intercept(
- MethodDelegation.to(instance).filter(
- ElementMatchers.isAnnotatedWith(Stop.class)))
- .make();
- java.lang.IllegalArgumentException: None of [] allows for delegation from...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement