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

Print this page
rev 507 : 8047724: @since tag cleanup in jaxws
Reviewed-by:


  53  * The user would be required to create {@link JAXBContext} as
  54  * <tt>JAXBContext.newInstance(Dog.class,Cat.class)</tt>
  55  * (<tt>Animal</tt> will be automatically picked up since <tt>Dog</tt>
  56  * and <tt>Cat</tt> refers to it.)
  57  *
  58  * <p>
  59  * {@link XmlSeeAlso} annotation would allow you to write:
  60  * <pre>
  61  * @XmlSeeAlso({Dog.class,Cat.class})
  62  * class Animal {}
  63  * class Dog extends Animal {}
  64  * class Cat extends Animal {}
  65  * </pre>
  66  *
  67  * <p>
  68  * This would allow you to do <tt>JAXBContext.newInstance(Animal.class)</tt>.
  69  * By the help of this annotation, JAXB implementations will be able to
  70  * correctly bind <tt>Dog</tt> and <tt>Cat</tt>.
  71  *
  72  * @author Kohsuke Kawaguchi
  73  * @since JAXB2.1
  74  */
  75 @Target({ElementType.TYPE})
  76 @Retention(RUNTIME)
  77 public @interface XmlSeeAlso {
  78     Class[] value();
  79 }


  53  * The user would be required to create {@link JAXBContext} as
  54  * <tt>JAXBContext.newInstance(Dog.class,Cat.class)</tt>
  55  * (<tt>Animal</tt> will be automatically picked up since <tt>Dog</tt>
  56  * and <tt>Cat</tt> refers to it.)
  57  *
  58  * <p>
  59  * {@link XmlSeeAlso} annotation would allow you to write:
  60  * <pre>
  61  * @XmlSeeAlso({Dog.class,Cat.class})
  62  * class Animal {}
  63  * class Dog extends Animal {}
  64  * class Cat extends Animal {}
  65  * </pre>
  66  *
  67  * <p>
  68  * This would allow you to do <tt>JAXBContext.newInstance(Animal.class)</tt>.
  69  * By the help of this annotation, JAXB implementations will be able to
  70  * correctly bind <tt>Dog</tt> and <tt>Cat</tt>.
  71  *
  72  * @author Kohsuke Kawaguchi
  73  * @since 1.6, JAXB 2.1
  74  */
  75 @Target({ElementType.TYPE})
  76 @Retention(RUNTIME)
  77 public @interface XmlSeeAlso {
  78     Class[] value();
  79 }