[External] : How build an abstract method?
Mark Roberts
markro at cs.washington.edu
Thu Jul 10 22:52:04 UTC 2025
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?
*From:* Chen Liang <chen.l.liang at oracle.com>
*Sent:* Thursday, July 10, 2025 3:46 PM
*To:* Mark Roberts <markro at cs.washington.edu>; classfile-api-dev at openjdk.org
*Subject:* Re: [External] : How build an abstract method?
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.
Chen
------------------------------
*From:* Mark Roberts <markro at cs.washington.edu>
*Sent:* Thursday, July 10, 2025 5:32 PM
*To:* classfile-api-dev at openjdk.org <classfile-api-dev at openjdk.org>
*Cc:* Chen Liang <chen.l.liang at oracle.com>
*Subject:* [External] : How build an abstract method?
MethodBuilder.withCode won’t allow 0 length body. Don’t see how to create
an abstract method and define its parameters.
Thank you,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20250710/76edf6c4/attachment.htm>
More information about the classfile-api-dev
mailing list