New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename methods Reflect#on(Class) and Reflect#on(String) to onClass() to avoid ambiguities #78

lukaseder opened this Issue Feb 11, 2019 · 1 comment


None yet
1 participant
Copy link

lukaseder commented Feb 11, 2019

The current overloading of Reflect.on() is unfortunate in a few cases where people want to reflect on instances of String or Class, but accidentally bind to the more specific methods that do something quite different from Reflect#on(Object). See e.g. #55

Those methods shouldn't overload the base method, but have an entirely different name. The old methods will stay in place and will be deprecated to document this change.


This comment has been minimized.

Copy link
Member Author

lukaseder commented Feb 11, 2019

While the change is quite intrusive (lots of deprecations in calling code), it is not backwards incompatible. We'll remove the deprecated methods in jOOR 1.0. When reflecting on String or Class instances, callers still have to cast the arguments in order to bind to the non-deprecated methods.

lukaseder added a commit that referenced this issue Feb 11, 2019

@lukaseder lukaseder added the R: Fixed label Feb 11, 2019

@lukaseder lukaseder closed this Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment