Bug 560249 - [functional debug expr] Provide access to non-public items (fields, methods) from eclosing classes
Summary: [functional debug expr] Provide access to non-public items (fields, methods) ...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.15   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 560247
  Show dependency tree
 
Reported: 2020-02-17 20:51 EST by Jesper Moller CLA
Modified: 2024-02-12 05:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Moller CLA 2020-02-17 20:51:19 EST
The snippet class is loaded alongside the surrounding class, but not as a nestmate or subclass or anything, so we can't use normal access checks.
We can, however, instantiate a MethodHandles.Lookup object relative to the surrounding class, and use that to make MethodHandles for putting and getting fields.

For non-public methods, we may have to make lambda exprssions to cover those (e..g "String::length"  == "(String s) -> s.length()", or invoke LmabdaMetafactpry directly.
Comment 1 Eclipse Genie CLA 2022-02-21 17:24:49 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2024-02-12 05:14:18 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.