Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Support Java overloaded instance methods #339

Merged
merged 9 commits into from
Jan 6, 2016

Conversation

jponge
Copy link
Contributor

@jponge jponge commented Jan 2, 2016

This supports resolving and invalidating Java overloaded instance methods.

@jponge jponge self-assigned this Jan 2, 2016
@jponge jponge added this to the 3.1.0 milestone Jan 2, 2016
return Extractors.isPublic(m) &&
Extractors.isConcrete(m) &&
m.getName().equals(invocation.name()) &&
(m.getParameterCount() + 1 == invocation.arity()) || (m.isVarArgs() && (m.getParameterCount() <= invocation.arity()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like déjà vu... maybe TypeMatching.argumentsNumberMatches ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to try it :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn't fit.

@jponge
Copy link
Contributor Author

jponge commented Jan 5, 2016

@yloiseau This makes me think that FunctionCallSupport is a good refactoring candidate.

This PR focuses only on instance methods, but once refactored a bit we could improve FunctionCallSupport to also deal with overloaded Java static methods.

@jponge jponge changed the title Support Java overloaded methods Support Java overloaded instance methods Jan 5, 2016
@jponge
Copy link
Contributor Author

jponge commented Jan 5, 2016

Recorded #341 for overloaded static methods.

I'm ok with this PR, if you agree then I'll go ahead and merge.

@yloiseau
Copy link
Contributor

yloiseau commented Jan 5, 2016

👍

jponge added a commit that referenced this pull request Jan 6, 2016
Support Java overloaded instance methods
@jponge jponge merged commit 6c25aa5 into eclipse-archived:master Jan 6, 2016
@jponge jponge deleted the fix/java-overloaded-methods branch January 6, 2016 08:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants