325N/A/*
325N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/Apackage com.sun.xml.internal.bind.v2.runtime;
325N/A
325N/Aimport java.io.BufferedWriter;
325N/Aimport java.io.Closeable;
325N/Aimport java.io.FileOutputStream;
325N/Aimport java.io.Flushable;
325N/Aimport java.io.IOException;
325N/Aimport java.io.OutputStream;
325N/Aimport java.io.OutputStreamWriter;
325N/Aimport java.io.UnsupportedEncodingException;
325N/Aimport java.io.Writer;
325N/A
325N/Aimport java.net.URI;
325N/Aimport javax.xml.bind.JAXBException;
325N/Aimport javax.xml.bind.MarshalException;
325N/Aimport javax.xml.bind.Marshaller;
325N/Aimport javax.xml.bind.PropertyException;
325N/Aimport javax.xml.bind.ValidationEvent;
325N/Aimport javax.xml.bind.ValidationEventHandler;
325N/Aimport javax.xml.bind.annotation.adapters.XmlAdapter;
325N/Aimport javax.xml.bind.attachment.AttachmentMarshaller;
325N/Aimport javax.xml.bind.helpers.AbstractMarshallerImpl;
325N/Aimport javax.xml.stream.XMLEventWriter;
325N/Aimport javax.xml.stream.XMLStreamException;
325N/Aimport javax.xml.stream.XMLStreamWriter;
325N/Aimport javax.xml.transform.Result;
325N/Aimport javax.xml.transform.dom.DOMResult;
325N/Aimport javax.xml.transform.sax.SAXResult;
325N/Aimport javax.xml.transform.stream.StreamResult;
325N/Aimport javax.xml.validation.Schema;
325N/Aimport javax.xml.validation.ValidatorHandler;
325N/Aimport javax.xml.namespace.NamespaceContext;
325N/A
325N/Aimport com.sun.xml.internal.bind.api.JAXBRIContext;
325N/Aimport com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
325N/Aimport com.sun.xml.internal.bind.marshaller.DataWriter;
325N/Aimport com.sun.xml.internal.bind.marshaller.DumbEscapeHandler;
325N/Aimport com.sun.xml.internal.bind.marshaller.MinimumEscapeHandler;
325N/Aimport com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
325N/Aimport com.sun.xml.internal.bind.marshaller.NioEscapeHandler;
325N/Aimport com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
325N/Aimport com.sun.xml.internal.bind.marshaller.XMLWriter;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.C14nXmlOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.Encoded;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.ForkXmlOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.IndentingUTF8XmlOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.NamespaceContextImpl;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.SAXOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.XMLEventWriterOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput;
325N/Aimport com.sun.xml.internal.bind.v2.runtime.output.XmlOutput;
325N/Aimport com.sun.xml.internal.bind.v2.util.FatalAdapter;
325N/A
325N/Aimport java.net.URISyntaxException;
325N/Aimport org.w3c.dom.Document;
325N/Aimport org.w3c.dom.Node;
325N/Aimport org.xml.sax.SAXException;
325N/Aimport org.xml.sax.helpers.XMLFilterImpl;
325N/A
325N/A/**
325N/A * Implementation of {@link Marshaller} interface for the JAXB RI.
325N/A *
325N/A * <p>
325N/A * Eventually all the {@link #marshal} methods call into
325N/A * the {@link #write} method.
325N/A *
325N/A * @author Kohsuke Kawaguchi
325N/A * @author Vivek Pandey
325N/A */
325N/Apublic /*to make unit tests happy*/ final class MarshallerImpl extends AbstractMarshallerImpl implements ValidationEventHandler
325N/A{
325N/A /** Indentation string. Default is four whitespaces. */
325N/A private String indent = " ";
325N/A
325N/A /** Used to assign prefixes to namespace URIs. */
325N/A private NamespacePrefixMapper prefixMapper = null;
325N/A
325N/A /** Object that handles character escaping. */
325N/A private CharacterEscapeHandler escapeHandler = null;
325N/A
325N/A /** XML BLOB written after the XML declaration. */
325N/A private String header=null;
325N/A
325N/A /** reference to the context that created this object */
325N/A final JAXBContextImpl context;
325N/A
325N/A protected final XMLSerializer serializer;
325N/A
325N/A /**
325N/A * Non-null if we do the marshal-time validation.
325N/A */
325N/A private Schema schema;
325N/A
325N/A /** Marshaller.Listener */
325N/A private Listener externalListener = null;
325N/A
325N/A /** Configured for c14n? */
325N/A private boolean c14nSupport;
325N/A
325N/A // while createing XmlOutput those values may be set.
325N/A // if these are non-null they need to be cleaned up
325N/A private Flushable toBeFlushed;
325N/A private Closeable toBeClosed;
325N/A
325N/A /**
325N/A * @param assoc
325N/A * non-null if the marshaller is working inside {@link BinderImpl}.
325N/A */
325N/A public MarshallerImpl( JAXBContextImpl c, AssociationMap assoc ) {
325N/A context = c;
325N/A serializer = new XMLSerializer(this);
325N/A c14nSupport = context.c14nSupport;
325N/A
325N/A try {
325N/A setEventHandler(this);
325N/A } catch (JAXBException e) {
325N/A throw new AssertionError(e); // impossible
325N/A }
325N/A }
325N/A
325N/A public JAXBContextImpl getContext() {
325N/A return context;
325N/A }
325N/A
325N/A /**
325N/A * Marshals to {@link OutputStream} with the given in-scope namespaces
325N/A * taken into account.
325N/A *
325N/A * @since 2.1.5
325N/A */
325N/A public void marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace) throws JAXBException {
325N/A write(obj, createWriter(out), new StAXPostInitAction(inscopeNamespace,serializer));
325N/A }
325N/A
325N/A @Override
325N/A public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException {
325N/A write(obj, XMLStreamWriterOutput.create(writer,context), new StAXPostInitAction(writer,serializer));
325N/A }
325N/A
325N/A @Override
325N/A public void marshal(Object obj, XMLEventWriter writer) throws JAXBException {
325N/A write(obj, new XMLEventWriterOutput(writer), new StAXPostInitAction(writer,serializer));
325N/A }
325N/A
325N/A public void marshal(Object obj, XmlOutput output) throws JAXBException {
325N/A write(obj, output, null );
325N/A }
325N/A
325N/A /**
325N/A * Creates {@link XmlOutput} from the given {@link Result} object.
325N/A */
325N/A final XmlOutput createXmlOutput(Result result) throws JAXBException {
325N/A if (result instanceof SAXResult)
325N/A return new SAXOutput(((SAXResult) result).getHandler());
325N/A
325N/A if (result instanceof DOMResult) {
325N/A final Node node = ((DOMResult) result).getNode();
325N/A
325N/A if (node == null) {
325N/A Document doc = JAXBContextImpl.createDom();
325N/A ((DOMResult) result).setNode(doc);
325N/A return new SAXOutput(new SAX2DOMEx(doc));
325N/A } else {
325N/A return new SAXOutput(new SAX2DOMEx(node));
325N/A }
325N/A }
325N/A if (result instanceof StreamResult) {
325N/A StreamResult sr = (StreamResult) result;
325N/A
325N/A if (sr.getWriter() != null)
325N/A return createWriter(sr.getWriter());
325N/A else if (sr.getOutputStream() != null)
325N/A return createWriter(sr.getOutputStream());
325N/A else if (sr.getSystemId() != null) {
325N/A String fileURL = sr.getSystemId();
325N/A
325N/A try {
325N/A fileURL = new URI(fileURL).getPath();
325N/A } catch (URISyntaxException use) {
325N/A // otherwise assume that it's a file name
325N/A }
325N/A
325N/A try {
325N/A FileOutputStream fos = new FileOutputStream(fileURL);
325N/A assert toBeClosed==null;
325N/A toBeClosed = fos;
325N/A return createWriter(fos);
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A }
325N/A }
325N/A }
325N/A
325N/A // unsupported parameter type
325N/A throw new MarshalException(Messages.UNSUPPORTED_RESULT.format());
325N/A }
325N/A
325N/A /**
325N/A * Creates an appropriate post-init action object.
325N/A */
325N/A final Runnable createPostInitAction(Result result) {
325N/A if (result instanceof DOMResult) {
325N/A Node node = ((DOMResult) result).getNode();
325N/A return new DomPostInitAction(node,serializer);
325N/A }
325N/A return null;
325N/A }
325N/A
325N/A public void marshal(Object target,Result result) throws JAXBException {
325N/A write(target, createXmlOutput(result), createPostInitAction(result));
325N/A }
325N/A
325N/A
325N/A /**
325N/A * Used by {@link BridgeImpl} to write an arbitrary object as a fragment.
325N/A */
325N/A protected final <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out,Runnable postInitAction) throws JAXBException {
325N/A try {
325N/A try {
325N/A prewrite(out, true, postInitAction);
325N/A serializer.startElement(rootTagName,null);
325N/A if(bi.jaxbType==Void.class || bi.jaxbType==void.class) {
325N/A // special case for void
325N/A serializer.endNamespaceDecls(null);
325N/A serializer.endAttributes();
325N/A } else { // normal cases
325N/A if(obj==null)
325N/A serializer.writeXsiNilTrue();
325N/A else
325N/A serializer.childAsXsiType(obj,"root",bi, false);
325N/A }
325N/A serializer.endElement();
325N/A postwrite();
325N/A } catch( SAXException e ) {
325N/A throw new MarshalException(e);
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A } catch (XMLStreamException e) {
325N/A throw new MarshalException(e);
325N/A } finally {
325N/A serializer.close();
325N/A }
325N/A } finally {
325N/A cleanUp();
325N/A }
325N/A }
325N/A
325N/A /**
325N/A * All the marshal method invocation eventually comes down to this call.
325N/A */
325N/A private void write(Object obj, XmlOutput out, Runnable postInitAction) throws JAXBException {
325N/A try {
325N/A if( obj == null )
325N/A throw new IllegalArgumentException(Messages.NOT_MARSHALLABLE.format());
325N/A
325N/A if( schema!=null ) {
325N/A // send the output to the validator as well
325N/A ValidatorHandler validator = schema.newValidatorHandler();
325N/A validator.setErrorHandler(new FatalAdapter(serializer));
325N/A // work around a bug in JAXP validator in Tiger
325N/A XMLFilterImpl f = new XMLFilterImpl() {
325N/A @Override
325N/A public void startPrefixMapping(String prefix, String uri) throws SAXException {
325N/A super.startPrefixMapping(prefix.intern(), uri.intern());
325N/A }
325N/A };
325N/A f.setContentHandler(validator);
325N/A out = new ForkXmlOutput( new SAXOutput(f) {
325N/A @Override
325N/A public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws SAXException, IOException, XMLStreamException {
325N/A super.startDocument(serializer, false, nsUriIndex2prefixIndex, nsContext);
325N/A }
325N/A @Override
325N/A public void endDocument(boolean fragment) throws SAXException, IOException, XMLStreamException {
325N/A super.endDocument(false);
325N/A }
325N/A }, out );
325N/A }
325N/A
325N/A try {
325N/A prewrite(out,isFragment(),postInitAction);
325N/A serializer.childAsRoot(obj);
325N/A postwrite();
325N/A } catch( SAXException e ) {
325N/A throw new MarshalException(e);
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A } catch (XMLStreamException e) {
325N/A throw new MarshalException(e);
325N/A } finally {
325N/A serializer.close();
325N/A }
325N/A } finally {
325N/A cleanUp();
325N/A }
325N/A }
325N/A
325N/A private void cleanUp() {
325N/A if(toBeFlushed!=null)
325N/A try {
325N/A toBeFlushed.flush();
325N/A } catch (IOException e) {
325N/A // ignore
325N/A }
325N/A if(toBeClosed!=null)
325N/A try {
325N/A toBeClosed.close();
325N/A } catch (IOException e) {
325N/A // ignore
325N/A }
325N/A toBeFlushed = null;
325N/A toBeClosed = null;
325N/A }
325N/A
325N/A // common parts between two write methods.
325N/A
325N/A private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException {
325N/A serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation());
325N/A if(postInitAction!=null) postInitAction.run();
325N/A if(prefixMapper!=null) {
325N/A // be defensive as we work with the user's code
325N/A String[] decls = prefixMapper.getContextualNamespaceDecls();
325N/A if(decls!=null) { // defensive check
325N/A for( int i=0; i<decls.length; i+=2 ) {
325N/A String prefix = decls[i];
325N/A String nsUri = decls[i+1];
325N/A if(nsUri!=null && prefix!=null) // defensive check
325N/A serializer.addInscopeBinding(nsUri,prefix);
325N/A }
325N/A }
325N/A }
325N/A serializer.setPrefixMapper(prefixMapper);
325N/A }
325N/A
325N/A private void postwrite() throws IOException, SAXException, XMLStreamException {
325N/A serializer.endDocument();
325N/A serializer.reconcileID(); // extra check
325N/A }
325N/A
325N/A
325N/A //
325N/A //
325N/A // create XMLWriter by specifing various type of output.
325N/A //
325N/A //
325N/A
325N/A protected CharacterEscapeHandler createEscapeHandler( String encoding ) {
325N/A if( escapeHandler!=null )
325N/A // user-specified one takes precedence.
325N/A return escapeHandler;
325N/A
325N/A if( encoding.startsWith("UTF") )
325N/A // no need for character reference. Use the handler
325N/A // optimized for that pattern.
325N/A return MinimumEscapeHandler.theInstance;
325N/A
325N/A // otherwise try to find one from the encoding
325N/A try {
325N/A // try new JDK1.4 NIO
325N/A return new NioEscapeHandler( getJavaEncoding(encoding) );
325N/A } catch( Throwable e ) {
325N/A // if that fails, fall back to the dumb mode
325N/A return DumbEscapeHandler.theInstance;
325N/A }
325N/A }
325N/A
325N/A public XmlOutput createWriter( Writer w, String encoding ) {
325N/A // XMLWriter doesn't do buffering, so do it here if it looks like a good idea
325N/A if(!(w instanceof BufferedWriter))
325N/A w = new BufferedWriter(w);
325N/A
325N/A assert toBeFlushed==null;
325N/A toBeFlushed = w;
325N/A
325N/A CharacterEscapeHandler ceh = createEscapeHandler(encoding);
325N/A XMLWriter xw;
325N/A
325N/A if(isFormattedOutput()) {
325N/A DataWriter d = new DataWriter(w,encoding,ceh);
325N/A d.setIndentStep(indent);
325N/A xw=d;
325N/A } else
325N/A xw = new XMLWriter(w,encoding,ceh);
325N/A
325N/A xw.setXmlDecl(!isFragment());
325N/A xw.setHeader(header);
325N/A return new SAXOutput(xw); // TODO: don't we need a better writer?
325N/A }
325N/A
325N/A public XmlOutput createWriter(Writer w) {
325N/A return createWriter(w, getEncoding());
325N/A }
325N/A
325N/A public XmlOutput createWriter( OutputStream os ) throws JAXBException {
325N/A return createWriter(os, getEncoding());
325N/A }
325N/A
325N/A public XmlOutput createWriter( OutputStream os, String encoding ) throws JAXBException {
325N/A // UTF8XmlOutput does buffering on its own, and
325N/A // otherwise createWriter(Writer) inserts a buffering,
325N/A // so no point in doing a buffering here.
325N/A
325N/A if(encoding.equals("UTF-8")) {
325N/A Encoded[] table = context.getUTF8NameTable();
325N/A final UTF8XmlOutput out;
325N/A if(isFormattedOutput())
325N/A out = new IndentingUTF8XmlOutput(os, indent, table, escapeHandler);
325N/A else {
325N/A if(c14nSupport)
325N/A out = new C14nXmlOutput(os, table, context.c14nSupport, escapeHandler);
325N/A else
325N/A out = new UTF8XmlOutput(os, table, escapeHandler);
325N/A }
325N/A if(header!=null)
325N/A out.setHeader(header);
325N/A return out;
325N/A }
325N/A
325N/A try {
325N/A return createWriter(
325N/A new OutputStreamWriter(os,getJavaEncoding(encoding)),
325N/A encoding );
325N/A } catch( UnsupportedEncodingException e ) {
325N/A throw new MarshalException(
325N/A Messages.UNSUPPORTED_ENCODING.format(encoding),
325N/A e );
325N/A }
325N/A }
325N/A
325N/A
325N/A @Override
325N/A public Object getProperty(String name) throws PropertyException {
325N/A if( INDENT_STRING.equals(name) )
325N/A return indent;
325N/A if( ENCODING_HANDLER.equals(name) || ENCODING_HANDLER2.equals(name) )
325N/A return escapeHandler;
325N/A if( PREFIX_MAPPER.equals(name) )
325N/A return prefixMapper;
325N/A if( XMLDECLARATION.equals(name) )
325N/A return !isFragment();
325N/A if( XML_HEADERS.equals(name) )
325N/A return header;
325N/A if( C14N.equals(name) )
325N/A return c14nSupport;
325N/A if ( OBJECT_IDENTITY_CYCLE_DETECTION.equals(name))
325N/A return serializer.getObjectIdentityCycleDetection();
325N/A
325N/A return super.getProperty(name);
325N/A }
325N/A
325N/A @Override
325N/A public void setProperty(String name, Object value) throws PropertyException {
325N/A if( INDENT_STRING.equals(name) ) {
325N/A checkString(name, value);
325N/A indent = (String)value;
325N/A return;
325N/A }
325N/A if( ENCODING_HANDLER.equals(name) || ENCODING_HANDLER2.equals(name)) {
325N/A if(!(value instanceof CharacterEscapeHandler))
325N/A throw new PropertyException(
325N/A Messages.MUST_BE_X.format(
325N/A name,
325N/A CharacterEscapeHandler.class.getName(),
325N/A value.getClass().getName() ) );
325N/A escapeHandler = (CharacterEscapeHandler)value;
325N/A return;
325N/A }
325N/A if( PREFIX_MAPPER.equals(name) ) {
325N/A if(!(value instanceof NamespacePrefixMapper))
325N/A throw new PropertyException(
325N/A Messages.MUST_BE_X.format(
325N/A name,
325N/A NamespacePrefixMapper.class.getName(),
325N/A value.getClass().getName() ) );
325N/A prefixMapper = (NamespacePrefixMapper)value;
325N/A return;
325N/A }
325N/A if( XMLDECLARATION.equals(name) ) {
325N/A checkBoolean(name, value);
325N/A // com.sun.xml.internal.bind.xmlDeclaration is an alias for JAXB_FRAGMENT
325N/A // setting it to false is treated the same as setting fragment to true.
325N/A super.setProperty(JAXB_FRAGMENT, !(Boolean)value);
325N/A return;
325N/A }
325N/A if( XML_HEADERS.equals(name) ) {
325N/A checkString(name, value);
325N/A header = (String)value;
325N/A return;
325N/A }
325N/A if( C14N.equals(name) ) {
325N/A checkBoolean(name,value);
325N/A c14nSupport = (Boolean)value;
325N/A return;
325N/A }
325N/A if (OBJECT_IDENTITY_CYCLE_DETECTION.equals(name)) {
325N/A checkBoolean(name,value);
325N/A serializer.setObjectIdentityCycleDetection((Boolean)value);
325N/A return;
325N/A }
325N/A
325N/A super.setProperty(name, value);
325N/A }
325N/A
325N/A /*
325N/A * assert that the given object is a Boolean
325N/A */
325N/A private void checkBoolean( String name, Object value ) throws PropertyException {
325N/A if(!(value instanceof Boolean))
325N/A throw new PropertyException(
325N/A Messages.MUST_BE_X.format(
325N/A name,
325N/A Boolean.class.getName(),
325N/A value.getClass().getName() ) );
325N/A }
325N/A
325N/A /*
325N/A * assert that the given object is a String
325N/A */
325N/A private void checkString( String name, Object value ) throws PropertyException {
325N/A if(!(value instanceof String))
325N/A throw new PropertyException(
325N/A Messages.MUST_BE_X.format(
325N/A name,
325N/A String.class.getName(),
325N/A value.getClass().getName() ) );
325N/A }
325N/A
325N/A @Override
325N/A public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
325N/A if(type==null)
325N/A throw new IllegalArgumentException();
325N/A serializer.putAdapter(type,adapter);
325N/A }
325N/A
325N/A @Override
325N/A public <A extends XmlAdapter> A getAdapter(Class<A> type) {
325N/A if(type==null)
325N/A throw new IllegalArgumentException();
325N/A if(serializer.containsAdapter(type))
325N/A // so as not to create a new instance when this method is called
325N/A return serializer.getAdapter(type);
325N/A else
325N/A return null;
325N/A }
325N/A
325N/A @Override
325N/A public void setAttachmentMarshaller(AttachmentMarshaller am) {
325N/A serializer.attachmentMarshaller = am;
325N/A }
325N/A
325N/A @Override
325N/A public AttachmentMarshaller getAttachmentMarshaller() {
325N/A return serializer.attachmentMarshaller;
325N/A }
325N/A
325N/A @Override
325N/A public Schema getSchema() {
325N/A return schema;
325N/A }
325N/A
325N/A @Override
325N/A public void setSchema(Schema s) {
325N/A this.schema = s;
325N/A }
325N/A
325N/A /**
325N/A * Default error handling behavior fot {@link Marshaller}.
325N/A */
325N/A public boolean handleEvent(ValidationEvent event) {
325N/A // draconian by default
325N/A return false;
325N/A }
325N/A
325N/A @Override
325N/A public Listener getListener() {
325N/A return externalListener;
325N/A }
325N/A
325N/A @Override
325N/A public void setListener(Listener listener) {
325N/A externalListener = listener;
325N/A }
325N/A
325N/A // features supported
325N/A protected static final String INDENT_STRING = "com.sun.xml.internal.bind.indentString";
325N/A protected static final String PREFIX_MAPPER = "com.sun.xml.internal.bind.namespacePrefixMapper";
325N/A protected static final String ENCODING_HANDLER = "com.sun.xml.internal.bind.characterEscapeHandler";
325N/A protected static final String ENCODING_HANDLER2 = "com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler";
325N/A protected static final String XMLDECLARATION = "com.sun.xml.internal.bind.xmlDeclaration";
325N/A protected static final String XML_HEADERS = "com.sun.xml.internal.bind.xmlHeaders";
325N/A protected static final String C14N = JAXBRIContext.CANONICALIZATION_SUPPORT;
325N/A protected static final String OBJECT_IDENTITY_CYCLE_DETECTION = "com.sun.xml.internal.bind.objectIdentitityCycleDetection";
325N/A}