<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html><head><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal">That’s what I’m doing.  My problem must be I’m using the wrong thing for the MethodBuilder handler argument.  What do you suggest?</p><p class="MsoNormal"> </p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b>From:</b> Chen Liang <<a href="mailto:chen.l.liang@oracle.com">chen.l.liang@oracle.com</a>> <br><b>Sent:</b> Thursday, July 10, 2025 3:46 PM<br><b>To:</b> Mark Roberts <<a href="mailto:markro@cs.washington.edu">markro@cs.washington.edu</a>>; <a href="mailto:classfile-api-dev@openjdk.org">classfile-api-dev@openjdk.org</a><br><b>Subject:</b> Re: [External] : How build an abstract method?</p></div></div><p class="MsoNormal"> </p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;color:black">An abstract method does not have code. You shouldn't be calling withCode, which always generates a Code attribute, which is exactly what you don't want. If you are calling from ClassBuilder, call withMethod instead of withMethodBody.</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;color:black">Chen</span></p></div><div class="MsoNormal" align="center" style="text-align:center"><hr size="2" width="98%" align="center"></div><div id="divRplyFwdMsg"><p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Mark Roberts <<a href="mailto:markro@cs.washington.edu">markro@cs.washington.edu</a>><br><b>Sent:</b> Thursday, July 10, 2025 5:32 PM<br><b>To:</b> <a href="mailto:classfile-api-dev@openjdk.org">classfile-api-dev@openjdk.org</a> <<a href="mailto:classfile-api-dev@openjdk.org">classfile-api-dev@openjdk.org</a>><br><b>Cc:</b> Chen Liang <<a href="mailto:chen.l.liang@oracle.com">chen.l.liang@oracle.com</a>><br><b>Subject:</b> [External] : How build an abstract method?</span> </p><div><p class="MsoNormal"> </p></div></div><div><div><p class="xmsonormal">MethodBuilder.withCode won’t allow 0 length body.  Don’t see how to create an abstract method and define its parameters.</p><p class="xmsonormal"> </p><p class="xmsonormal">Thank you,</p><p class="xmsonormal">Mark</p><p class="xmsonormal"> </p></div></div></div></body></html>