Skip to content

feat(jdk-codemodel): resolve method invocations to MethodDescriptor#23

Merged
deer merged 1 commit intomainfrom
method_resolution
Apr 10, 2026
Merged

feat(jdk-codemodel): resolve method invocations to MethodDescriptor#23
deer merged 1 commit intomainfrom
method_resolution

Conversation

@deer
Copy link
Copy Markdown
Collaborator

@deer deer commented Apr 10, 2026

Adds ResolvedMethod, a @Singular Trait on MethodInvocation that points to the MethodDescriptor the call site refers to.

JdkExpressionConverter.visitMethodInvocation now calls resolveMethod, which walks javac's Trees.getElement on the method-select subtree to get the ExecutableElement, looks up the declaring type in the CodeModel, and matches by name, arity, and parameter type canonical names. If the declaring type is not in the CodeModel (JDK types, external libraries), no trait is attached. Three tests cover same-type calls, inherited methods resolving to the declaring supertype, and JDK calls producing no trait.

@deer deer merged commit b2ac3db into main Apr 10, 2026
1 check passed
@deer deer deleted the method_resolution branch April 10, 2026 18:53
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.

1 participant