Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以让 JAXB 2.0 XJC 编译器为我生成一个泛型类吗?
一些简单的事情: -
public class Shape<T> { T myShape; // getter / setter }
我在规范中看到了这方面的参考资料,但不确定我是否正确阅读。我总是得到对象引用。
我不这么认为,不。然而,编写一个 XJC 插件来很好地控制生成的代码是很容易的。