java.lang.classfile model enumeration order

Brian Goetz brian.goetz at oracle.com
Fri Nov 22 15:32:07 UTC 2024


Only for items whose order is significant to the classfile semantics.  
So instructions come in the order they appear, but methods, fields, 
attributes, etc, could come in any order.  Pattern matching is your 
friend here.


On 11/21/2024 7:12 PM, Mark Roberts wrote:
>
> Are there any rules/guarantees that the order of items in 
> ClassModel::methods() will match the order in ‘for (ClassElement ce : 
> cm)’  for the ce elements that are MethodModel?  And also for similar 
> items down the class hierarchy?
>
> Thank you, Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20241122/550c6689/attachment-0001.htm>


More information about the classfile-api-dev mailing list