org.eclipse.jdt.core.IMethod中的getParameterTypes方法为何返回了QString?

fm2005 2010-04-20 11:10:04
org.eclipse.jdt.core.IMethod中的getParameterTypes方法用来返回该方法的参数类型,想问一下,为什么对于String类型参数,它却返回了QString?这是为什么?
好像对于其他的对象类型,前边也都加了个Q,真是奇怪。
...全文
284 3 打赏 收藏 转发到动态 举报
写回复
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
fm2005 2010-04-20
  • 打赏
  • 举报
回复
不是的,可能我没有表述明白,官方API如下:
getParameterTypes

String[] getParameterTypes()
Returns the type signatures for the parameters of this method. Returns an empty array if this method has no parameters. This is a handle-only method.
For example, a source method declared as public void foo(String text, int length) would return the array {"QString;","I"}.

The type signatures may be either unresolved (for source types) or resolved (for binary types), and either basic (for basic types) or rich (for parameterized types). See Signature for details.

Returns:
the type signatures for the parameters of this method, an empty array if this method has no parameters
See Also:
Signature

我的疑问就在于上方标红的QString?
zazwin 2010-04-20
  • 打赏
  • 举报
回复
我对你的问题只有一种解释,就是在这个IMethod类中的这个getParameterTypes()方法在声明时定义的返回类型是QString,至于其他类型为何都加了个Q,你也可以在前边再加个Q或一个_,比如QQ_String!因为他应该是这个API设计者自定义的一些对基本类型的处理类!.....
fm2005 2010-04-20
  • 打赏
  • 举报
回复
已解决,看
See Also:
Signature

就解决了~

62,566

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告