IKVM java.util.List 重新映射到属性时出错!
领域:公共交通系统
语言:Java
工具:IKVM
我有一个类Line
,其中包含Stop
列表。
函数 getStops
返回一个 List
。
要将类中的 List 重新映射为 .NET 属性,我应该编写什么 XML?
我尝试了以下方法,但没有成功!
<property name="Stops" sig="()[Lumple.pts.domain.coreEntities.Stop;">
<getter name="getStops" sig="()Ljava.util.List<umple.pts.domain.coreEntities.Stop>;" />
<setter name="setStops" sig="([Lumple.pts.domain.coreEntities.Stop;)Z" />
</property>
此外,还有另一个类 EmergencyLine
,它只有 1 个额外属性:Status
。 IKVM中如何定义继承,是否需要?
Domain: Public Transportation System
Language: Java
Tool: IKVM
I have a class Line
which has a list of Stop
.
A function getStops
returns a List<Stop>
.
To remap the List in the class as a .NET property, what XML shall I write??
I tried the following and it did not work!
<property name="Stops" sig="()[Lumple.pts.domain.coreEntities.Stop;">
<getter name="getStops" sig="()Ljava.util.List<umple.pts.domain.coreEntities.Stop>;" />
<setter name="setStops" sig="([Lumple.pts.domain.coreEntities.Stop;)Z" />
</property>
Also, there is another class EmergencyLine
which has just 1 extra property: Status
. How can inheritance be defined in IKVM, is it needed or not??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Java VM 字节码不支持泛型(它们是通过 javac 编译器“擦除”实现的)。
getter 签名应与属性签名相同。
为了继承,你不需要做任何事情。
The Java VM bytecodes don't support generics (they are implemented by "erasure" by the javac compiler).
The getter signature should be the same as the property signature.
For the inheritance, you shouldn't need to do anything.