Review Request JDK-8186050: StackFrame should provide the method signature

mandy chung mandy.chung at oracle.com
Wed Aug 30 17:24:24 UTC 2017


On 8/30/17 10:14 AM, Paul Sandoz wrote:
>> On 30 Aug 2017, at 10:01, mandy chung <mandy.chung at oracle.com> wrote:
>>
>>
>> On 8/30/17 12:25 AM, Remi Forax wrote:
>>> Hi Mandy,
>>> thanks for taking care of this.
>>>
>>> In my opinion, we should provide both getMethodType() and getDescriptor(),
>>> getDescriptor() is handy for logging (finding the right overload when line numbers are not present) and getMethodType() is the one you whant if you want to inspect the runtime view of the stack frames (and by example interact with java.lang.invoke). For me, it's the same reason that give us getDeclaringClass() and getClassName() in the current API.
>>>
>>> So getDescriptor() can be called with no restriction but getMethodType() requires RETAIN_CLASS_REFERENCE.
>> This is a good point.  RETAIN_CLASS_REFERENCE could cover it.
>>
> Yes, i had this in mind in the background of my initial reply.

My apology for missing that.
>> MethodType is in java.lang.invoke package.  I have to check the history if introducing dependency from java.lang to java.lang.invoke packages (which I think probably ok).

Do you know any history whether the dependency from java.lang to 
java.lang.invoke has been discussed previously?

Mandy



More information about the core-libs-dev mailing list