<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi, I indeed think by the design philosophy of the ClassFile API, this means a no - even if you have a ClassHierarchyResolver, it would not be useful, because ClassHierarchyInfo does not have accessors for non-ClassFile-API users to inspect; it only has two
 factory methods that create objects only distinguishable by the ClassFile API.</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I think if you are creating a library, ideally you should declare your own interface for getting class hierarchy, and you create a ClassFile with a CHROption using a CHR encapsulating your interface instance.</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Regards,</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Chen Liang</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Expert Programmer <chrlsvryptnm@gmail.com><br>
<b>Sent:</b> Friday, February 6, 2026 5:55 PM<br>
<b>To:</b> Chen Liang <chen.l.liang@oracle.com><br>
<b>Cc:</b> classfile-api-dev@openjdk.org <classfile-api-dev@openjdk.org><br>
<b>Subject:</b> [External] : Re: Getter for ClassHierarchyResolverOption in ClassFile?</font>
<div> </div>
</div>
<div>
<div dir="ltr">I presume this was a no then? If so, that makes sense. I guess I can just reflect and grab it.</div>
<br>
<div class="x_gmail_quote x_gmail_quote_container">
<div dir="ltr" class="x_gmail_attr">On Thu, Feb 5, 2026 at 9:32 PM Expert Programmer <<a href="mailto:chrlsvryptnm@gmail.com">chrlsvryptnm@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>While it is possible to request a ClassHierarchyResolver directly from the user, it seems rather pointless as I am already passing the ClassFile around to have it available for parsing and transformations, and thus passing the ClassHierarchyResolver potentially
 contained within around. If you don't think it's needed I completely understand, I just figured it wouldn't hurt to ask. <br>
</div>
Sorry for the duplicate mail.</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, Feb 5, 2026 at 6:44 PM Chen Liang <<a href="mailto:chen.l.liang@oracle.com" target="_blank">chen.l.liang@oracle.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<div dir="ltr">
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello, I think ClassFile is designed so that a user create their own instance to perform operations. I don't envision using it as an argument to non-ClassFile-API endpoints. Can't you request a ClassHierarchyResolver directly?</div>
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
-Chen</div>
<div id="x_m_7420222384755255722m_-3953948963607193099appendonsend"></div>
<hr style="display:inline-block; width:98%">
<div id="x_m_7420222384755255722m_-3953948963607193099divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> classfile-api-dev <<a href="mailto:classfile-api-dev-retn@openjdk.org" target="_blank">classfile-api-dev-retn@openjdk.org</a>>
 on behalf of Expert Programmer <<a href="mailto:chrlsvryptnm@gmail.com" target="_blank">chrlsvryptnm@gmail.com</a>><br>
<b>Sent:</b> Thursday, February 5, 2026 5:39 PM<br>
<b>To:</b> <a href="mailto:classfile-api-dev@openjdk.org" target="_blank">classfile-api-dev@openjdk.org</a> <<a href="mailto:classfile-api-dev@openjdk.org" target="_blank">classfile-api-dev@openjdk.org</a>><br>
<b>Subject:</b> Getter for ClassHierarchyResolverOption in ClassFile?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello,</div>
<div>Has it been considered before to add any form of getters for Options in a ClassFile? I would like to access the ClassHierarchyResolverOption from the ClassFile, to allow determining if a given class extends from / implements another. <br>
</div>
<div>Thank you for your time, C.</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</body>
</html>