How do I create a `LocalVariableInfo`?
Chen Liang
chen.l.liang at oracle.com
Mon Feb 3 20:21:16 UTC 2025
Hi Tesla,
In short, you can't. To write a local variable, the only way provided by the ClassFile API is to create a java.lang.classfile.instruction.LocalVariable, and send it to CodeBuilder::with, or just calling CodeBuilder::localVariable. The LocalVariableInfo interface exists to faithfully represent the contents of a LocalVariableTable attribute for class file parsing.
Regards,
Chen Liang
________________________________
From: core-libs-dev <core-libs-dev-retn at openjdk.org> on behalf of Tesla Zhang <ice1000kotlin at gmail.com>
Sent: Monday, February 3, 2025 2:16 PM
To: core-libs-dev at openjdk.org <core-libs-dev at openjdk.org>
Subject: How do I create a `LocalVariableInfo`?
I'm using classfile. It seems that the interface is sealed and either implementations are not exported.
Best,
Tesla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250203/f67ec6d6/attachment.htm>
More information about the core-libs-dev
mailing list