ClassPrinter

Chen Liang liangchenblue at gmail.com
Mon Feb 10 00:53:48 UTC 2025


Hello Mark,
You can use the toDebugString defined on CompoundElement. Note that
ClassModel, FieldModel, MethodModel, CodeModel are CompoundElement.
https://bugs.openjdk.org/browse/JDK-8345774

We found that debug printing is necessary, but formatting them to json or
yaml consistently doesn't make so much sense as the print output is really
for human consumption. For programs, just work on the ClassFile API model
objects.

Regards,
Chen

On Sun, Feb 9, 2025 at 12:48 PM Mark Roberts <markro at cs.washington.edu>
wrote:

> With the removal of ‘components’ to jdk/internal what is the best way to
> get the functionality of ClassPrinter?
>
>
>
> Thank you, Mark
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20250209/b1b2dbe8/attachment.htm>


More information about the classfile-api-dev mailing list