< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlSeeAlso.java

Print this page

        

*** 49,61 **** * class Cat extends Animal {} * </pre> * * <p> * The user would be required to create {@link JAXBContext} as ! * <tt>JAXBContext.newInstance(Dog.class,Cat.class)</tt> ! * (<tt>Animal</tt> will be automatically picked up since <tt>Dog</tt> ! * and <tt>Cat</tt> refers to it.) * * <p> * {@link XmlSeeAlso} annotation would allow you to write: * <pre> * @XmlSeeAlso({Dog.class,Cat.class}) --- 49,61 ---- * class Cat extends Animal {} * </pre> * * <p> * The user would be required to create {@link JAXBContext} as ! * {@code JAXBContext.newInstance(Dog.class,Cat.class)} ! * ({@code Animal} will be automatically picked up since {@code Dog} ! * and {@code Cat} refers to it.) * * <p> * {@link XmlSeeAlso} annotation would allow you to write: * <pre> * @XmlSeeAlso({Dog.class,Cat.class})
*** 63,75 **** * class Dog extends Animal {} * class Cat extends Animal {} * </pre> * * <p> ! * This would allow you to do <tt>JAXBContext.newInstance(Animal.class)</tt>. * By the help of this annotation, JAXB implementations will be able to ! * correctly bind <tt>Dog</tt> and <tt>Cat</tt>. * * @author Kohsuke Kawaguchi * @since 1.6, JAXB 2.1 */ @Target({ElementType.TYPE}) --- 63,75 ---- * class Dog extends Animal {} * class Cat extends Animal {} * </pre> * * <p> ! * This would allow you to do {@code JAXBContext.newInstance(Animal.class)}. * By the help of this annotation, JAXB implementations will be able to ! * correctly bind {@code Dog} and {@code Cat}. * * @author Kohsuke Kawaguchi * @since 1.6, JAXB 2.1 */ @Target({ElementType.TYPE})
< prev index next >