RFR: 8357987: [JVMCI] Add Support for Retrieving All Non-Static Methods of a ResolvedJavaType.
Tom Shull
duke at openjdk.org
Fri May 30 15:06:09 UTC 2025
On Thu, 29 May 2025 09:40:37 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> thinking about it more, it's probably better if we do no filtering and return all methods in `InstanceKlass->_methods`. How about something like `getAllMethods`:
>>
>> ```
>> /**
>> * Returns a list containing all methods present within this type. This list can include
>> * methods implicitly created and used by the VM.
>> * The returned List is unmodifiable; calls to any mutator method
>> * will always cause {@code UnsupportedOperationException} to be thrown.
>> *
>> * @param forceLink if {@code true}, forces this type to be {@link #link linked}
>> */
>> List<ResolvedJavaMethod> getAllMethods(boolean forceLink);
>
> Yes, that's a good idea - it's more future proof and lets the caller do the filtering.
>
> `This list can include methods implicitly created and used by the VM that are not present in {@link #getDeclaredMethods}.`
I changed it now to be `getAllMethods`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25498#discussion_r2114796740
More information about the graal-dev
mailing list