MethodTypeDesc.parameterList()
Mark Roberts
markro at cs.washington.edu
Fri Apr 25 21:54:05 UTC 2025
There seems to be an inconsistency in the treatment of parameters to inner
class constructors. Given that these two classes are inner classes:
private class Entry
{
final double key;
final Object value;
public Entry(double key, Object value) {
this.key = key;
this.value = value;
}
}
public class DuplicateElementException extends RuntimeException
{
DuplicateElementException() { }
DuplicateElementException(String s) { super(s); }
}
For the first, the local vars:
this, key, value
Param types:
MapQuick.PriorityQueue, double, java.lang.Object
Note that the type of ‘this’ is included in the list – this is not true for
every other case I have seen.
For the second, local vars:
this, this$0
Param types:
MapQuick.PriorityQueue
This agrees with the ‘normal’ case as MapQuick.PriorityQueue is associated
with ‘this$0’ and the type for ‘this’ is not included.
I had to add a lot of ugly code to work around this. It seems like
including the type of the ‘this’ pointer is a problem or am I missing
something?
Thank you,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20250425/69982ef5/attachment-0001.htm>
More information about the classfile-api-dev
mailing list