src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java

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


  70  *       t.transform(source,new StreamResult(System.out));
  71  *    </pre>
  72  * </blockquote>
  73  *
  74  * <p>
  75  * The fact that JAXBSource derives from SAXSource is an implementation
  76  * detail. Thus in general applications are strongly discouraged from
  77  * accessing methods defined on SAXSource. In particular,
  78  * the setXMLReader and setInputSource methods shall never be called.
  79  * The XMLReader object obtained by the getXMLReader method shall
  80  * be used only for parsing the InputSource object returned by
  81  * the getInputSource method.
  82  *
  83  * <p>
  84  * Similarly the InputSource object obtained by the getInputSource
  85  * method shall be used only for being parsed by the XMLReader object
  86  * returned by the getXMLReader.
  87  *
  88  * @author
  89  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

  90  */
  91 public class JAXBSource extends SAXSource {
  92 
  93     /**
  94      * Creates a new {@link javax.xml.transform.Source} for the given content object.
  95      *
  96      * @param   context
  97      *      JAXBContext that was used to create
  98      *      <code>contentObject</code>. This context is used
  99      *      to create a new instance of marshaller and must not be null.
 100      * @param   contentObject
 101      *      An instance of a JAXB-generated class, which will be
 102      *      used as a {@link javax.xml.transform.Source} (by marshalling it into XML).  It must
 103      *      not be null.
 104      * @throws JAXBException if an error is encountered while creating the
 105      * JAXBSource or if either of the parameters are null.
 106      */
 107     public JAXBSource( JAXBContext context, Object contentObject )
 108         throws JAXBException {
 109 




  70  *       t.transform(source,new StreamResult(System.out));
  71  *    </pre>
  72  * </blockquote>
  73  *
  74  * <p>
  75  * The fact that JAXBSource derives from SAXSource is an implementation
  76  * detail. Thus in general applications are strongly discouraged from
  77  * accessing methods defined on SAXSource. In particular,
  78  * the setXMLReader and setInputSource methods shall never be called.
  79  * The XMLReader object obtained by the getXMLReader method shall
  80  * be used only for parsing the InputSource object returned by
  81  * the getInputSource method.
  82  *
  83  * <p>
  84  * Similarly the InputSource object obtained by the getInputSource
  85  * method shall be used only for being parsed by the XMLReader object
  86  * returned by the getXMLReader.
  87  *
  88  * @author
  89  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
  90  * @since 1.6
  91  */
  92 public class JAXBSource extends SAXSource {
  93 
  94     /**
  95      * Creates a new {@link javax.xml.transform.Source} for the given content object.
  96      *
  97      * @param   context
  98      *      JAXBContext that was used to create
  99      *      <code>contentObject</code>. This context is used
 100      *      to create a new instance of marshaller and must not be null.
 101      * @param   contentObject
 102      *      An instance of a JAXB-generated class, which will be
 103      *      used as a {@link javax.xml.transform.Source} (by marshalling it into XML).  It must
 104      *      not be null.
 105      * @throws JAXBException if an error is encountered while creating the
 106      * JAXBSource or if either of the parameters are null.
 107      */
 108     public JAXBSource( JAXBContext context, Object contentObject )
 109         throws JAXBException {
 110