<div dir="ltr"><div>Hello,</div><div><br></div><div>I mentioned before that I think there is still a missing bit when it comes to custom code attributes, and mapping them using an AttributeMapper. Many code attributes point to a location, or area, within a method. This typically implies  specifying one or two byte code offsets within an attribute.</div><div><br></div><div>To implement this, I would need a possibility to translate offsets to labels within an attribute mapper, and vice versa. For example, if I created byte code from a different source, where a method consists of multiple files, I would want to mark what part of the method comes from what file.</div><div><br></div><div>I do not currently know of a way to do this in the Class File API. To resolve this, I would have hoped that the attribute reader method would be able to issue labels that are later issued when the code instructions are supplied. Similarly, I would have hoped that the attribute writer method would be capable of translating labels to byte code offsets.</div><div><br></div><div>In the same way, I would have hoped that all attributes such as LineNumberInfo of the LineNumberTableAttribute would expose bytecode offsets as labels and not as integers, as the latter does not really give any useful information by itself. This way, I could also write a custom LineNumberTableAttribute after a method is already created by issuing relevant labels, but by only writing the attribute when the entire method was visited. Sometimes this is necessary when generating code, when the information about the actual line numbers is only retrieved at a later stage that requires knowledge of the entire method.</div><div><br></div><div>As I understand it, the ClassFile API is supposed to be released in Java 24. Are there still plans to integrate such a change? After that it would require incompatible changes, therefore I had hoped this would make it into the final version.</div><div><br></div><div>Thanks! Rafael<br></div></div>