byte-buddy

How to create a default constructor with Byte Buddy

送分小仙女□ 提交于 2019-11-29 13:53:45
I want to intercept some method calls on one of my classes but those classes dont have a default constructor. Given the following class, how would I setup Byte Buddy to also create a public no-argument constructor to be able to create the generated class? public class GetLoggedInUsersSaga extends AbstractSpaceSingleEventSaga { private final UserSessionRepository userSessionRepository; @Inject public GetLoggedInUsersSaga(final UserSessionRepository userSessionRepository) { this.userSessionRepository = userSessionRepository; } @StartsSaga public void handle(final GetLoggedInUsersRequest request)

How to create a default constructor with Byte Buddy

倖福魔咒の 提交于 2019-11-28 07:54:21
问题 I want to intercept some method calls on one of my classes but those classes dont have a default constructor. Given the following class, how would I setup Byte Buddy to also create a public no-argument constructor to be able to create the generated class? public class GetLoggedInUsersSaga extends AbstractSpaceSingleEventSaga { private final UserSessionRepository userSessionRepository; @Inject public GetLoggedInUsersSaga(final UserSessionRepository userSessionRepository) { this