FasterXML / FasterXML/java-classmate

extend library to include runtime method/constructor resolution?

未關閉
#7 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
266
分支
47
平均合併
1 小時 42 分鐘
30 天內合併 PR
1

描述

I have this problem I'm trying to solve, namely that I'm doing runtime dispatch:

```
Object dispatch(Object object, String methodname, Class argTypes, Object[] args);
```

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。