r/java • u/vladmihalceacom • Dec 11 '25
Modern Bytecode Instrumentation with ByteBuddy – Rafael Winterhalter | The Marco Show
https://www.youtube.com/watch?v=AzfhxgkBL9s
40
Upvotes
r/java • u/vladmihalceacom • Dec 11 '25
View all comments
Show parent comment
2
u/JustJustust Dec 12 '25
If I understand your intention correctly, then
createPostin your example is a factory method with the sole purpose of providing test defaults and named params for a constructor that doesn't have any?That would allow me to keep production code free of test values and still have a low-overhead way to provide them for tests. Makes perfect sense to me, thanks! :)
For some reason I had assumed the defaults with test values would have to be on the actual constructor.