<div dir="ltr"><div>Hello,</div><div>I find that the re-appliction of a code builder in case of overflowing labels is one less intuitive thing in the code builder API. In any case, I would add this very explicitly to the javadoc. Finally, I wanted to suggest to add an overload:</div><div><br></div><div>MethodBuilder withCode(Consumer<? super CodeBuilder> code, Runnable onReset);</div><div><br></div><div>In case that the code builder is stateful, this allows to reset some cached properties that become invalid after the first run. I understand that statefulness of the consumer might not be intended, but since ASM is stateful today, I think I will not be the only one in need.</div><div><br></div><div>Currently, I prepend the reset to the builder, but it requires an extra check for the first run making it rather clunky.</div><div><br></div><div>Personally: ASM patches the byte code without reapplication of the visitor. Was this considered for the Class File builder API?</div><div><br></div><div>Best regards, Rafael<br></div></div>