java - @xmlseealso 这个注释有人用过吗?
迷茫
迷茫 2017-04-17 14:37:20
0
0
556

For example, with the following class definitions:

class Animal {}
class Dog extends Animal {}
class Cat extends Animal {}

The user would be required to create JAXBContext as JAXBContext.newInstance(Dog.class,Cat.class) (Animal will be automatically picked up since Dog and Cat refers to it.)

XmlSeeAlso annotation would allow you to write:

@XmlSeeAlso({Dog.class,Cat.class})
class Animal {}
class Dog extends Animal {}
class Cat extends Animal {}

我想知道, 如何根据父类, 得到子类的对象.

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板