On Thu, 29 Jun 2023 13:23:51 GMT, Brian Goetz <briango...@openjdk.org> wrote:
>> 5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, >> FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a >> typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or >> MethodTypeDesc). >> >> This API is not added to NameAndTypeEntry itself, for a NameAndTypeEntry >> only knows if its type should be a field or method type from the other >> entries that refer to it. >> >> This is one of the issues discussed in this mailing list thread: >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html > > src/java.base/share/classes/jdk/internal/classfile/constantpool/InvokeDynamicEntry.java > line 46: > >> 44: default MethodTypeDesc typeSymbol() { >> 45: return Util.methodTypeSymbol(nameAndType()); >> 46: } > > Similar comment as with CondyEntry -- reduce usage of Util::methodTypeSymbol > in this class (Would like to do the same in various ::count methods, but unfortunately MemberRefEntry is too general; would have to rejigger the various XxxRefEntry types.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14706#discussion_r1246619062