-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
extend library to include runtime method/constructor resolution? #7
Comments
Apache Commons BeanUtils looks like it sort of vaguely does something like what I want, but I have no idea how good it is, I'm skeptical from the javadoc. What I'd really like is a way to do this:
|
On Tue, May 17, 2011 at 7:21 AM, jason-s
Ah cool. I like SO... so much more efficient information dispersal, I
Hmmh. It does match overridden methods, so in that it should help.
Generics are not necessarily as problematic as other parts, because I am definitely interested in expanding classmate in useful -+ Tatu +- |
OK, great -- just to clarify, I'm looking at overload resolution. (Override resolution seems straightforward, but maybe I've missed something) |
Ah... so just methods that have same name but differing arguments? This is not currently supported, but might be easy to add. Just need to figure out what would be best way to expose it via interface, since it is sort of alternative view to grouping of things |
I have this problem I'm trying to solve, namely that I'm doing runtime dispatch:
where I need to lookup the matching public method(s) of object and if there's a single "most specific method" (in the JLS 15.12 sense) then I need to invoke it, otherwise I throw an error.
This is turning out to be rather difficult, and I was surprised that Java doesn't give you any help.
(I asked this question on StackOverflow: http://stackoverflow.com/questions/6021109/java-runtime-method-resolution
and one of the answerers referred me to java-classmate.)
It doesn't look like java-classmate presently helps accomplish this.
Would you be willing to include this in the scope of java-classmate? I have a rudimentary approach for resolving methods, it works OK for subtyping + boxing/unboxing, and I'm still stumbling with varargs, but I haven't even touched generics and that seems like the really hairy bit.
The text was updated successfully, but these errors were encountered: