From chrlsvryptnm at gmail.com Thu Feb 5 23:39:43 2026 From: chrlsvryptnm at gmail.com (Expert Programmer) Date: Thu, 5 Feb 2026 17:39:43 -0600 Subject: Getter for ClassHierarchyResolverOption in ClassFile? Message-ID: Hello, 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. Thank you for your time, C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen.l.liang at oracle.com Fri Feb 6 00:44:46 2026 From: chen.l.liang at oracle.com (Chen Liang) Date: Fri, 6 Feb 2026 00:44:46 +0000 Subject: Getter for ClassHierarchyResolverOption in ClassFile? In-Reply-To: References: Message-ID: 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? -Chen ________________________________ From: classfile-api-dev on behalf of Expert Programmer Sent: Thursday, February 5, 2026 5:39 PM To: classfile-api-dev at openjdk.org Subject: Getter for ClassHierarchyResolverOption in ClassFile? Hello, 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. Thank you for your time, C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrlsvryptnm at gmail.com Fri Feb 6 03:32:40 2026 From: chrlsvryptnm at gmail.com (Expert Programmer) Date: Thu, 5 Feb 2026 21:32:40 -0600 Subject: Getter for ClassHierarchyResolverOption in ClassFile? In-Reply-To: References: Message-ID: 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. Sorry for the duplicate mail. On Thu, Feb 5, 2026 at 6:44?PM Chen Liang wrote: > 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? > > -Chen > ------------------------------ > *From:* classfile-api-dev on behalf > of Expert Programmer > *Sent:* Thursday, February 5, 2026 5:39 PM > *To:* classfile-api-dev at openjdk.org > *Subject:* Getter for ClassHierarchyResolverOption in ClassFile? > > Hello, > 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. > Thank you for your time, C. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrlsvryptnm at gmail.com Fri Feb 6 23:55:42 2026 From: chrlsvryptnm at gmail.com (Expert Programmer) Date: Fri, 6 Feb 2026 17:55:42 -0600 Subject: Getter for ClassHierarchyResolverOption in ClassFile? In-Reply-To: References: Message-ID: I presume this was a no then? If so, that makes sense. I guess I can just reflect and grab it. On Thu, Feb 5, 2026 at 9:32?PM Expert Programmer wrote: > 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. > Sorry for the duplicate mail. > > On Thu, Feb 5, 2026 at 6:44?PM Chen Liang wrote: > >> 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? >> >> -Chen >> ------------------------------ >> *From:* classfile-api-dev on behalf >> of Expert Programmer >> *Sent:* Thursday, February 5, 2026 5:39 PM >> *To:* classfile-api-dev at openjdk.org >> *Subject:* Getter for ClassHierarchyResolverOption in ClassFile? >> >> Hello, >> 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. >> Thank you for your time, C. >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen.l.liang at oracle.com Sat Feb 7 00:09:49 2026 From: chen.l.liang at oracle.com (Chen Liang) Date: Sat, 7 Feb 2026 00:09:49 +0000 Subject: [External] : Re: Getter for ClassHierarchyResolverOption in ClassFile? In-Reply-To: References: Message-ID: 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. 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. Regards, Chen Liang ________________________________ From: Expert Programmer Sent: Friday, February 6, 2026 5:55 PM To: Chen Liang Cc: classfile-api-dev at openjdk.org Subject: [External] : Re: Getter for ClassHierarchyResolverOption in ClassFile? I presume this was a no then? If so, that makes sense. I guess I can just reflect and grab it. On Thu, Feb 5, 2026 at 9:32?PM Expert Programmer > wrote: 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. Sorry for the duplicate mail. On Thu, Feb 5, 2026 at 6:44?PM Chen Liang > wrote: 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? -Chen ________________________________ From: classfile-api-dev > on behalf of Expert Programmer > Sent: Thursday, February 5, 2026 5:39 PM To: classfile-api-dev at openjdk.org > Subject: Getter for ClassHierarchyResolverOption in ClassFile? Hello, 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. Thank you for your time, C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrlsvryptnm at gmail.com Sat Feb 7 15:57:48 2026 From: chrlsvryptnm at gmail.com (Expert Programmer) Date: Sat, 7 Feb 2026 09:57:48 -0600 Subject: [External] : Re: Getter for ClassHierarchyResolverOption in ClassFile? In-Reply-To: References: Message-ID: Okay, I understand. Thank you for your time. On Fri, Feb 6, 2026, 6:09?PM Chen Liang wrote: > 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. > > 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. > > Regards, > Chen Liang > ------------------------------ > *From:* Expert Programmer > *Sent:* Friday, February 6, 2026 5:55 PM > *To:* Chen Liang > *Cc:* classfile-api-dev at openjdk.org > *Subject:* [External] : Re: Getter for ClassHierarchyResolverOption in > ClassFile? > > I presume this was a no then? If so, that makes sense. I guess I can just > reflect and grab it. > > On Thu, Feb 5, 2026 at 9:32?PM Expert Programmer > wrote: > > 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. > Sorry for the duplicate mail. > > On Thu, Feb 5, 2026 at 6:44?PM Chen Liang wrote: > > 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? > > -Chen > ------------------------------ > *From:* classfile-api-dev on behalf > of Expert Programmer > *Sent:* Thursday, February 5, 2026 5:39 PM > *To:* classfile-api-dev at openjdk.org > *Subject:* Getter for ClassHierarchyResolverOption in ClassFile? > > Hello, > 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. > Thank you for your time, C. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: