You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2018/01/14 16:02:41 UTC
[13/32] juneau git commit: Javadoc updates.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
index a092a88..3e92cea 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
@@ -21,11 +21,12 @@ import org.apache.juneau.parser.*;
/**
* Parent class for all Juneau serializers.
- *
- * <h5 class='section'>Description:</h5>
- *
+ *
+ *
+ * <h5 class='topic'>Description</h5>
+ *
* Base serializer class that serves as the parent class for all serializers.
- *
+ *
* <p>
* The purpose of this class is:
* <ul>
@@ -33,7 +34,7 @@ import org.apache.juneau.parser.*;
* <li>Create session objects used for serializing POJOs (i.e. {@link SerializerSession}).
* <li>Provide convenience methods for serializing POJOs without having to construct session objects.
* </ul>
- *
+ *
* <p>
* Subclasses should extend directly from {@link OutputStreamSerializer} or {@link WriterSerializer} depending on
* whether it's a stream or character based serializer.
@@ -48,7 +49,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Abridged output.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.abridged.b"</js>
@@ -61,12 +62,12 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#abridged()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
* type information that might normally be included to determine the data type will not be serialized.
- *
+ *
* <p>
* For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean.typeName()} value, a
* <js>'_type'</js> attribute will only be added when this setting is enabled.
@@ -107,7 +108,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Add <js>"_type"</js> properties when needed.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.addBeanTypeProperties.b"</js>
@@ -119,7 +120,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#addBeanTypeProperties(boolean)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
@@ -167,7 +168,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Automatically detect POJO recursions.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.detectRecursions.b"</js>
@@ -180,19 +181,19 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#detectRecursions()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Specifies that recursions should be checked for during serialization.
- *
+ *
* <p>
* Recursions can occur when serializing models that aren't true trees but rather contain loops.
* <br>In general, unchecked recursions cause stack-overflow-errors.
* <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>.
- *
+ *
* <p>
* The behavior when recursions are detected depends on the value for {@link #SERIALIZER_ignoreRecursions}.
- *
+ *
* <p>
* For example, if a model contains the links A->B->C->A, then the JSON generated will look like
* the following when <jsf>SERIALIZER_ignoreRecursions</jsf> is <jk>true</jk>...
@@ -200,7 +201,7 @@ public abstract class Serializer extends BeanContext {
* <p class='bcode'>
* {A:{B:{C:<jk>null</jk>}}}
* </p>
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Checking for recursion can cause a small performance penalty.
@@ -237,7 +238,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Ignore recursion errors.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.ignoreRecursions.b"</js>
@@ -250,12 +251,12 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#ignoreRecursions()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Used in conjunction with {@link #SERIALIZER_detectRecursions}.
* <br>Setting is ignored if <jsf>SERIALIZER_detectRecursions</jsf> is <jk>false</jk>.
- *
+ *
* <p>
* If <jk>true</jk>, when we encounter the same object when serializing a tree, we set the value to <jk>null</jk>.
* <br>Otherwise, a {@link SerializeException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
@@ -264,7 +265,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Initial depth.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.initialDepth.i"</js>
@@ -276,7 +277,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#initialDepth(int)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* The initial indentation level at the root.
@@ -306,7 +307,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Serializer listener.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.listener.c"</js>
@@ -318,7 +319,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#listener(Class)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Class used to listen for errors and warnings that occur during serialization.
@@ -369,7 +370,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Max serialization depth.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxDepth.i"</js>
@@ -381,7 +382,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#maxDepth(int)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Abort serialization if specified depth is reached in the POJO tree.
@@ -406,7 +407,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Maximum indentation.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxIndent.i"</js>
@@ -418,11 +419,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#maxIndent(int)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Specifies the maximum indentation level in the serialized document.
- *
+ *
* <p>
* This setting does not apply to the MessagePack or RDF serializers.
*
@@ -445,7 +446,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Quote character.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.quoteChar.s"</js>
@@ -458,11 +459,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#sq()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* This is the character used for quoting attributes and values.
- *
+ *
* <p>
* This setting does not apply to the MessagePack or RDF serializers.
*
@@ -485,7 +486,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Sort arrays and collections alphabetically.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortCollections.b"</js>
@@ -498,9 +499,9 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#sortCollections()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
- *
+ *
* <p>
* Copies and sorts the contents of arrays and collections before serializing them.
*
@@ -526,7 +527,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Sort maps alphabetically.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortMaps.b"</js>
@@ -539,9 +540,9 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#sortMaps()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
- *
+ *
* <p>
* Copies and sorts the contents of maps by their keys before serializing them.
*
@@ -567,7 +568,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Trim empty lists and arrays.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyCollections.b"</js>
@@ -580,12 +581,12 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#trimEmptyCollections()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
- *
+ *
* <p>
* If <jk>true</jk>, empty lists and arrays will not be serialized.
- *
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -614,7 +615,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Trim empty maps.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyMaps.b"</js>
@@ -627,11 +628,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#trimEmptyMaps()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, empty map values will not be serialized to the output.
- *
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -658,7 +659,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Trim null bean property values.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimNullProperties.b"</js>
@@ -670,11 +671,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#trimNullProperties(boolean)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, null bean values will not be serialized to the output.
- *
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -701,7 +702,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Trim strings.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimStrings.b"</js>
@@ -714,7 +715,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#trimStrings()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
@@ -744,7 +745,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: URI context bean.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriContext.s"</js>
@@ -757,11 +758,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#uriContext(String)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Bean used for resolution of URIs to absolute or root-relative form.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Our URI contextual information.</jc>
@@ -807,7 +808,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: URI relativity.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriRelativity.s"</js>
@@ -820,7 +821,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#uriRelativity(String)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Defines what relative URIs are relative to when serializing any of the following:
@@ -829,7 +830,7 @@ public abstract class Serializer extends BeanContext {
* <li>{@link java.net.URL}
* <li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
- *
+ *
* <p>
* Possible values are:
* <ul>
@@ -859,7 +860,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: URI resolution.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriResolution.s"</js>
@@ -872,7 +873,7 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#uriResolution(String)}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* Defines the resolution level for URIs when serializing any of the following:
@@ -881,7 +882,7 @@ public abstract class Serializer extends BeanContext {
* <li>{@link java.net.URL}
* <li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
- *
+ *
* <p>
* Possible values are:
* <ul>
@@ -913,7 +914,7 @@ public abstract class Serializer extends BeanContext {
/**
* Configuration property: Use whitespace.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"Serializer.useWhitespace.b"</js>
@@ -927,11 +928,11 @@ public abstract class Serializer extends BeanContext {
* <li class='jm'>{@link SerializerBuilder#ws()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, whitespace is added to the output to improve readability.
- *
+ *
* <p>
* This setting does not apply to the MessagePack serializer.
*
@@ -1035,7 +1036,7 @@ public abstract class Serializer extends BeanContext {
/**
* Returns <jk>true</jk> if this serializer subclasses from {@link WriterSerializer}.
- *
+ *
* @return <jk>true</jk> if this serializer subclasses from {@link WriterSerializer}.
*/
public boolean isWriterSerializer() {
@@ -1044,7 +1045,7 @@ public abstract class Serializer extends BeanContext {
/**
* Create the session object used for actual serialization of objects.
- *
+ *
* @param args
* Runtime arguments.
* These specify session-level information such as locale and URI context.
@@ -1072,10 +1073,10 @@ public abstract class Serializer extends BeanContext {
/**
* Serializes a POJO to the specified output stream or writer.
- *
+ *
* <p>
* Equivalent to calling <code>serializer.createSession().serialize(o, output);</code>
- *
+ *
* @param o The object to serialize.
* @param output
* The output object.
@@ -1100,7 +1101,7 @@ public abstract class Serializer extends BeanContext {
/**
* Shortcut method for serializing objects directly to either a <code>String</code> or <code><jk>byte</jk>[]</code>
* depending on the serializer type.
- *
+ *
* @param o The object to serialize.
* @return
* The serialized object.
@@ -1118,7 +1119,7 @@ public abstract class Serializer extends BeanContext {
/**
* Returns the media types handled based on the value of the <code>accept</code> parameter passed into the constructor.
- *
+ *
* @return The list of media types. Never <jk>null</jk>.
*/
public final MediaType[] getMediaTypes() {
@@ -1128,17 +1129,17 @@ public abstract class Serializer extends BeanContext {
/**
* Optional method that returns the response <code>Content-Type</code> for this serializer if it is different from
* the matched media type.
- *
+ *
* <p>
* This method is specified to override the content type for this serializer.
* For example, the {@link org.apache.juneau.json.JsonSerializer.Simple} class returns that it handles media type
* <js>"text/json+simple"</js>, but returns <js>"text/json"</js> as the actual content type.
* This allows clients to request specific 'flavors' of content using specialized <code>Accept</code> header values.
- *
+ *
* <p>
* This method is typically meaningless if the serializer is being used stand-alone (i.e. outside of a REST server
* or client).
- *
+ *
* @return The response content type. If <jk>null</jk>, then the matched media type is used.
*/
public final MediaType getResponseContentType() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
index a0b090f..842508b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
@@ -33,7 +33,7 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Constructor.
- *
+ *
* @param ps The initial configuration settings for this builder.
*/
public SerializerBuilder(PropertyStore ps) {
@@ -47,11 +47,11 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Abridged output.
- *
+ *
* <p>
* When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
* type information that might normally be included to determine the data type will not be serialized.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_abridged}
@@ -68,10 +68,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Abridged output.
- *
+ *
* <p>
* Shortcut for calling <code>abridged(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_abridged}
@@ -85,11 +85,11 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Add <js>"_type"</js> properties when needed.
- *
+ *
* <p>
* If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
* through reflection.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_addBeanTypeProperties}
@@ -106,15 +106,15 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Automatically detect POJO recursions.
- *
+ *
* <p>
* Specifies that recursions should be checked for during serialization.
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Checking for recursion can cause a small performance penalty.
* </ul>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_detectRecursions}
@@ -131,10 +131,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Automatically detect POJO recursions.
- *
+ *
* <p>
* Shortcut for calling <code>detectRecursions(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_detectRecursions}
@@ -148,16 +148,16 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Ignore recursion errors.
- *
+ *
* <p>
* If <jk>true</jk>, when we encounter the same object when serializing a tree, we set the value to <jk>null</jk>.
* Otherwise, an exception is thrown.
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Checking for recursion can cause a small performance penalty.
* </ul>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_ignoreRecursions}
@@ -174,10 +174,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Ignore recursion errors.
- *
+ *
* <p>
* Shortcut for calling <code>ignoreRecursions(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_ignoreRecursions}
@@ -191,10 +191,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Initial depth.
- *
+ *
* <p>
* The initial indentation level at the root.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_initialDepth}
@@ -211,10 +211,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Serializer listener.
- *
+ *
* <p>
* Class used to listen for errors and warnings that occur during serialization.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_listener}
@@ -230,12 +230,12 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Max serialization depth.
- *
+ *
* <p>
* Abort serialization if specified depth is reached in the POJO tree.
* <br>If this depth is exceeded, an exception is thrown.
* <br>This prevents stack overflows from occurring when trying to serialize models with recursive references.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_maxDepth}
@@ -252,10 +252,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Maximum indentation.
- *
+ *
* <p>
* Specifies the maximum indentation level in the serialized document.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_maxIndent}
@@ -272,10 +272,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Quote character.
- *
+ *
* <p>
* This is the character used for quoting attributes and values.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_quoteChar}
@@ -292,10 +292,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Sort arrays and collections alphabetically.
- *
+ *
* <p>
* Copies and sorts the contents of arrays and collections before serializing them.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortCollections}
@@ -315,7 +315,7 @@ public class SerializerBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>sortCollections(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortCollections}
@@ -329,10 +329,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Sort maps alphabetically.
- *
+ *
* <p>
* Copies and sorts the contents of maps before serializing them.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortMaps}
@@ -352,7 +352,7 @@ public class SerializerBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>sortMaps(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortMaps}
@@ -369,7 +369,7 @@ public class SerializerBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>quoteChar(<js>'\''</js>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_quoteChar}
@@ -383,10 +383,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty lists and arrays.
- *
+ *
* <p>
* If <jk>true</jk>, empty list values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyCollections}
@@ -403,10 +403,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty lists and arrays.
- *
+ *
* <p>
* Shortcut for calling <code>trimEmptyCollections(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyCollections}
@@ -420,10 +420,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty maps.
- *
+ *
* <p>
* If <jk>true</jk>, empty map values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyMaps}
@@ -440,10 +440,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty maps.
- *
+ *
* <p>
* Shortcut for calling <code>trimEmptyMaps(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyMaps}
@@ -457,10 +457,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim null bean property values.
- *
+ *
* <p>
* If <jk>true</jk>, null bean values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimNullProperties}
@@ -477,10 +477,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim strings.
- *
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimStrings}
@@ -497,10 +497,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim strings.
- *
+ *
* <p>
* Shortcut for calling <code>trimStrings(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimStrings}
@@ -514,10 +514,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI context bean.
- *
+ *
* <p>
* Bean used for resolution of URIs to absolute or root-relative form.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriContext}
@@ -532,7 +532,7 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI context bean.
- *
+ *
* <p>
* Same as {@link #uriContext(UriContext)} but allows you to pass in a JSON string.
*
@@ -543,7 +543,7 @@ public class SerializerBuilder extends BeanContextBuilder {
* .uriContext(<js>"{authority:'http://localhost:10000',contextRoot:'/myContext',servletPath:'/myServlet',pathInfo:'/foo'}"</js>)
* .build();
* </p>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriContext}
@@ -558,10 +558,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI relativity.
- *
+ *
* <p>
* Defines what relative URIs are relative to when serializing URI/URL objects.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriRelativity}
@@ -578,7 +578,7 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI relativity.
- *
+ *
* <p>
* Same as {@link #uriRelativity(UriRelativity)} but allows you to pass in a string.
*
@@ -589,7 +589,7 @@ public class SerializerBuilder extends BeanContextBuilder {
* .uriRelativity(<js>"PATH_INFO"</js>)
* .build();
* </p>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriRelativity}
@@ -606,10 +606,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI resolution.
- *
+ *
* <p>
* Defines the resolution level for URIs when serializing URI/URL objects.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriResolution}
@@ -626,7 +626,7 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: URI resolution.
- *
+ *
* <p>
* Same as {@link #uriResolution(UriResolution)} but allows you to pass in a string.
*
@@ -637,7 +637,7 @@ public class SerializerBuilder extends BeanContextBuilder {
* .uriResolution(<js>"ROOT_RELATIVE"</js>)
* .build();
* </p>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriResolution}
@@ -654,10 +654,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* If <jk>true</jk>, newlines and indentation and spaces are added to the output to improve readability.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_useWhitespace}
@@ -674,7 +674,7 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* Shortcut for calling <code>useWhitespace(<jk>true</jk>)</code>.
*
@@ -690,10 +690,10 @@ public class SerializerBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* Shortcut for calling <code>useWhitespace(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_useWhitespace}
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroup.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
index a32aaa2..0ec4a90 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
@@ -20,9 +20,10 @@ import org.apache.juneau.http.*;
/**
* Represents a group of {@link Serializer Serializers} that can be looked up by media type.
- *
- * <h5 class='section'>Description:</h5>
- *
+ *
+ *
+ * <h5 class='topic'>Description</h5>
+ *
* Provides the following features:
* <ul class='spaced-list'>
* <li>
@@ -32,19 +33,19 @@ import org.apache.juneau.http.*;
* <li>
* Clones existing groups and all serializers within the group in a single method call.
* </ul>
- *
+ *
* <h6 class='topic'>Match ordering</h6>
- *
+ *
* Serializers are matched against <code>Accept</code> strings in the order they exist in this group.
- *
+ *
* <p>
* Adding new entries will cause the entries to be prepended to the group.
* This allows for previous serializers to be overridden through subsequent calls.
- *
+ *
* <p>
* For example, calling <code>g.append(S1.<jk>class</jk>,S2.<jk>class</jk>).append(S3.<jk>class</jk>,S4.<jk>class</jk>)</code>
* will result in the order <code>S3, S4, S1, S2</code>.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Construct a new serializer group</jc>
@@ -52,10 +53,10 @@ import org.apache.juneau.http.*;
* .append(JsonSerializer.<jk>class</jk>, XmlSerializer.<jk>class</jk>); <jc>// Add some serializers to it</jc>
* .ws().pojoSwaps(CalendarSwap.ISO8601DT.<jk>class</jk>) <jc>// Change settings for all serializers in the group.</jc>
* .build();
- *
+ *
* <jc>// Find the appropriate serializer by Accept type</jc>
* WriterSerializer s = g.getWriterSerializer(<js>"text/foo, text/json;q=0.8, text/*;q:0.6, *\/*;q=0.0"</js>);
- *
+ *
* <jc>// Serialize a bean to JSON text </jc>
* AddressBook addressBook = <jk>new</jk> AddressBook(); <jc>// Bean to serialize.</jc>
* String json = s.serialize(addressBook);
@@ -95,7 +96,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Constructor.
- *
+ *
* @param ps
* The modifiable properties that were used to initialize the serializers.
* A snapshot of these will be made so that we can clone and modify this group.
@@ -124,13 +125,13 @@ public final class SerializerGroup extends BeanContext {
/**
* Searches the group for a serializer that can handle the specified <code>Accept</code> value.
- *
+ *
* <p>
* The <code>accept</code> value complies with the syntax described in RFC2616, Section 14.1, as described below:
* <p class='bcode'>
* Accept = "Accept" ":"
* #( media-range [ accept-params ] )
- *
+ *
* media-range = ( "*\/*"
* | ( type "/" "*" )
* | ( type "/" subtype )
@@ -138,10 +139,10 @@ public final class SerializerGroup extends BeanContext {
* accept-params = ";" "q" "=" qvalue *( accept-extension )
* accept-extension = ";" token [ "=" ( token | quoted-string ) ]
* </p>
- *
+ *
* <p>
* The returned object includes both the serializer and media type that matched.
- *
+ *
* @param acceptHeader The HTTP <l>Accept</l> header string.
* @return The serializer and media type that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -162,7 +163,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializerMatch(String)} but matches using a {@link MediaType} instance.
- *
+ *
* @param mediaType The HTTP media type.
* @return The serializer and media type that matched the media type, or <jk>null</jk> if no match was made.
*/
@@ -172,7 +173,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializerMatch(String)} but returns just the matched serializer.
- *
+ *
* @param acceptHeader The HTTP <l>Accept</l> header string.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -183,7 +184,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializerMatch(MediaType)} but returns just the matched serializer.
- *
+ *
* @param mediaType The HTTP media type.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -195,7 +196,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializer(String)}, but casts it to a {@link WriterSerializer}.
- *
+ *
* @param acceptHeader The HTTP <l>Accept</l> header string.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -205,7 +206,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializer(MediaType)}, but casts it to a {@link WriterSerializer}.
- *
+ *
* @param mediaType The HTTP media type.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -215,7 +216,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializer(String)}, but casts it to an {@link OutputStreamSerializer}.
- *
+ *
* @param acceptHeader The HTTP <l>Accept</l> header string.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -225,7 +226,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Same as {@link #getSerializer(MediaType)}, but casts it to a {@link OutputStreamSerializer}.
- *
+ *
* @param mediaType The HTTP media type.
* @return The serializer that matched the accept header, or <jk>null</jk> if no match was made.
*/
@@ -235,10 +236,10 @@ public final class SerializerGroup extends BeanContext {
/**
* Returns the media types that all serializers in this group can handle.
- *
+ *
* <p>
* Entries are ordered in the same order as the serializers in the group.
- *
+ *
* @return An unmodifiable list of media types.
*/
public List<MediaType> getSupportedMediaTypes() {
@@ -247,7 +248,7 @@ public final class SerializerGroup extends BeanContext {
/**
* Returns a copy of the serializers in this group.
- *
+ *
* @return An unmodifiable list of serializers in this group.
*/
public List<Serializer> getSerializers() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
index 3a96302..525743d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
@@ -37,7 +37,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Clone an existing serializer group builder.
- *
+ *
* @param copyFrom The serializer group that we're copying settings and serializers from.
*/
public SerializerGroupBuilder(SerializerGroup copyFrom) {
@@ -48,7 +48,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Registers the specified serializers with this group.
- *
+ *
* @param s The serializers to append to this group.
* @return This object (for method chaining).
*/
@@ -63,7 +63,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
* <p>
* When passing in pre-instantiated serializers to this group, applying properties and transforms to the group
* do not affect them.
- *
+ *
* @param s The serializers to append to this group.
* @return This object (for method chaining).
*/
@@ -77,7 +77,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
*
* <p>
* Objects can either be instances of serializers or serializer classes.
- *
+ *
* @param s The serializers to append to this group.
* @return This object (for method chaining).
*/
@@ -91,7 +91,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
*
* <p>
* Objects can either be instances of serializers or serializer classes.
- *
+ *
* @param s The serializers to append to this group.
* @return This object (for method chaining).
*/
@@ -102,10 +102,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Creates a new {@link SerializerGroup} object using a snapshot of the settings defined in this builder.
- *
+ *
* <p>
* This method can be called multiple times to produce multiple serializer groups.
- *
+ *
* @return A new {@link SerializerGroup} object.
*/
@Override /* ContextBuilder */
@@ -132,11 +132,11 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Abridged output.
- *
+ *
* <p>
* When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
* type information that might normally be included to determine the data type will not be serialized.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_abridged}
@@ -153,10 +153,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Abridged output.
- *
+ *
* <p>
* Shortcut for calling <code>abridged(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_abridged}
@@ -170,11 +170,11 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Add <js>"_type"</js> properties when needed.
- *
+ *
* <p>
* If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
* through reflection.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_addBeanTypeProperties}
@@ -191,15 +191,15 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Automatically detect POJO recursions.
- *
+ *
* <p>
* Specifies that recursions should be checked for during serialization.
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Checking for recursion can cause a small performance penalty.
* </ul>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_detectRecursions}
@@ -216,10 +216,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Automatically detect POJO recursions.
- *
+ *
* <p>
* Shortcut for calling <code>detectRecursions(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_detectRecursions}
@@ -233,16 +233,16 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Ignore recursion errors.
- *
+ *
* <p>
* If <jk>true</jk>, when we encounter the same object when serializing a tree, we set the value to <jk>null</jk>.
* Otherwise, an exception is thrown.
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Checking for recursion can cause a small performance penalty.
* </ul>
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_ignoreRecursions}
@@ -259,10 +259,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Ignore recursion errors.
- *
+ *
* <p>
* Shortcut for calling <code>ignoreRecursions(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_ignoreRecursions}
@@ -276,10 +276,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Initial depth.
- *
+ *
* <p>
* The initial indentation level at the root.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_initialDepth}
@@ -296,10 +296,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Serializer listener.
- *
+ *
* <p>
* Class used to listen for errors and warnings that occur during serialization.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_listener}
@@ -315,12 +315,12 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Max serialization depth.
- *
+ *
* <p>
* Abort serialization if specified depth is reached in the POJO tree.
* <br>If this depth is exceeded, an exception is thrown.
* <br>This prevents stack overflows from occurring when trying to serialize models with recursive references.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_maxDepth}
@@ -337,10 +337,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Maximum indentation.
- *
+ *
* <p>
* Specifies the maximum indentation level in the serialized document.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_maxIndent}
@@ -357,10 +357,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Quote character.
- *
+ *
* <p>
* This is the character used for quoting attributes and values.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_quoteChar}
@@ -377,7 +377,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Sort arrays and collections alphabetically.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortCollections}
@@ -397,7 +397,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>sortCollections(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortCollections}
@@ -411,7 +411,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Sort maps alphabetically.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortMaps}
@@ -431,7 +431,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>sortMaps(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_sortMaps}
@@ -448,7 +448,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
*
* <p>
* Shortcut for calling <code>quoteChar(<js>'\''</js>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_quoteChar}
@@ -462,10 +462,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty lists and arrays.
- *
+ *
* <p>
* If <jk>true</jk>, empty list values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyCollections}
@@ -482,10 +482,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty lists and arrays.
- *
+ *
* <p>
* Shortcut for calling <code>trimEmptyCollections(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyCollections}
@@ -499,10 +499,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty maps.
- *
+ *
* <p>
* If <jk>true</jk>, empty map values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyMaps}
@@ -519,10 +519,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim empty maps.
- *
+ *
* <p>
* Shortcut for calling <code>trimEmptyMaps(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimEmptyMaps}
@@ -536,10 +536,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim null bean property values.
- *
+ *
* <p>
* If <jk>true</jk>, null bean values will not be serialized to the output.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimNullProperties}
@@ -556,10 +556,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim strings.
- *
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimStrings}
@@ -576,10 +576,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Trim strings.
- *
+ *
* <p>
* Shortcut for calling <code>trimStrings(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_trimStrings}
@@ -593,10 +593,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: URI context bean.
- *
+ *
* <p>
* Bean used for resolution of URIs to absolute or root-relative form.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriContext}
@@ -611,10 +611,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: URI relativity.
- *
+ *
* <p>
* Defines what relative URIs are relative to when serializing URI/URL objects.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriRelativity}
@@ -631,10 +631,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: URI resolution.
- *
+ *
* <p>
* Defines the resolution level for URIs when serializing URI/URL objects.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_uriResolution}
@@ -651,10 +651,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* If <jk>true</jk>, newlines and indentation and spaces are added to the output to improve readability.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_useWhitespace}
@@ -671,7 +671,7 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* Shortcut for calling <code>useWhitespace(<jk>true</jk>)</code>.
*
@@ -687,10 +687,10 @@ public class SerializerGroupBuilder extends BeanContextBuilder {
/**
* Configuration property: Use whitespace.
- *
+ *
* <p>
* Shortcut for calling <code>useWhitespace(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link Serializer#SERIALIZER_useWhitespace}
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerListener.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerListener.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerListener.java
index 7b7f138..4d48eab 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerListener.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerListener.java
@@ -28,7 +28,7 @@ public class SerializerListener {
/**
* Called when an exception is thrown when trying to call a bean getter method.
- *
+ *
* @param session The serializer session.
* @param t The throwable that was thrown by the getter method.
* @param p The bean property we had an issue on.
@@ -40,7 +40,7 @@ public class SerializerListener {
/**
* Called when an error occurs during serialization but is ignored.
- *
+ *
* @param session The serializer session.
* @param t The throwable that was thrown by the getter method.
* @param msg The error message.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerMatch.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerMatch.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerMatch.java
index 19536eb..b12a98e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerMatch.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerMatch.java
@@ -29,7 +29,7 @@ public final class SerializerMatch {
/**
* Returns the media type of the serializers that matched the HTTP <code>Accept</code> header value.
- *
+ *
* @return The media type of the match.
*/
public MediaType getMediaType() {
@@ -38,7 +38,7 @@ public final class SerializerMatch {
/**
* Returns the serializer that matched the HTTP <code>Accept</code> header value.
- *
+ *
* @return The serializer of the match.
*/
public Serializer getSerializer() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerPipe.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerPipe.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerPipe.java
index 87f5d48..a7e12ce 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerPipe.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerPipe.java
@@ -21,7 +21,7 @@ import org.apache.juneau.internal.*;
/**
* A wrapper around an object that a serializer sends its output to.
- *
+ *
* <p>
* For character-based serializers, the output object can be any of the following:
* <ul>
@@ -30,7 +30,7 @@ import org.apache.juneau.internal.*;
* <li>{@link File} - Output will be written as system-default encoded stream.
* <li>{@link StringBuilder}
* </ul>
- *
+ *
* <p>
* For stream-based serializers, the output object can be any of the following:
* <ul>
@@ -48,7 +48,7 @@ public final class SerializerPipe implements Closeable {
/**
* Constructor.
- *
+ *
* @param output The object to pipe the serializer output to.
*/
SerializerPipe(Object output) {
@@ -58,10 +58,10 @@ public final class SerializerPipe implements Closeable {
/**
* Wraps the specified output object inside an output stream.
- *
+ *
* <p>
* Subclasses can override this method to implement their own specialized output streams.
- *
+ *
* <p>
* This method can be used if the output object is any of the following class types:
* <ul>
@@ -92,10 +92,10 @@ public final class SerializerPipe implements Closeable {
/**
* Wraps the specified output object inside a writer.
- *
+ *
* <p>
* Subclasses can override this method to implement their own specialized writers.
- *
+ *
* <p>
* This method can be used if the output object is any of the following class types:
* <ul>
@@ -103,7 +103,7 @@ public final class SerializerPipe implements Closeable {
* <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
* <li>{@link File} - Output will be written as system-default encoded stream.
* </ul>
- *
+ *
* @return
* The output object wrapped in a writer.
* Calling {@link Writer#close()} on the returned object simply flushes the response and does not close
@@ -130,11 +130,11 @@ public final class SerializerPipe implements Closeable {
/**
* Overwrites the writer in this pipe.
- *
+ *
* <p>
* Used when wrapping the writer returned by {@link #getWriter()} so that the wrapped writer will be flushed
* and closed when {@link #close()} is called.
- *
+ *
* @param writer The wrapped writer.
*/
public void setWriter(Writer writer) {
@@ -143,11 +143,11 @@ public final class SerializerPipe implements Closeable {
/**
* Overwrites the output stream in this pipe.
- *
+ *
* <p>
* Used when wrapping the stream returned by {@link #getOutputStream()} so that the wrapped stream will be flushed
* when {@link #close()} is called.
- *
+ *
* @param outputStream The wrapped stream.
*/
public void setOutputStream(OutputStream outputStream) {
@@ -156,7 +156,7 @@ public final class SerializerPipe implements Closeable {
/**
* Returns the raw output object passed into this session.
- *
+ *
* @return The raw output object passed into this session.
*/
public Object getRawOutput() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
index b55768b..49e4ecd 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
@@ -29,7 +29,7 @@ import org.apache.juneau.transform.*;
/**
* Serializer session that lives for the duration of a single use of {@link Serializer}.
- *
+ *
* <p>
* Used by serializers for the following purposes:
* <ul class='spaced-list'>
@@ -42,7 +42,7 @@ import org.apache.juneau.transform.*;
* <li>
* Allowing serializer properties to be overridden on method calls.
* </ul>
- *
+ *
* <p>
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused within the same thread.
@@ -81,7 +81,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Create a new session using properties specified in the context.
- *
+ *
* @param ctx
* The context creating this session object.
* The context contains all the configuration settings for this object.
@@ -169,7 +169,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Wraps the specified input object into a {@link ParserPipe} object so that it can be easily converted into
* a stream or reader.
- *
+ *
* @param output
* The output location.
* <br>For character-based serializers, this can be any of the following types:
@@ -198,10 +198,10 @@ public abstract class SerializerSession extends BeanSession {
/**
* Serializes a POJO to the specified output stream or writer.
- *
+ *
* <p>
* This method should NOT close the context object.
- *
+ *
* @param pipe Where to send the output from the serializer.
* @param o The object to serialize.
* @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed.
@@ -211,7 +211,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Shortcut method for serializing objects directly to either a <code>String</code> or <code><jk>byte</jk>[]</code>
* depending on the serializer type.
- *
+ *
* @param o The object to serialize.
* @return
* The serialized object.
@@ -223,7 +223,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns <jk>true</jk> if this serializer subclasses from {@link WriterSerializer}.
- *
+ *
* @return <jk>true</jk> if this serializer subclasses from {@link WriterSerializer}.
*/
public abstract boolean isWriterSerializer();
@@ -235,7 +235,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Serialize the specified object using the specified session.
- *
+ *
* @param out Where to send the output from the serializer.
* @param o The object to serialize.
* @throws SerializeException If a problem occurred trying to convert the output.
@@ -257,7 +257,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Sets the current bean property being serialized for proper error messages.
- *
+ *
* @param currentProperty The current property being serialized.
*/
protected final void setCurrentProperty(BeanPropertyMeta currentProperty) {
@@ -266,7 +266,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Sets the current class being serialized for proper error messages.
- *
+ *
* @param currentClass The current class being serialized.
*/
protected final void setCurrentClass(ClassMeta<?> currentClass) {
@@ -275,11 +275,11 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the Java method that invoked this serializer.
- *
+ *
* <p>
* When using the REST API, this is the Java method invoked by the REST call.
* Can be used to access annotations defined on the method or class.
- *
+ *
* @return The Java method that invoked this serializer.
*/
protected final Method getJavaMethod() {
@@ -288,7 +288,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the URI resolver.
- *
+ *
* @return The URI resolver.
*/
protected final UriResolver getUriResolver() {
@@ -297,7 +297,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_maxDepth} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_maxDepth} setting value for this session.
*/
protected final int getMaxDepth() {
@@ -306,7 +306,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_initialDepth} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_initialDepth} setting value for this session.
*/
protected final int getInitialDepth() {
@@ -315,7 +315,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_detectRecursions} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_detectRecursions} setting value for this session.
*/
protected final boolean isDetectRecursions() {
@@ -324,7 +324,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_ignoreRecursions} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_ignoreRecursions} setting value for this session.
*/
protected final boolean isIgnoreRecursions() {
@@ -333,7 +333,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_useWhitespace} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_useWhitespace} setting value for this session.
*/
protected boolean isUseWhitespace() {
@@ -342,7 +342,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_maxIndent} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_maxIndent} setting value for this session.
*/
protected int getMaxIndent() {
@@ -351,7 +351,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_addBeanTypeProperties} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_addBeanTypeProperties} setting value for this session.
*/
protected boolean isAddBeanTypeProperties() {
@@ -360,7 +360,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_quoteChar} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_quoteChar} setting value for this session.
*/
protected char getQuoteChar() {
@@ -369,7 +369,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_trimNullProperties} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_trimNullProperties} setting value for this session.
*/
protected final boolean isTrimNulls() {
@@ -378,7 +378,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_trimEmptyCollections} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_trimEmptyCollections} setting value for this session.
*/
protected final boolean isTrimEmptyCollections() {
@@ -387,7 +387,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_trimEmptyMaps} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_trimEmptyMaps} setting value for this session.
*/
protected final boolean isTrimEmptyMaps() {
@@ -396,7 +396,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_trimStrings} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_trimStrings} setting value for this session.
*/
protected boolean isTrimStrings() {
@@ -405,7 +405,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_sortCollections} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_sortCollections} setting value for this session.
*/
protected final boolean isSortCollections() {
@@ -414,7 +414,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the {@link Serializer#SERIALIZER_sortMaps} setting value for this session.
- *
+ *
* @return The {@link Serializer#SERIALIZER_sortMaps} setting value for this session.
*/
protected final boolean isSortMaps() {
@@ -423,7 +423,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Push the specified object onto the stack.
- *
+ *
* @param attrName The attribute name.
* @param o The current object being serialized.
* @param eType The expected class type.
@@ -458,7 +458,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns <jk>true</jk> if {@link Serializer#SERIALIZER_detectRecursions} is enabled, and the specified
* object is already higher up in the serialization chain.
- *
+ *
* @param attrName The bean property attribute name, or some other identifier.
* @param o The object to check for recursion.
* @param cm The metadata on the object class.
@@ -494,7 +494,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Specialized warning when an exception is thrown while executing a bean getter.
- *
+ *
* @param p The bean map entry representing the bean property.
* @param t The throwable that the bean getter threw.
*/
@@ -508,7 +508,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Logs a warning message.
- *
+ *
* @param t The throwable that was thrown (if there was one).
* @param msg The warning message.
* @param args Optional {@link MessageFormat}-style arguments.
@@ -521,7 +521,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Trims the specified string if {@link SerializerSession#isTrimStrings()} returns <jk>true</jk>.
- *
+ *
* @param o The input string to trim.
* @return The trimmed string, or <jk>null</jk> if the input was <jk>null</jk>.
*/
@@ -536,7 +536,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Generalize the specified object if a POJO swap is associated with it.
- *
+ *
* @param o The object to generalize.
* @param type The type of object.
* @return The generalized object, or <jk>null</jk> if the object is <jk>null</jk>.
@@ -560,7 +560,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns <jk>true</jk> if the specified value should not be serialized.
- *
+ *
* @param cm The class type of the object being serialized.
* @param attrName The bean attribute name, or <jk>null</jk> if this isn't a bean attribute.
* @param value The object being serialized.
@@ -604,7 +604,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Sorts the specified map if {@link SerializerSession#isSortMaps()} returns <jk>true</jk>.
- *
+ *
* @param m The map being sorted.
* @return A new sorted {@link TreeMap}.
*/
@@ -616,7 +616,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Sorts the specified collection if {@link SerializerSession#isSortCollections()} returns <jk>true</jk>.
- *
+ *
* @param c The collection being sorted.
* @return A new sorted {@link TreeSet}.
*/
@@ -628,15 +628,15 @@ public abstract class SerializerSession extends BeanSession {
/**
* Converts the contents of the specified object array to a list.
- *
+ *
* <p>
* Works on both object and primitive arrays.
- *
+ *
* <p>
* In the case of multi-dimensional arrays, the outgoing list will contain elements of type n-1 dimension.
* i.e. if {@code type} is <code><jk>int</jk>[][]</code> then {@code list} will have entries of type
* <code><jk>int</jk>[]</code>.
- *
+ *
* @param type The type of array.
* @param array The array being converted.
* @return The array as a list.
@@ -655,7 +655,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Converts a String to an absolute URI based on the {@link UriContext} on this session.
- *
+ *
* @param uri
* The input URI.
* Can be any of the following:
@@ -686,10 +686,10 @@ public abstract class SerializerSession extends BeanSession {
/**
* Opposite of {@link #resolveUri(Object)}.
- *
+ *
* <p>
* Converts the URI to a value relative to the specified <code>relativeTo</code> parameter.
- *
+ *
* <p>
* Both parameters can be any of the following:
* <ul>
@@ -697,7 +697,7 @@ public abstract class SerializerSession extends BeanSession {
* <li>{@link java.net.URL}
* <li>{@link CharSequence}
* </ul>
- *
+ *
* <p>
* Both URIs can be any of the following forms:
* <ul>
@@ -713,7 +713,7 @@ public abstract class SerializerSession extends BeanSession {
* <li><js>"foo"</js> - Path-info-relative URI.
* <li><js>""</js> - Path-info URI.
* </ul>
- *
+ *
* @param relativeTo The URI to relativize against.
* @param uri The URI to relativize.
* @return The relativized URI.
@@ -731,7 +731,7 @@ public abstract class SerializerSession extends BeanSession {
* <li><code>Class</code> object is converted to a readable name. See {@link ClassUtils#getReadableClassName(Class)}.
* <li>Whitespace is trimmed if the trim-strings setting is enabled.
* </ul>
- *
+ *
* @param o The object to convert to a <code>String</code>.
* @return The object converted to a String, or <jk>null</jk> if the input was <jk>null</jk>.
*/
@@ -788,7 +788,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns information used to determine at what location in the parse a failure occurred.
- *
+ *
* @return A map, typically containing something like <code>{line:123,column:456,currentProperty:"foobar"}</code>
*/
protected final ObjectMap getLastLocation() {
@@ -804,7 +804,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Create a "_type" property that contains the dictionary name of the bean.
- *
+ *
* @param m The bean map to create a class property on.
* @param typeName The type name of the bean.
* @return A new bean property value.
@@ -816,7 +816,7 @@ public abstract class SerializerSession extends BeanSession {
/**
* Resolves the dictionary name for the actual type.
- *
+ *
* @param eType The expected type of the bean property.
* @param aType The actual type of the bean property.
* @param pMeta The current bean property being serialized.
@@ -867,12 +867,12 @@ public abstract class SerializerSession extends BeanSession {
/**
* Returns the parser-side expected type for the object.
- *
+ *
* <p>
* The return value depends on the {@link Serializer#SERIALIZER_abridged} setting.
* When enabled, the parser already knows the Java POJO type being parsed, so there is
* no reason to add <js>"_type"</js> attributes to the root-level object.
- *
+ *
* @param o The object to get the expected type on.
* @return The expected type.
*/
@@ -882,14 +882,14 @@ public abstract class SerializerSession extends BeanSession {
/**
* Optional method that specifies HTTP request headers for this serializer.
- *
+ *
* <p>
* For example, {@link SoapXmlSerializer} needs to set a <code>SOAPAction</code> header.
- *
+ *
* <p>
* This method is typically meaningless if the serializer is being used stand-alone (i.e. outside of a REST server
* or client).
- *
+ *
* @return
* The HTTP headers to set on HTTP requests.
* Never <jk>null</jk>.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSessionArgs.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSessionArgs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSessionArgs.java
index 3edf746..d78f25f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSessionArgs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSessionArgs.java
@@ -20,7 +20,7 @@ import org.apache.juneau.http.*;
/**
* Runtime arguments common to all serializer sessions.
- *
+ *
* <p>
* This object specifies information such as session locale or URI context.
*/
@@ -36,7 +36,7 @@ public final class SerializerSessionArgs extends BeanSessionArgs {
/**
* Constructor.
- *
+ *
* @param properties
* Session-level properties.
* <br>These override context-level properties.
@@ -65,7 +65,7 @@ public final class SerializerSessionArgs extends BeanSessionArgs {
/**
* The java method that called this serializer, usually the method in a REST servlet.
- *
+ *
* @param javaMethod
* The java method that called this serializer, usually the method in a REST servlet.
* <br>Can be <jk>null</jk>.
@@ -78,7 +78,7 @@ public final class SerializerSessionArgs extends BeanSessionArgs {
/**
* The URI context.
- *
+ *
* @param uriContext
* The URI context.
* <br>Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerWriter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
index 3cfef13..8697297 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
@@ -20,11 +20,11 @@ import org.apache.juneau.*;
/**
* Simple wrapper around a standard {@link Writer} with additional methods.
- *
+ *
* <p>
* Modeled after the Java ProcessBuilder class so that you can chain commands to reduce the need for string
* concatenation for performance reasons.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* writer.append(<js>"foo"</js>).nl().i(5).append(<js>"bar"</js>);
@@ -72,10 +72,10 @@ public class SerializerWriter extends Writer {
/**
* Performs a carriage return.
- *
+ *
* <p>
* Adds a newline and the specified number of tabs (if the {@code useWhitespace} setting is enabled) to the output.
- *
+ *
* @param depth The indentation.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -88,10 +88,10 @@ public class SerializerWriter extends Writer {
/**
* Performs a carriage return at the end of a line.
- *
+ *
* <p>
* Adds a newline and the specified number of tabs (if the {@code useWhitespace} setting is enabled) to the output.
- *
+ *
* @param depth The indentation.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -105,7 +105,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an indent (if the {@code useWhitespace} setting is enabled), followed by text, followed by a newline
* (if the {@code useWhitespace} setting is enabled).
- *
+ *
* @param indent The number of tabs to indent.
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
@@ -117,7 +117,7 @@ public class SerializerWriter extends Writer {
/**
* Writes the specified text followed by a newline (if the {@code useWhitespace} setting is enabled).
- *
+ *
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object.
@@ -128,7 +128,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an indent (if the {@code useWhitespace} setting is enabled), followed by text.
- *
+ *
* @param indent The number of tabs to indent.
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
@@ -140,7 +140,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an indent (if the {@code useWhitespace} setting is enabled), followed by text.
- *
+ *
* @param indent The number of tabs to indent.
* @param c The character to write.
* @throws IOException If a problem occurred trying to write to the writer.
@@ -153,7 +153,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an indent (if the {@code useWhitespace} setting is enabled), followed by text, optionally followed by a
* newline (if the {@code useWhitespace} setting is enabled).
- *
+ *
* @param indent The number of tabs to indent.
* @param newline If <jk>true</jk>, then a newline is written.
* @param text The text to write.
@@ -180,16 +180,16 @@ public class SerializerWriter extends Writer {
/**
* Appends the specified object as a URI.
- *
+ *
* <p>
* Object is converted to a <code>String</code> using <code>toString()</code>, so this will work on {@link URL} or
* {@link URI} objects, or any other type that returns a URI via it's <code>toString()</code> method.
- *
+ *
* <p>
* The URI is resolved based on the {@link Serializer#SERIALIZER_uriRelativity} and
* {@link Serializer#SERIALIZER_uriResolution} settings and the {@link UriContext} that's part of the
* session.
- *
+ *
* @param uri The URI to serialize.
* @return This object (for method chaining).
* @throws IOException If a problem occurred trying to write to the writer.
@@ -201,7 +201,7 @@ public class SerializerWriter extends Writer {
/**
* Appends the specified characters to this writer.
- *
+ *
* @param characters The characters to append to this writer.
* @return This object (for method chaining).
* @throws IOException
@@ -214,7 +214,7 @@ public class SerializerWriter extends Writer {
/**
* Adds a whitespace character to the output if the {@code useWhitespace} setting is enabled.
- *
+ *
* @return This object (for method chaining).
* @throws IOException If a problem occurred trying to write to the writer.
*/
@@ -226,7 +226,7 @@ public class SerializerWriter extends Writer {
/**
* Adds the quote character specified by the {@code quoteChar} setting to the output.
- *
+ *
* @return This object (for method chaining).
* @throws IOException If a problem occurred trying to write to the writer.
*/
@@ -237,7 +237,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an indent to the writer if the {@code useWhitespace} setting is enabled.
- *
+ *
* @param indent The number of tabs to indent.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -251,7 +251,7 @@ public class SerializerWriter extends Writer {
/**
* Writes an end-of-line indent to the writer if the {@code useWhitespace} setting is enabled.
- *
+ *
* @param indent The number of tabs to indent.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -265,7 +265,7 @@ public class SerializerWriter extends Writer {
/**
* Writes a newline to the writer if the {@code useWhitespace} setting is enabled.
- *
+ *
* @param indent The current indentation level.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -278,11 +278,11 @@ public class SerializerWriter extends Writer {
/**
* Writes a space if the boolean expression is <jk>true</jk> and {@code useWhitespace} is false.
- *
+ *
* <p>
* Intended for cases in XML where text should be separated by either a space or newline.
* This ensures the text is separated by a space if whitespace is disabled.
- *
+ *
* @param b The boolean flag.
* @return This object (for method chaining).
* @throws IOException If a problem occurred trying to write to the writer.
@@ -295,7 +295,7 @@ public class SerializerWriter extends Writer {
/**
* Writes a newline to the writer if the {@code useWhitespace} setting is enabled and the boolean flag is true.
- *
+ *
* @param b The boolean flag.
* @param indent The current indentation level.
* @return This object (for method chaining).
@@ -309,7 +309,7 @@ public class SerializerWriter extends Writer {
/**
* Writes the specified text to the writer.
- *
+ *
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -321,7 +321,7 @@ public class SerializerWriter extends Writer {
/**
* Writes the specified text to the writer.
- *
+ *
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
* @return This object (for method chaining).
@@ -334,7 +334,7 @@ public class SerializerWriter extends Writer {
/**
* Writes the specified text to the writer if b is true.
- *
+ *
* @param b Boolean flag.
* @param text The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
@@ -348,7 +348,7 @@ public class SerializerWriter extends Writer {
/**
* Writes the specified text to the writer if b is true.
- *
+ *
* @param b Boolean flag.
* @param c The text to write.
* @throws IOException If a problem occurred trying to write to the writer.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
index 4863b29..09ab6db 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
@@ -22,7 +22,7 @@ public abstract class WriterSerializer extends Serializer {
/**
* Constructor.
- *
+ *
* @param ps
* The property store containing all the settings for this object.
* @param produces
@@ -65,7 +65,7 @@ public abstract class WriterSerializer extends Serializer {
/**
* Convenience method for serializing an object to a <code>String</code>.
- *
+ *
* @param o The object to serialize.
* @return The output serialized to a string.
* @throws SerializeException If a problem occurred trying to convert the output.
@@ -77,10 +77,10 @@ public abstract class WriterSerializer extends Serializer {
/**
* Identical to {@link #serialize(Object)} except throws a {@link RuntimeException} instead of a {@link SerializeException}.
- *
+ *
* <p>
* This is typically good enough for debugging purposes.
- *
+ *
* @param o The object to serialize.
* @return The serialized object.
*/
@@ -94,7 +94,7 @@ public abstract class WriterSerializer extends Serializer {
/**
* Wraps the specified object inside a {@link StringObject}.
- *
+ *
* @param o The object to wrap.
* @return The wrapped object.
*/
@@ -104,7 +104,7 @@ public abstract class WriterSerializer extends Serializer {
/**
* Convenience method for serializing an object and sending it to STDOUT.
- *
+ *
* @param o The object to serialize.
* @return This object (for method chaining).
*/