Skip to content

Conversation

@graalvmbot
Copy link

@graalvmbot graalvmbot commented Sep 29, 2025

See Class#getEnclosingMethod() and Class#getEnclosingConstructor().

Note that ResolvedJavaType#getEnclosingMethod() will return both, an enclosing method or an enclosing constructor. (ResolvedJavaMethod can represent both more like java.lang.reflect.Executable than java.lang.reflect.Method.) Thus, there is no ResolvedJavaType.getEnclosingConstructor().

Implemented via HotSpotJDKReflection. This will not work on libgraal, but the use case is Native Image where we can either use host reflection or have a Terminus context (oracle/graal#12236) with its own JVMCI implementation.

@zapster zapster self-assigned this Sep 29, 2025
@graalvmbot graalvmbot force-pushed the je/jvmci-enclosing-method-GR-70132 branch from 3e2cbd9 to f879fbe Compare October 2, 2025 10:03
@graalvmbot graalvmbot changed the title [GR-70132] JVMCI: Add ResolvedJavaType#{getEnclosingMethod,getEnclosingConstructor} [GR-70132] JVMCI: Add ResolvedJavaType#getEnclosingMethod Oct 2, 2025
@graalvmbot graalvmbot force-pushed the je/jvmci-enclosing-method-GR-70132 branch from f879fbe to 97eeb8f Compare October 2, 2025 10:54
@graalvmbot graalvmbot force-pushed the je/jvmci-enclosing-method-GR-70132 branch from 97eeb8f to ec0d856 Compare October 3, 2025 09:25
@graalvmbot graalvmbot force-pushed the je/jvmci-enclosing-method-GR-70132 branch from ec0d856 to 81f5065 Compare October 3, 2025 09:35
@graalvmbot graalvmbot merged commit b345181 into jdk25 Oct 3, 2025
54 checks passed
@graalvmbot graalvmbot deleted the je/jvmci-enclosing-method-GR-70132 branch October 3, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants