Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
This commit is contained in:
@@ -29,8 +29,8 @@ public interface GenericMarshaller extends Marshaller {
|
||||
/**
|
||||
* Indicates whether this marshaller can marshal instances of the supplied generic type.
|
||||
* @param genericType the type that this marshaller is being asked if it can marshal
|
||||
* @return <code>true</code> if this marshaller can indeed marshal instances of the supplied type;
|
||||
* <code>false</code> otherwise
|
||||
* @return {@code true} if this marshaller can indeed marshal instances of the supplied type;
|
||||
* {@code false} otherwise
|
||||
*/
|
||||
boolean supports(Type genericType);
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ public interface GenericUnmarshaller extends Unmarshaller {
|
||||
/**
|
||||
* Indicates whether this marshaller can marshal instances of the supplied generic type.
|
||||
* @param genericType the type that this marshaller is being asked if it can marshal
|
||||
* @return <code>true</code> if this marshaller can indeed marshal instances of the supplied type;
|
||||
* <code>false</code> otherwise
|
||||
* @return {@code true} if this marshaller can indeed marshal instances of the supplied type;
|
||||
* {@code false} otherwise
|
||||
*/
|
||||
boolean supports(Type genericType);
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ import javax.xml.transform.Result;
|
||||
* Defines the contract for Object XML Mapping Marshallers. Implementations of this interface
|
||||
* can serialize a given Object to an XML Stream.
|
||||
*
|
||||
* <p>Although the <code>marshal</code> method accepts a <code>java.lang.Object</code> as its
|
||||
* first parameter, most <code>Marshaller</code> implementations cannot handle arbitrary
|
||||
* <code>Object</code>s. Instead, a object class must be registered with the marshaller,
|
||||
* <p>Although the {@code marshal} method accepts a {@code java.lang.Object} as its
|
||||
* first parameter, most {@code Marshaller} implementations cannot handle arbitrary
|
||||
* {@code Object}s. Instead, a object class must be registered with the marshaller,
|
||||
* or have a common base class.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -37,8 +37,8 @@ public interface Marshaller {
|
||||
/**
|
||||
* Indicates whether this marshaller can marshal instances of the supplied type.
|
||||
* @param clazz the class that this marshaller is being asked if it can marshal
|
||||
* @return <code>true</code> if this marshaller can indeed marshal instances of the supplied class;
|
||||
* <code>false</code> otherwise
|
||||
* @return {@code true} if this marshaller can indeed marshal instances of the supplied class;
|
||||
* {@code false} otherwise
|
||||
*/
|
||||
boolean supports(Class<?> clazz);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ package org.springframework.oxm;
|
||||
public abstract class MarshallingException extends XmlMappingException {
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingException</code> with the specified detail message.
|
||||
* Construct a {@code MarshallingException} with the specified detail message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
protected MarshallingException(String msg) {
|
||||
@@ -36,7 +36,7 @@ public abstract class MarshallingException extends XmlMappingException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingException</code> with the specified detail message
|
||||
* Construct a {@code MarshallingException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.oxm;
|
||||
public class MarshallingFailureException extends MarshallingException {
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingFailureException</code> with the specified detail message.
|
||||
* Construct a {@code MarshallingFailureException} with the specified detail message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public MarshallingFailureException(String msg) {
|
||||
@@ -33,7 +33,7 @@ public class MarshallingFailureException extends MarshallingException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingFailureException</code> with the specified detail message
|
||||
* Construct a {@code MarshallingFailureException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.oxm;
|
||||
public class UncategorizedMappingException extends XmlMappingException {
|
||||
|
||||
/**
|
||||
* Construct an <code>UncategorizedMappingException</code> with the specified detail message
|
||||
* Construct an {@code UncategorizedMappingException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -32,8 +32,8 @@ public interface Unmarshaller {
|
||||
/**
|
||||
* Indicates whether this unmarshaller can unmarshal instances of the supplied type.
|
||||
* @param clazz the class that this unmarshaller is being asked if it can marshal
|
||||
* @return <code>true</code> if this unmarshaller can indeed unmarshal to the supplied class;
|
||||
* <code>false</code> otherwise
|
||||
* @return {@code true} if this unmarshaller can indeed unmarshal to the supplied class;
|
||||
* {@code false} otherwise
|
||||
*/
|
||||
boolean supports(Class<?> clazz);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.oxm;
|
||||
public class UnmarshallingFailureException extends MarshallingException {
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingFailureException</code> with the specified detail message.
|
||||
* Construct a {@code MarshallingFailureException} with the specified detail message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public UnmarshallingFailureException(String msg) {
|
||||
@@ -33,7 +33,7 @@ public class UnmarshallingFailureException extends MarshallingException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a <code>MarshallingFailureException</code> with the specified detail message
|
||||
* Construct a {@code MarshallingFailureException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.oxm;
|
||||
public class ValidationFailureException extends XmlMappingException {
|
||||
|
||||
/**
|
||||
* Construct a <code>ValidationFailureException</code> with the specified detail message.
|
||||
* Construct a {@code ValidationFailureException} with the specified detail message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public ValidationFailureException(String msg) {
|
||||
@@ -33,7 +33,7 @@ public class ValidationFailureException extends XmlMappingException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a <code>ValidationFailureException</code> with the specified detail message
|
||||
* Construct a {@code ValidationFailureException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
public abstract class XmlMappingException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
* Construct an <code>XmlMappingException</code> with the specified detail message.
|
||||
* Construct an {@code XmlMappingException} with the specified detail message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
public XmlMappingException(String msg) {
|
||||
@@ -35,7 +35,7 @@ public abstract class XmlMappingException extends NestedRuntimeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an <code>XmlMappingException</code> with the specified detail message
|
||||
* Construct an {@code XmlMappingException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.oxm.XmlMappingException;
|
||||
public class CastorMappingException extends XmlMappingException {
|
||||
|
||||
/**
|
||||
* Construct a <code>CastorMappingException</code> with the specified detail message
|
||||
* Construct a {@code CastorMappingException} with the specified detail message
|
||||
* and nested exception.
|
||||
* @param msg the detail message
|
||||
* @param cause the nested exception
|
||||
|
||||
@@ -61,16 +61,16 @@ import org.springframework.util.xml.DomUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>Marshaller</code> interface for Castor. By default, Castor does not require any further
|
||||
* Implementation of the {@code Marshaller} interface for Castor. By default, Castor does not require any further
|
||||
* configuration, though setting target classes, target packages or providing a mapping file can be used to have more
|
||||
* control over the behavior of Castor.
|
||||
*
|
||||
* <p>If a target class is specified using <code>setTargetClass</code>, the <code>CastorMarshaller</code> can only be
|
||||
* <p>If a target class is specified using {@code setTargetClass}, the {@code CastorMarshaller} can only be
|
||||
* used to unmarshal XML that represents that specific class. If you want to unmarshal multiple classes, you have to
|
||||
* provide a mapping file using <code>setMappingLocations</code>.
|
||||
* provide a mapping file using {@code setMappingLocations}.
|
||||
*
|
||||
* <p>Due to limitations of Castor's API, it is required to set the encoding used for writing to output streams. It
|
||||
* defaults to <code>UTF-8</code>.
|
||||
* defaults to {@code UTF-8}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Jakub Narloch
|
||||
@@ -160,7 +160,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Castor target class. Alternative means of configuring <code>CastorMarshaller<code> for unmarshalling
|
||||
* Set the Castor target class. Alternative means of configuring {@code CastorMarshaller} for unmarshalling
|
||||
* multiple classes include use of mapping files, and specifying packages with Castor descriptor classes.
|
||||
*/
|
||||
public void setTargetClass(Class targetClass) {
|
||||
@@ -168,7 +168,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Castor target classes. Alternative means of configuring <code>CastorMarshaller<code> for unmarshalling
|
||||
* Set the Castor target classes. Alternative means of configuring {@code CastorMarshaller} for unmarshalling
|
||||
* multiple classes include use of mapping files, and specifying packages with Castor descriptor classes.
|
||||
*/
|
||||
public void setTargetClasses(Class[] targetClasses) {
|
||||
@@ -190,7 +190,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether this marshaller should validate in- and outgoing documents. <p>Default is <code>false</code>.
|
||||
* Set whether this marshaller should validate in- and outgoing documents. <p>Default is {@code false}.
|
||||
*
|
||||
* @see Marshaller#setValidation(boolean)
|
||||
*/
|
||||
@@ -200,7 +200,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
|
||||
/**
|
||||
* Set whether the Castor {@link Unmarshaller} should preserve "ignorable" whitespace. <p>Default is
|
||||
* <code>false</code>.
|
||||
* {@code false}.
|
||||
*
|
||||
* @see org.exolab.castor.xml.Unmarshaller#setWhitespacePreserve(boolean)
|
||||
*/
|
||||
@@ -210,7 +210,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
|
||||
/**
|
||||
* Set whether the Castor {@link Unmarshaller} should ignore attributes that do not match a specific field. <p>Default
|
||||
* is <code>true</code>: extra attributes are ignored.
|
||||
* is {@code true}: extra attributes are ignored.
|
||||
*
|
||||
* @see org.exolab.castor.xml.Unmarshaller#setIgnoreExtraAttributes(boolean)
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
/**
|
||||
* Set whether the Castor {@link Unmarshaller} should ignore elements that do not match a specific field. <p>Default
|
||||
* is
|
||||
* <code>false</code>, extra attributes are flagged as an error.
|
||||
* {@code false}, extra attributes are flagged as an error.
|
||||
*
|
||||
* @see org.exolab.castor.xml.Unmarshaller#setIgnoreExtraElements(boolean)
|
||||
*/
|
||||
@@ -416,7 +416,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the Castor <code>XMLContext</code>. Subclasses can override this to create a custom context. <p> The default
|
||||
* Create the Castor {@code XMLContext}. Subclasses can override this to create a custom context. <p> The default
|
||||
* implementation loads mapping files if defined, or the target class or packages if defined.
|
||||
*
|
||||
* @return the created resolver
|
||||
@@ -446,7 +446,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> for all classes, i.e. Castor supports arbitrary classes.
|
||||
* Returns {@code true} for all classes, i.e. Castor supports arbitrary classes.
|
||||
*/
|
||||
public boolean supports(Class<?> clazz) {
|
||||
return true;
|
||||
@@ -653,15 +653,15 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given <code>XMLException</code> to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy. <p> A boolean flag is used to indicate whether this exception
|
||||
* Convert the given {@code XMLException} to an appropriate exception from the
|
||||
* {@code org.springframework.oxm} hierarchy. <p> A boolean flag is used to indicate whether this exception
|
||||
* occurs
|
||||
* during marshalling or unmarshalling, since Castor itself does not make this distinction in its exception hierarchy.
|
||||
*
|
||||
* @param ex Castor <code>XMLException</code> that occurred
|
||||
* @param marshalling indicates whether the exception occurs during marshalling (<code>true</code>), or unmarshalling
|
||||
* (<code>false</code>)
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
* @param ex Castor {@code XMLException} that occurred
|
||||
* @param marshalling indicates whether the exception occurs during marshalling ({@code true}), or unmarshalling
|
||||
* ({@code false})
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
protected XmlMappingException convertCastorException(XMLException ex, boolean marshalling) {
|
||||
if (ex instanceof ValidationException) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.w3c.dom.Element;
|
||||
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
|
||||
/**
|
||||
* Parser for the <code><oxm:castor-marshaller/></code> element.
|
||||
* Parser for the {@code <oxm:castor-marshaller/>} element.
|
||||
*
|
||||
* @author Jakub Narloch
|
||||
* @since 3.1
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
/**
|
||||
* Parser for the <code><oxm:jaxb2-marshaller/> element.
|
||||
* Parser for the {@code <oxm:jaxb2-marshaller/>} element.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.w3c.dom.Element;
|
||||
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
|
||||
/**
|
||||
* Parser for the <code><oxm:jibx-marshaller/> element.
|
||||
* Parser for the {@code <oxm:jibx-marshaller/>} element.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
@@ -35,4 +35,4 @@ class JibxMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionPar
|
||||
return JIBX_MARSHALLER_CLASS_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandler;
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* {@link NamespaceHandler} for the '<code>oxm</code>' namespace.
|
||||
* {@link NamespaceHandler} for the '{@code oxm}' namespace.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for the <code><oxm:xmlbeans-marshaller/> element.
|
||||
* Parser for the {@code <oxm:xmlbeans-marshaller/>} element.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
|
||||
@@ -99,7 +99,7 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>Marshaller</code> interface for JAXB 2.0.
|
||||
* Implementation of the {@code Marshaller} interface for JAXB 2.0.
|
||||
*
|
||||
* <p>The typical usage will be to set either the "contextPath" or the "classesToBeBound"
|
||||
* property on this bean, possibly customize the marshaller and unmarshaller by setting
|
||||
@@ -235,18 +235,18 @@ public class Jaxb2Marshaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>JAXBContext</code> properties. These implementation-specific
|
||||
* properties will be set on the underlying <code>JAXBContext</code>.
|
||||
* Set the {@code JAXBContext} properties. These implementation-specific
|
||||
* properties will be set on the underlying {@code JAXBContext}.
|
||||
*/
|
||||
public void setJaxbContextProperties(Map<String, ?> jaxbContextProperties) {
|
||||
this.jaxbContextProperties = jaxbContextProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the JAXB <code>Marshaller</code> properties. These properties will be set on the
|
||||
* underlying JAXB <code>Marshaller</code>, and allow for features such as indentation.
|
||||
* Set the JAXB {@code Marshaller} properties. These properties will be set on the
|
||||
* underlying JAXB {@code Marshaller}, and allow for features such as indentation.
|
||||
* @param properties the properties
|
||||
* @see javax.xml.bind.Marshaller#setProperty(String,Object)
|
||||
* @see javax.xml.bind.Marshaller#setProperty(String, Object)
|
||||
* @see javax.xml.bind.Marshaller#JAXB_ENCODING
|
||||
* @see javax.xml.bind.Marshaller#JAXB_FORMATTED_OUTPUT
|
||||
* @see javax.xml.bind.Marshaller#JAXB_NO_NAMESPACE_SCHEMA_LOCATION
|
||||
@@ -257,24 +257,24 @@ public class Jaxb2Marshaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the JAXB <code>Unmarshaller</code> properties. These properties will be set on the
|
||||
* underlying JAXB <code>Unmarshaller</code>.
|
||||
* Set the JAXB {@code Unmarshaller} properties. These properties will be set on the
|
||||
* underlying JAXB {@code Unmarshaller}.
|
||||
* @param properties the properties
|
||||
* @see javax.xml.bind.Unmarshaller#setProperty(String,Object)
|
||||
* @see javax.xml.bind.Unmarshaller#setProperty(String, Object)
|
||||
*/
|
||||
public void setUnmarshallerProperties(Map<String, ?> properties) {
|
||||
this.unmarshallerProperties = properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the <code>Marshaller.Listener</code> to be registered with the JAXB <code>Marshaller</code>.
|
||||
* Specify the {@code Marshaller.Listener} to be registered with the JAXB {@code Marshaller}.
|
||||
*/
|
||||
public void setMarshallerListener(Marshaller.Listener marshallerListener) {
|
||||
this.marshallerListener = marshallerListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>Unmarshaller.Listener</code> to be registered with the JAXB <code>Unmarshaller</code>.
|
||||
* Set the {@code Unmarshaller.Listener} to be registered with the JAXB {@code Unmarshaller}.
|
||||
*/
|
||||
public void setUnmarshallerListener(Unmarshaller.Listener unmarshallerListener) {
|
||||
this.unmarshallerListener = unmarshallerListener;
|
||||
@@ -289,8 +289,8 @@ public class Jaxb2Marshaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the <code>XmlAdapter</code>s to be registered with the JAXB <code>Marshaller</code>
|
||||
* and <code>Unmarshaller</code>
|
||||
* Specify the {@code XmlAdapter}s to be registered with the JAXB {@code Marshaller}
|
||||
* and {@code Unmarshaller}
|
||||
*/
|
||||
public void setAdapters(XmlAdapter<?, ?>[] adapters) {
|
||||
this.adapters = adapters;
|
||||
@@ -311,7 +311,7 @@ public class Jaxb2Marshaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the schema language. Default is the W3C XML Schema: <code>http://www.w3.org/2001/XMLSchema"</code>.
|
||||
* Set the schema language. Default is the W3C XML Schema: {@code http://www.w3.org/2001/XMLSchema"}.
|
||||
* @see XMLConstants#W3C_XML_SCHEMA_NS_URI
|
||||
* @see XMLConstants#RELAXNG_NS_URI
|
||||
*/
|
||||
@@ -331,7 +331,7 @@ public class Jaxb2Marshaller
|
||||
|
||||
/**
|
||||
* Specify whether MTOM support should be enabled or not.
|
||||
* Default is <code>false</code>: marshalling using XOP/MTOM not being enabled.
|
||||
* Default is {@code false}: marshalling using XOP/MTOM not being enabled.
|
||||
*/
|
||||
public void setMtomEnabled(boolean mtomEnabled) {
|
||||
this.mtomEnabled = mtomEnabled;
|
||||
@@ -663,7 +663,7 @@ public class Jaxb2Marshaller
|
||||
|
||||
/**
|
||||
* Template method that can be overridden by concrete JAXB marshallers for custom initialization behavior.
|
||||
* Gets called after creation of JAXB <code>Marshaller</code>, and after the respective properties have been set.
|
||||
* Gets called after creation of JAXB {@code Marshaller}, and after the respective properties have been set.
|
||||
* <p>The default implementation sets the {@link #setMarshallerProperties(Map) defined properties}, the {@link
|
||||
* #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[])
|
||||
* schemas}, {@link #setMarshallerListener(javax.xml.bind.Marshaller.Listener) listener}, and
|
||||
@@ -749,7 +749,7 @@ public class Jaxb2Marshaller
|
||||
|
||||
/**
|
||||
* Template method that can be overridden by concrete JAXB marshallers for custom initialization behavior.
|
||||
* Gets called after creation of JAXB <code>Marshaller</code>, and after the respective properties have been set.
|
||||
* Gets called after creation of JAXB {@code Marshaller}, and after the respective properties have been set.
|
||||
* <p>The default implementation sets the {@link #setUnmarshallerProperties(Map) defined properties}, the {@link
|
||||
* #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[])
|
||||
* schemas}, {@link #setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener) listener}, and
|
||||
@@ -778,10 +778,10 @@ public class Jaxb2Marshaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given <code>JAXBException</code> to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy.
|
||||
* @param ex <code>JAXBException</code> that occured
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
* Convert the given {@code JAXBException} to an appropriate exception from the
|
||||
* {@code org.springframework.oxm} hierarchy.
|
||||
* @param ex {@code JAXBException} that occured
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
protected XmlMappingException convertJaxbException(JAXBException ex) {
|
||||
if (ex instanceof ValidationException) {
|
||||
|
||||
@@ -70,10 +70,10 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>Marshaller</code> and <code>Unmarshaller</code> interfaces for JiBX.
|
||||
* Implementation of the {@code Marshaller} and {@code Unmarshaller} interfaces for JiBX.
|
||||
*
|
||||
* <p>The typical usage will be to set the <code>targetClass</code> and optionally the
|
||||
* <code>bindingName</code> property on this bean.
|
||||
* <p>The typical usage will be to set the {@code targetClass} and optionally the
|
||||
* {@code bindingName} property on this bean.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
@@ -136,7 +136,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the number of nesting indent spaces. Default is <code>-1</code>, i.e. no indentation.
|
||||
* Set the number of nesting indent spaces. Default is {@code -1}, i.e. no indentation.
|
||||
*/
|
||||
public void setIndent(int indent) {
|
||||
this.indent = indent;
|
||||
@@ -426,7 +426,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
|
||||
|
||||
/**
|
||||
* Create a new <code>IMarshallingContext</code>, configured with the correct indentation.
|
||||
* Create a new {@code IMarshallingContext}, configured with the correct indentation.
|
||||
* @return the created marshalling context
|
||||
* @throws JiBXException in case of errors
|
||||
*/
|
||||
@@ -437,7 +437,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>IUnmarshallingContext</code>.
|
||||
* Create a new {@code IUnmarshallingContext}.
|
||||
* @return the created unmarshalling context
|
||||
* @throws JiBXException in case of errors
|
||||
*/
|
||||
@@ -446,14 +446,14 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given <code>JiBXException</code> to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy.
|
||||
* Convert the given {@code JiBXException} to an appropriate exception from the
|
||||
* {@code org.springframework.oxm} hierarchy.
|
||||
* <p>A boolean flag is used to indicate whether this exception occurs during marshalling or
|
||||
* unmarshalling, since JiBX itself does not make this distinction in its exception hierarchy.
|
||||
* @param ex <code>JiBXException</code> that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling (<code>true</code>),
|
||||
* or unmarshalling (<code>false</code>)
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
* @param ex {@code JiBXException} that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
|
||||
* or unmarshalling ({@code false})
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
public XmlMappingException convertJibxException(JiBXException ex, boolean marshalling) {
|
||||
if (ex instanceof ValidationException) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface MimeContainer {
|
||||
|
||||
/**
|
||||
* Indicate whether this container is a XOP package.
|
||||
* @return <code>true</code> when the constraints specified in
|
||||
* @return {@code true} when the constraints specified in
|
||||
* <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#identifying_xop_documents">Identifying XOP Documents</a>
|
||||
* are met
|
||||
* @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#xop_packages">XOP Packages</a>
|
||||
@@ -39,7 +39,7 @@ public interface MimeContainer {
|
||||
|
||||
/**
|
||||
* Turn this message into a XOP package.
|
||||
* @return <code>true</code> when the message actually is a XOP package
|
||||
* @return {@code true} when the message actually is a XOP package
|
||||
* @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#xop_packages">XOP Packages</a>
|
||||
*/
|
||||
boolean convertToXopPackage();
|
||||
@@ -52,7 +52,7 @@ public interface MimeContainer {
|
||||
void addAttachment(String contentId, DataHandler dataHandler);
|
||||
|
||||
/**
|
||||
* Return the attachment with the given content id, or <code>null</code> if not found.
|
||||
* Return the attachment with the given content id, or {@code null} if not found.
|
||||
* @param contentId the content id
|
||||
* @return the attachment, as a data handler
|
||||
*/
|
||||
|
||||
@@ -56,8 +56,8 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Abstract implementation of the <code>Marshaller</code> and <code>Unmarshaller</code> interface.
|
||||
* This implementation inspects the given <code>Source</code> or <code>Result</code>, and defers
|
||||
* Abstract implementation of the {@code Marshaller} and {@code Unmarshaller} interface.
|
||||
* This implementation inspects the given {@code Source} or {@code Result}, and defers
|
||||
* further handling to overridable template methods.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -75,15 +75,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
|
||||
|
||||
/**
|
||||
* Marshals the object graph with the given root into the provided <code>javax.xml.transform.Result</code>.
|
||||
* <p>This implementation inspects the given result, and calls <code>marshalDomResult</code>,
|
||||
* <code>marshalSaxResult</code>, or <code>marshalStreamResult</code>.
|
||||
* Marshals the object graph with the given root into the provided {@code javax.xml.transform.Result}.
|
||||
* <p>This implementation inspects the given result, and calls {@code marshalDomResult},
|
||||
* {@code marshalSaxResult}, or {@code marshalStreamResult}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param result the result to marshal to
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the result
|
||||
* @throws IllegalArgumentException if <code>result</code> if neither a <code>DOMResult</code>,
|
||||
* a <code>SAXResult</code>, nor a <code>StreamResult</code>
|
||||
* @throws IllegalArgumentException if {@code result} if neither a {@code DOMResult},
|
||||
* a {@code SAXResult}, nor a {@code StreamResult}
|
||||
* @see #marshalDomResult(Object, javax.xml.transform.dom.DOMResult)
|
||||
* @see #marshalSaxResult(Object, javax.xml.transform.sax.SAXResult)
|
||||
* @see #marshalStreamResult(Object, javax.xml.transform.stream.StreamResult)
|
||||
@@ -107,15 +107,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unmarshals the given provided <code>javax.xml.transform.Source</code> into an object graph.
|
||||
* <p>This implementation inspects the given result, and calls <code>unmarshalDomSource</code>,
|
||||
* <code>unmarshalSaxSource</code>, or <code>unmarshalStreamSource</code>.
|
||||
* Unmarshals the given provided {@code javax.xml.transform.Source} into an object graph.
|
||||
* <p>This implementation inspects the given result, and calls {@code unmarshalDomSource},
|
||||
* {@code unmarshalSaxSource}, or {@code unmarshalStreamSource}.
|
||||
* @param source the source to marshal from
|
||||
* @return the object graph
|
||||
* @throws IOException if an I/O Exception occurs
|
||||
* @throws XmlMappingException if the given source cannot be mapped to an object
|
||||
* @throws IllegalArgumentException if <code>source</code> is neither a <code>DOMSource</code>,
|
||||
* a <code>SAXSource</code>, nor a <code>StreamSource</code>
|
||||
* @throws IllegalArgumentException if {@code source} is neither a {@code DOMSource},
|
||||
* a {@code SAXSource}, nor a {@code StreamSource}
|
||||
* @see #unmarshalDomSource(javax.xml.transform.dom.DOMSource)
|
||||
* @see #unmarshalSaxSource(javax.xml.transform.sax.SAXSource)
|
||||
* @see #unmarshalStreamSource(javax.xml.transform.stream.StreamSource)
|
||||
@@ -139,11 +139,11 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>DocumentBuilder</code> that this marshaller will use for creating
|
||||
* DOM documents when passed an empty <code>DOMSource</code>.
|
||||
* Create a {@code DocumentBuilder} that this marshaller will use for creating
|
||||
* DOM documents when passed an empty {@code DOMSource}.
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the builder.
|
||||
* @param factory the <code>DocumentBuilderFactory</code> that the DocumentBuilder should be created with
|
||||
* @return the <code>DocumentBuilder</code>
|
||||
* @param factory the {@code DocumentBuilderFactory} that the DocumentBuilder should be created with
|
||||
* @return the {@code DocumentBuilder}
|
||||
* @throws ParserConfigurationException if thrown by JAXP methods
|
||||
*/
|
||||
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory)
|
||||
@@ -153,9 +153,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>DocumentBuilder</code> that this marshaller will use for creating
|
||||
* DOM documents when passed an empty <code>DOMSource</code>.
|
||||
* <p>The resulting <code>DocumentBuilderFactory</code> is cached, so this method
|
||||
* Create a {@code DocumentBuilder} that this marshaller will use for creating
|
||||
* DOM documents when passed an empty {@code DOMSource}.
|
||||
* <p>The resulting {@code DocumentBuilderFactory} is cached, so this method
|
||||
* will only be called once.
|
||||
* @return the DocumentBuilderFactory
|
||||
* @throws ParserConfigurationException if thrown by JAXP methods
|
||||
@@ -168,7 +168,7 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>XMLReader</code> that this marshaller will when passed an empty <code>SAXSource</code>.
|
||||
* Create a {@code XMLReader} that this marshaller will when passed an empty {@code SAXSource}.
|
||||
* @return the XMLReader
|
||||
* @throws SAXException if thrown by JAXP methods
|
||||
*/
|
||||
@@ -180,12 +180,12 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
// Marshalling
|
||||
|
||||
/**
|
||||
* Template method for handling <code>DOMResult</code>s.
|
||||
* <p>This implementation delegates to <code>marshalDomNode</code>.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param domResult the <code>DOMResult</code>
|
||||
* Template method for handling {@code DOMResult}s.
|
||||
* <p>This implementation delegates to {@code marshalDomNode}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param domResult the {@code DOMResult}
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the result
|
||||
* @throws IllegalArgumentException if the <code>domResult</code> is empty
|
||||
* @throws IllegalArgumentException if the {@code domResult} is empty
|
||||
* @see #marshalDomNode(Object, org.w3c.dom.Node)
|
||||
*/
|
||||
protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException {
|
||||
@@ -208,15 +208,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>StaxResult</code>s.
|
||||
* <p>This implementation delegates to <code>marshalXMLSteamWriter</code> or
|
||||
* <code>marshalXMLEventConsumer</code>, depending on what is contained in the
|
||||
* <code>StaxResult</code>.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* Template method for handling {@code StaxResult}s.
|
||||
* <p>This implementation delegates to {@code marshalXMLSteamWriter} or
|
||||
* {@code marshalXMLEventConsumer}, depending on what is contained in the
|
||||
* {@code StaxResult}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param staxResult a Spring {@link org.springframework.util.xml.StaxSource} or JAXP 1.4 {@link StAXSource}
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the result
|
||||
* @throws IllegalArgumentException if the <code>domResult</code> is empty
|
||||
* @see #marshalDomNode(Object,org.w3c.dom.Node)
|
||||
* @throws IllegalArgumentException if the {@code domResult} is empty
|
||||
* @see #marshalDomNode(Object, org.w3c.dom.Node)
|
||||
*/
|
||||
protected void marshalStaxResult(Object graph, Result staxResult) throws XmlMappingException {
|
||||
XMLStreamWriter streamWriter = StaxUtils.getXMLStreamWriter(staxResult);
|
||||
@@ -235,10 +235,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>SAXResult</code>s.
|
||||
* <p>This implementation delegates to <code>marshalSaxHandlers</code>.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param saxResult the <code>SAXResult</code>
|
||||
* Template method for handling {@code SAXResult}s.
|
||||
* <p>This implementation delegates to {@code marshalSaxHandlers}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param saxResult the {@code SAXResult}
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the result
|
||||
* @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler)
|
||||
*/
|
||||
@@ -250,15 +250,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>StreamResult</code>s.
|
||||
* <p>This implementation delegates to <code>marshalOutputStream</code> or <code>marshalWriter</code>,
|
||||
* depending on what is contained in the <code>StreamResult</code>
|
||||
* Template method for handling {@code StreamResult}s.
|
||||
* <p>This implementation delegates to {@code marshalOutputStream} or {@code marshalWriter},
|
||||
* depending on what is contained in the {@code StreamResult}
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param streamResult the <code>StreamResult</code>
|
||||
* @param streamResult the {@code StreamResult}
|
||||
* @throws IOException if an I/O Exception occurs
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the result
|
||||
* @throws IllegalArgumentException if <code>streamResult</code> does neither
|
||||
* contain an <code>OutputStream</code> nor a <code>Writer</code>
|
||||
* @throws IllegalArgumentException if {@code streamResult} does neither
|
||||
* contain an {@code OutputStream} nor a {@code Writer}
|
||||
*/
|
||||
protected void marshalStreamResult(Object graph, StreamResult streamResult)
|
||||
throws XmlMappingException, IOException {
|
||||
@@ -278,14 +278,14 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
// Unmarshalling
|
||||
|
||||
/**
|
||||
* Template method for handling <code>DOMSource</code>s.
|
||||
* <p>This implementation delegates to <code>unmarshalDomNode</code>.
|
||||
* If the given source is empty, an empty source <code>Document</code>
|
||||
* Template method for handling {@code DOMSource}s.
|
||||
* <p>This implementation delegates to {@code unmarshalDomNode}.
|
||||
* If the given source is empty, an empty source {@code Document}
|
||||
* will be created as a placeholder.
|
||||
* @param domSource the <code>DOMSource</code>
|
||||
* @param domSource the {@code DOMSource}
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given source cannot be mapped to an object
|
||||
* @throws IllegalArgumentException if the <code>domSource</code> is empty
|
||||
* @throws IllegalArgumentException if the {@code domSource} is empty
|
||||
* @see #unmarshalDomNode(org.w3c.dom.Node)
|
||||
*/
|
||||
protected Object unmarshalDomSource(DOMSource domSource) throws XmlMappingException {
|
||||
@@ -308,10 +308,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>StaxSource</code>s.
|
||||
* <p>This implementation delegates to <code>unmarshalXmlStreamReader</code> or
|
||||
* <code>unmarshalXmlEventReader</code>.
|
||||
* @param staxSource the <code>StaxSource</code>
|
||||
* Template method for handling {@code StaxSource}s.
|
||||
* <p>This implementation delegates to {@code unmarshalXmlStreamReader} or
|
||||
* {@code unmarshalXmlEventReader}.
|
||||
* @param staxSource the {@code StaxSource}
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given source cannot be mapped to an object
|
||||
*/
|
||||
@@ -332,9 +332,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>SAXSource</code>s.
|
||||
* <p>This implementation delegates to <code>unmarshalSaxReader</code>.
|
||||
* @param saxSource the <code>SAXSource</code>
|
||||
* Template method for handling {@code SAXSource}s.
|
||||
* <p>This implementation delegates to {@code unmarshalSaxReader}.
|
||||
* @param saxSource the {@code SAXSource}
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given source cannot be mapped to an object
|
||||
* @throws IOException if an I/O Exception occurs
|
||||
@@ -356,9 +356,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method for handling <code>StreamSource</code>s.
|
||||
* <p>This implementation defers to <code>unmarshalInputStream</code> or <code>unmarshalReader</code>.
|
||||
* @param streamSource the <code>StreamSource</code>
|
||||
* Template method for handling {@code StreamSource}s.
|
||||
* <p>This implementation defers to {@code unmarshalInputStream} or {@code unmarshalReader}.
|
||||
* @param streamSource the {@code StreamSource}
|
||||
* @return the object graph
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* @throws XmlMappingException if the given source cannot be mapped to an object
|
||||
@@ -379,9 +379,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
// Abstract template methods
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object graph to a DOM <code>Node</code>.
|
||||
* <p>In practice, node is be a <code>Document</code> node, a <code>DocumentFragment</code> node,
|
||||
* or a <code>Element</code> node. In other words, a node that accepts children.
|
||||
* Abstract template method for marshalling the given object graph to a DOM {@code Node}.
|
||||
* <p>In practice, node is be a {@code Document} node, a {@code DocumentFragment} node,
|
||||
* or a {@code Element} node. In other words, a node that accepts children.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param node the DOM node that will contain the result tree
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
|
||||
@@ -393,27 +393,27 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object to a StAX <code>XMLEventWriter</code>.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param eventWriter the <code>XMLEventWriter</code> to write to
|
||||
* Abstract template method for marshalling the given object to a StAX {@code XMLEventWriter}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param eventWriter the {@code XMLEventWriter} to write to
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
|
||||
*/
|
||||
protected abstract void marshalXmlEventWriter(Object graph, XMLEventWriter eventWriter)
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object to a StAX <code>XMLStreamWriter</code>.
|
||||
* Abstract template method for marshalling the given object to a StAX {@code XMLStreamWriter}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param streamWriter the <code>XMLStreamWriter</code> to write to
|
||||
* @param streamWriter the {@code XMLStreamWriter} to write to
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
|
||||
*/
|
||||
protected abstract void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter)
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object graph to a <code>OutputStream</code>.
|
||||
* Abstract template method for marshalling the given object graph to a {@code OutputStream}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param outputStream the <code>OutputStream</code> to write to
|
||||
* @param outputStream the {@code OutputStream} to write to
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the writer
|
||||
* @throws IOException if an I/O exception occurs
|
||||
*/
|
||||
@@ -421,10 +421,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException, IOException;
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object graph to a SAX <code>ContentHandler</code>.
|
||||
* Abstract template method for marshalling the given object graph to a SAX {@code ContentHandler}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param contentHandler the SAX <code>ContentHandler</code>
|
||||
* @param lexicalHandler the SAX2 <code>LexicalHandler</code>. Can be <code>null</code>.
|
||||
* @param contentHandler the SAX {@code ContentHandler}
|
||||
* @param lexicalHandler the SAX2 {@code LexicalHandler}. Can be {@code null}.
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the handlers
|
||||
*/
|
||||
protected abstract void marshalSaxHandlers(
|
||||
@@ -432,9 +432,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for marshalling the given object graph to a <code>Writer</code>.
|
||||
* Abstract template method for marshalling the given object graph to a {@code Writer}.
|
||||
* @param graph the root of the object graph to marshal
|
||||
* @param writer the <code>Writer</code> to write to
|
||||
* @param writer the {@code Writer} to write to
|
||||
* @throws XmlMappingException if the given object cannot be marshalled to the writer
|
||||
* @throws IOException if an I/O exception occurs
|
||||
*/
|
||||
@@ -442,7 +442,7 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException, IOException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling from a given DOM <code>Node</code>.
|
||||
* Abstract template method for unmarshalling from a given DOM {@code Node}.
|
||||
* @param node the DOM node that contains the objects to be unmarshalled
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given DOM node cannot be mapped to an object
|
||||
@@ -450,8 +450,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
protected abstract Object unmarshalDomNode(Node node) throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling from a given Stax <code>XMLEventReader</code>.
|
||||
* @param eventReader the <code>XMLEventReader</code> to read from
|
||||
* Abstract template method for unmarshalling from a given Stax {@code XMLEventReader}.
|
||||
* @param eventReader the {@code XMLEventReader} to read from
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given event reader cannot be converted to an object
|
||||
*/
|
||||
@@ -459,8 +459,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling from a given Stax <code>XMLStreamReader</code>.
|
||||
* @param streamReader the <code>XMLStreamReader</code> to read from
|
||||
* Abstract template method for unmarshalling from a given Stax {@code XMLStreamReader}.
|
||||
* @param streamReader the {@code XMLStreamReader} to read from
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given stream reader cannot be converted to an object
|
||||
*/
|
||||
@@ -468,8 +468,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling from a given <code>InputStream</code>.
|
||||
* @param inputStream the <code>InputStreamStream</code> to read from
|
||||
* Abstract template method for unmarshalling from a given {@code InputStream}.
|
||||
* @param inputStream the {@code InputStreamStream} to read from
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given stream cannot be converted to an object
|
||||
* @throws IOException if an I/O exception occurs
|
||||
@@ -478,8 +478,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException, IOException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling from a given <code>Reader</code>.
|
||||
* @param reader the <code>Reader</code> to read from
|
||||
* Abstract template method for unmarshalling from a given {@code Reader}.
|
||||
* @param reader the {@code Reader} to read from
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given reader cannot be converted to an object
|
||||
* @throws IOException if an I/O exception occurs
|
||||
@@ -488,9 +488,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
|
||||
throws XmlMappingException, IOException;
|
||||
|
||||
/**
|
||||
* Abstract template method for unmarshalling using a given SAX <code>XMLReader</code>
|
||||
* and <code>InputSource</code>.
|
||||
* @param xmlReader the SAX <code>XMLReader</code> to parse with
|
||||
* Abstract template method for unmarshalling using a given SAX {@code XMLReader}
|
||||
* and {@code InputSource}.
|
||||
* @param xmlReader the SAX {@code XMLReader} to parse with
|
||||
* @param inputSource the input source to parse from
|
||||
* @return the object graph
|
||||
* @throws XmlMappingException if the given reader and input source cannot be converted to an object
|
||||
|
||||
@@ -37,13 +37,13 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* {@link Source} implementation that uses a {@link Marshaller}.Can be constructed with a
|
||||
* <code>Marshaller</code> and an object to be marshalled.
|
||||
* {@code Marshaller} and an object to be marshalled.
|
||||
*
|
||||
* <p>Even though <code>MarshallingSource</code> extends from <code>SAXSource</code>, calling the methods of
|
||||
* <code>SAXSource</code> is <strong>not supported</strong>. In general, the only supported operation on this class is
|
||||
* to use the <code>XMLReader</code> obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
|
||||
* <p>Even though {@code MarshallingSource} extends from {@code SAXSource}, calling the methods of
|
||||
* {@code SAXSource} is <strong>not supported</strong>. In general, the only supported operation on this class is
|
||||
* to use the {@code XMLReader} obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
|
||||
* #getInputSource()}. Calling {@link #setXMLReader(XMLReader)} or {@link #setInputSource(InputSource)} will result in
|
||||
* <code>UnsupportedOperationException</code>s.
|
||||
* {@code UnsupportedOperationException}s.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
@@ -57,7 +57,7 @@ public class MarshallingSource extends SAXSource {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new <code>MarshallingSource</code> with the given marshaller and content.
|
||||
* Create a new {@code MarshallingSource} with the given marshaller and content.
|
||||
* @param marshaller the marshaller to use
|
||||
* @param content the object to be marshalled
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public class MarshallingSource extends SAXSource {
|
||||
|
||||
|
||||
/**
|
||||
* Return the <code>Marshaller</code> used by this <code>MarshallingSource</code>.
|
||||
* Return the {@code Marshaller} used by this {@code MarshallingSource}.
|
||||
*/
|
||||
public Marshaller getMarshaller() {
|
||||
return this.marshaller;
|
||||
@@ -85,7 +85,7 @@ public class MarshallingSource extends SAXSource {
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>UnsupportedOperationException</code>.
|
||||
* Throws a {@code UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public void setInputSource(InputSource inputSource) {
|
||||
@@ -93,7 +93,7 @@ public class MarshallingSource extends SAXSource {
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>UnsupportedOperationException</code>.
|
||||
* Throws a {@code UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public void setXMLReader(XMLReader reader) {
|
||||
|
||||
@@ -32,8 +32,8 @@ import org.springframework.core.io.Resource;
|
||||
public abstract class SaxResourceUtils {
|
||||
|
||||
/**
|
||||
* Create a SAX <code>InputSource</code> from the given resource.
|
||||
* <p>Sets the system identifier to the resource's <code>URL</code>, if available.
|
||||
* Create a SAX {@code InputSource} from the given resource.
|
||||
* <p>Sets the system identifier to the resource's {@code URL}, if available.
|
||||
* @param resource the resource
|
||||
* @return the input source created from the resource
|
||||
* @throws IOException if an I/O exception occurs
|
||||
@@ -48,7 +48,7 @@ public abstract class SaxResourceUtils {
|
||||
|
||||
/**
|
||||
* Retrieve the URL from the given resource as System ID.
|
||||
* <p>Returns <code>null</code> if it cannot be opened.
|
||||
* <p>Returns {@code null} if it cannot be opened.
|
||||
*/
|
||||
private static String getSystemId(Resource resource) {
|
||||
try {
|
||||
|
||||
@@ -63,10 +63,10 @@ import org.springframework.util.xml.StaxUtils;
|
||||
/**
|
||||
* Implementation of the {@link Marshaller} interface for Apache XMLBeans.
|
||||
*
|
||||
* <p>Options can be set by setting the <code>xmlOptions</code> property.
|
||||
* <p>Options can be set by setting the {@code xmlOptions} property.
|
||||
* The {@link XmlOptionsFactoryBean} is provided to easily set up an {@link XmlOptions} instance.
|
||||
*
|
||||
* <p>Unmarshalled objects can be validated by setting the <code>validating</code> property,
|
||||
* <p>Unmarshalled objects can be validated by setting the {@code validating} property,
|
||||
* or by calling the {@link #validate(XmlObject)} method directly. Invalid objects will
|
||||
* result in an {@link ValidationFailureException}.
|
||||
*
|
||||
@@ -87,7 +87,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
|
||||
|
||||
|
||||
/**
|
||||
* Set the <code>XmlOptions</code>.
|
||||
* Set the {@code XmlOptions}.
|
||||
* @see XmlOptionsFactoryBean
|
||||
*/
|
||||
public void setXmlOptions(XmlOptions xmlOptions) {
|
||||
@@ -95,7 +95,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the <code>XmlOptions</code>.
|
||||
* Return the {@code XmlOptions}.
|
||||
*/
|
||||
public XmlOptions getXmlOptions() {
|
||||
return this.xmlOptions;
|
||||
@@ -103,7 +103,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
|
||||
|
||||
/**
|
||||
* Set whether this marshaller should validate in- and outgoing documents.
|
||||
* Default is <code>false</code>.
|
||||
* Default is {@code false}.
|
||||
*/
|
||||
public void setValidating(boolean validating) {
|
||||
this.validating = validating;
|
||||
@@ -262,7 +262,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
|
||||
|
||||
|
||||
/**
|
||||
* Validate the given <code>XmlObject</code>.
|
||||
* Validate the given {@code XmlObject}.
|
||||
* @param object the xml object to validate
|
||||
* @throws ValidationFailureException if the given object is not valid
|
||||
*/
|
||||
@@ -288,13 +288,13 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
|
||||
|
||||
/**
|
||||
* Convert the given XMLBeans exception to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy.
|
||||
* {@code org.springframework.oxm} hierarchy.
|
||||
* <p>A boolean flag is used to indicate whether this exception occurs during marshalling or
|
||||
* unmarshalling, since XMLBeans itself does not make this distinction in its exception hierarchy.
|
||||
* @param ex XMLBeans Exception that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling (<code>true</code>),
|
||||
* or unmarshalling (<code>false</code>)
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
* @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
|
||||
* or unmarshalling ({@code false})
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
protected XmlMappingException convertXmlBeansException(Exception ex, boolean marshalling) {
|
||||
if (ex instanceof XMLStreamValidationException) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.apache.xmlbeans.XmlOptions;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
|
||||
/**
|
||||
* {@link FactoryBean} that configures an XMLBeans <code>XmlOptions</code> object
|
||||
* {@link FactoryBean} that configures an XMLBeans {@code XmlOptions} object
|
||||
* and provides it as a bean reference.
|
||||
*
|
||||
* <p>Typical usage will be to set XMLBeans options on this bean, and refer to it
|
||||
@@ -41,10 +41,10 @@ public class XmlOptionsFactoryBean implements FactoryBean<XmlOptions> {
|
||||
|
||||
|
||||
/**
|
||||
* Set options on the underlying <code>XmlOptions</code> object.
|
||||
* Set options on the underlying {@code XmlOptions} object.
|
||||
* <p>The keys of the supplied map should be one of the String constants
|
||||
* defined in <code>XmlOptions</code>, the values vary per option.
|
||||
* @see XmlOptions#put(Object,Object)
|
||||
* defined in {@code XmlOptions}, the values vary per option.
|
||||
* @see XmlOptions#put(Object, Object)
|
||||
* @see XmlOptions#SAVE_PRETTY_PRINT
|
||||
* @see XmlOptions#LOAD_STRIP_COMMENTS
|
||||
*/
|
||||
|
||||
@@ -73,13 +73,13 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>Marshaller</code> interface for XStream.
|
||||
* Implementation of the {@code Marshaller} interface for XStream.
|
||||
*
|
||||
* <p>By default, XStream does not require any further configuration,
|
||||
* though class aliases can be used to have more control over the behavior of XStream.
|
||||
*
|
||||
* <p>Due to XStream's API, it is required to set the encoding used for writing to OutputStreams.
|
||||
* It defaults to <code>UTF-8</code>.
|
||||
* It defaults to {@code UTF-8}.
|
||||
*
|
||||
* <p><b>NOTE:</b> XStream is an XML serialization library, not a data binding library.
|
||||
* Therefore, it has limited namespace support. As such, it is rather unsuitable for
|
||||
@@ -129,8 +129,8 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>Converters</code> or <code>SingleValueConverters</code> to be registered
|
||||
* with the <code>XStream</code> instance.
|
||||
* Set the {@code Converters} or {@code SingleValueConverters} to be registered
|
||||
* with the {@code XStream} instance.
|
||||
* @see Converter
|
||||
* @see SingleValueConverter
|
||||
*/
|
||||
@@ -278,7 +278,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify implicit collection fields, as a Map consisting of <code>Class</code> instances
|
||||
* Specify implicit collection fields, as a Map consisting of {@code Class} instances
|
||||
* mapped to comma separated collection field names.
|
||||
*@see XStream#addImplicitCollection(Class, String)
|
||||
*/
|
||||
@@ -292,7 +292,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify omitted fields, as a Map consisting of <code>Class</code> instances
|
||||
* Specify omitted fields, as a Map consisting of {@code Class} instances
|
||||
* mapped to comma separated field names.
|
||||
* @see XStream#omitField(Class, String)
|
||||
*/
|
||||
@@ -550,15 +550,15 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
|
||||
|
||||
|
||||
/**
|
||||
* Convert the given XStream exception to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy.
|
||||
* <p>A boolean flag is used to indicate whether this exception occurs during marshalling or
|
||||
* unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
|
||||
* @param ex XStream exception that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling (<code>true</code>),
|
||||
* or unmarshalling (<code>false</code>)
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
*/
|
||||
* Convert the given XStream exception to an appropriate exception from the
|
||||
* {@code org.springframework.oxm} hierarchy.
|
||||
* <p>A boolean flag is used to indicate whether this exception occurs during marshalling or
|
||||
* unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
|
||||
* @param ex XStream exception that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
|
||||
* or unmarshalling ({@code false})
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
protected XmlMappingException convertXStreamException(Exception ex, boolean marshalling) {
|
||||
if (ex instanceof StreamException || ex instanceof CannotResolveClassException ||
|
||||
ex instanceof ConversionException) {
|
||||
|
||||
@@ -36,13 +36,13 @@ abstract class XStreamUtils {
|
||||
|
||||
/**
|
||||
* Convert the given XStream exception to an appropriate exception from the
|
||||
* <code>org.springframework.oxm</code> hierarchy.
|
||||
* {@code org.springframework.oxm} hierarchy.
|
||||
* <p>A boolean flag is used to indicate whether this exception occurs during marshalling or
|
||||
* unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
|
||||
* @param ex XStream exception that occured
|
||||
* @param marshalling indicates whether the exception occurs during marshalling (<code>true</code>),
|
||||
* or unmarshalling (<code>false</code>)
|
||||
* @return the corresponding <code>XmlMappingException</code>
|
||||
* @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
|
||||
* or unmarshalling ({@code false})
|
||||
* @return the corresponding {@code XmlMappingException}
|
||||
*/
|
||||
public static XmlMappingException convertXStreamException(Exception ex, boolean marshalling) {
|
||||
if (ex instanceof StreamException || ex instanceof CannotResolveClassException ||
|
||||
|
||||
Reference in New Issue
Block a user