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 2017/06/27 02:38:25 UTC
[11/19] incubator-juneau git commit: Clean up javadocs.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/uon/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/package.html b/juneau-core/src/main/java/org/apache/juneau/uon/package.html
index 3a3c76e..2d75ac9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/package.html
@@ -84,11 +84,9 @@
<p>
Juneau supports converting arbitrary POJOs to and from URL-encoded strings using ultra-efficient serializers
and parsers.
- <br>
- The serializer converts POJOs directly to URL-encoded strings without the need for intermediate DOM objects
+ <br>The serializer converts POJOs directly to URL-encoded strings without the need for intermediate DOM objects
using a highly-efficient state machine.
- <br>
- Likewise, the parser creates POJOs directly from URL-encoded strings without the need for intermediate DOM
+ <br>Likewise, the parser creates POJOs directly from URL-encoded strings without the need for intermediate DOM
objects.
</p>
<p>
@@ -99,22 +97,29 @@
Juneau can serialize and parse instances of any of the following POJO types:
</p>
<ul class='spaced-list'>
- <li>Java primitives and primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>,
+ <li>
+ Java primitives and primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>,
<code>Float</code>).
- <li>Java Collections Framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything
+ <li>
+ Java Collections Framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything
on this list.
- <li>Multi-dimensional arrays of any type on this list.
- <li>Java Beans with properties of any type on this list.
- <li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing
+ <li>
+ Multi-dimensional arrays of any type on this list.
+ <li>
+ Java Beans with properties of any type on this list.
+ <li>
+ Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing
<code>toString()</code>, <code>fromString()</code>, <code>valueOf()</code>,
<code>constructor(String)</code>).
- <li>Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to
+ <li>
+ Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to
serializable forms.
</ul>
<p>
Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
+
<h6 class='topic'>Prerequisites</h6>
<p>
The Juneau URL-encoding serialization and parsing support does not require any external prerequisites.
@@ -128,8 +133,7 @@
<p>
The example shown here is from the Address Book resource located in the
<code>org.apache.juneau.sample.war</code> application.
- <br>
- The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code>
+ <br>The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code>
containing zero or more <code>Address</code> beans.
</p>
<p>
@@ -207,14 +211,17 @@
Juneau supports two kinds of serialization:
</p>
<ul class='spaced-list'>
- <li>Construction of full URL query parameter strings (e.g. <code>&key=value</code> pairs) from beans
+ <li>
+ Construction of full URL query parameter strings (e.g. <code>&key=value</code> pairs) from beans
and maps.
- <li>Construction of URL query parameter value strings (e.g. just the <code>value</code> portion of
+ <li>
+ Construction of URL query parameter value strings (e.g. just the <code>value</code> portion of
<code>&key=value</code> pairs) from any POJO.
</ul>
<p>
Top-level beans and maps can serialized as key/value pairs as shown below:
</p>
+
<h6 class='figure'>Example: A bean with 2 string properties, 'foo' and 'baz', serialized to a query string</h6>
<p class='bcode'>
http://localhost/sample?<ua>foo</ua>=<us>bar</us>&<ua>baz</ua>=<us>bing</us>
@@ -224,6 +231,7 @@
<js>"(...)"</js> construct to denote an object mapping, and uses a comma as the parameter delimiter instead
of <js>"&"</js>.
</p>
+
<h6 class='figure'>Example: A bean serialized as a query parameter value.</h6>
<p class='bcode'>
http://localhost/sample?<ua>a1</ua>=(<ua>foo</ua>=<us>bar</us>,<ua>baz</ua>=<us>bing</us>)
@@ -289,14 +297,14 @@
<code>PojoSwaps</code> can be used to convert non-serializable POJOs into serializable forms, such as
converting <code>Calendar</code> object to ISO8601 strings, or <code><uk>byte</uk>[]</code> arrays to
Base-64 encoded strings.
- <br>
- These transforms can be associated at various levels:
+ <br>These transforms can be associated at various levels:
</p>
- <ul class='spaced-list'>
+ <ul>
<li>On serializer and parser instances to handle all objects of the class type globally.
<li>On classes through the <code><ja>@Bean</ja></code> annotation.
<li>On bean properties through the <code><ja>@BeanProperty</ja></code> annotations.
</ul>
+
<h6 class='figure'>Example: A serialized Calendar object using <code>CalendarSwap.RFC2822DTZ</code> transform.</h6>
<p class='bcode'>
http://localhost/sample?<ua>a1=<us>'Sun,+03+Mar+1901+09:05:06+GMT'</us>
@@ -316,8 +324,7 @@
<p>
{@link org.apache.juneau.urlencoding.UrlEncodingSerializer} and {@link org.apache.juneau.uon.UonSerializer}
classes are used to convert POJOs to URL-encoded strings.
- <br>
- The <code>UonSerializer</code> class converts parameter values to UON notation.
+ <br>The <code>UonSerializer</code> class converts parameter values to UON notation.
The <code>UrlEncodingSerializer</code> class converts a POJO to key/value URL-Encoded pairs using
<code>UonSerializer</code> to serialize the values.
If you're trying to construct complete URL-Encoded entities, use <code>UrlEncodingSerializer</code>.
@@ -325,37 +332,43 @@
</p>
<p>
The serializers include several configurable settings.
- <br>
- Static reusable instances of serializers are provided with commonly-used settings:
+ <br>Static reusable instances of serializers are provided with commonly-used settings:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT} - All default settings, strict mode.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT_READABLE} - Use whitespace and
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT} - All default settings, strict mode.
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT_READABLE} - Use whitespace and
indentation for readability.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT} - All default settings, strict mode.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT_READABLE} - Use whitespace and indentation for
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT} - All default settings, strict mode.
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT_READABLE} - Use whitespace and indentation for
readability.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT_ENCODING} - Same as DEFAULT, but use URL-Encoding on
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT_ENCODING} - Same as DEFAULT, but use URL-Encoding on
special characters.
</ul>
<p>
The general guidelines on which serializer to use is:
</p>
<ul class='spaced-list'>
- <li>Use encoding serializers when you're using the results to construct a URI yourself, and therefore
+ <li>
+ Use encoding serializers when you're using the results to construct a URI yourself, and therefore
need invalid URI characters to be encoded.
- <li>Use un-encoding serializers when you're creating parameter values and passing them off to some other
+ <li>
+ Use un-encoding serializers when you're creating parameter values and passing them off to some other
utility class that will itself encode invalid URI characters.
- <li>Use the readable serializer for debugging purposes.
+ <li>
+ Use the readable serializer for debugging purposes.
</ul>
<h6 class='topic'>Notes about examples</h6>
<p>
The examples shown in this document will use default strict settings.
- <br>
- For brevity, the examples will use public fields instead of getters/setters to reduce the size of the examples.
- <br>
- In the real world, you'll typically want to use standard bean getters and setters.
+ <br>For brevity, the examples will use public fields instead of getters/setters to reduce the size of the
+ examples.
+ <br>In the real world, you'll typically want to use standard bean getters and setters.
</p>
<p>
To start off simple, we'll begin with the following simplified bean and build upon it.
@@ -425,10 +438,9 @@
<p>
The {@link org.apache.juneau.annotation.Bean @Bean} and {@link org.apache.juneau.annotation.BeanProperty @BeanProperty}
annotations are used to customize the behavior of beans across the entire framework.
- <br>
- They have various uses:
+ <br>They have various uses:
</p>
- <ul class='spaced-list'>
+ <ul>
<li>Hiding bean properties.
<li>Specifying the ordering of bean properties.
<li>Overriding the names of bean properties.
@@ -437,14 +449,11 @@
</ul>
<p>
For example, we now add a <code>birthDate</code> property, and associate a transform with it to transform
- it to an ISO8601 date-time string in GMT time.
- <br>
- We'll also add a couple of <code>URI</code> properties.
- <br>
- By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want
- them serialized.
- <br>
- Using transforms, we can convert them to standardized string forms.
+ it to an ISO8601 date-time string in GMT time.
+ <br>We'll also add a couple of <code>URI</code> properties.
+ <br>By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you
+ want them serialized.
+ <br>Using transforms, we can convert them to standardized string forms.
</p>
<p class='bcode'>
<jk>public class</jk> Person {
@@ -497,16 +506,17 @@
<p>
Another useful feature is the {@link org.apache.juneau.annotation.Bean#propertyNamer()} annotation that
allows you to plug in your own logic for determining bean property names.
- <br>
- The {@link org.apache.juneau.PropertyNamerDLC} is an example of an alternate property namer.
+ <br>The {@link org.apache.juneau.PropertyNamerDLC} is an example of an alternate property namer.
It converts bean property names to lowercase-dashed format.
</p>
+
<h6 class='figure'>Example:</h6>
<p class='bcode'>
<ja>@Bean</ja>(propertyNamer=PropertyNamerDLC.<jk>class</jk>)
<jk>public class</jk> Person {
...
</p>
+
<h6 class='figure'>Results</h6>
<p class='bcode'>
(<ua>id</ua>=<un>1</us>,<ua>name</ua>=<us>'John+Smith'</us>,<ua>uri</ua>=<us>http://sample/addressBook/person/1</us>,
@@ -625,18 +635,16 @@
<h3 class='topic' onclick='toggle(this)'>2.3 - Non-tree models and recursion detection</h3>
<div class='topic'>
<p>
- The URL-encoding serializer is designed to be used against POJO tree structures. <br>
+ The URL-encoding serializer is designed to be used against POJO tree structures.
It expects that there not be loops in the POJO model (e.g. children with references to parents, etc...).
- <br>
- If you try to serialize models with loops, you will usually cause a <code>StackOverflowError</code> to
+ <br>If you try to serialize models with loops, you will usually cause a <code>StackOverflowError</code> to
be thrown (if {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_maxDepth} is not reached
first).
</p>
<p>
If you still want to use the URL-encoding serializer on such models, Juneau provides the
{@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_detectRecursions} setting.
- <br>
- It tells the serializer to look for instances of an object in the current branch of the tree and skip
+ <br>It tells the serializer to look for instances of an object in the current branch of the tree and skip
serialization when a duplicate is encountered.
</p>
<p>
@@ -700,9 +708,12 @@
See the following classes for all configurable properties that can be used on this serializer:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.BeanContext} - Bean context properties.
- <li>{@link org.apache.juneau.uon.UonSerializerContext} - UON serializer context properties.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializerContext} - URL-Encoding serializer context
+ <li>
+ {@link org.apache.juneau.BeanContext} - Bean context properties.
+ <li>
+ {@link org.apache.juneau.uon.UonSerializerContext} - UON serializer context properties.
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializerContext} - URL-Encoding serializer context
properties.
</ul>
</div>
@@ -713,10 +724,10 @@
<h3 class='topic' onclick='toggle(this)'>2.5 - Other notes</h3>
<div class='topic'>
<ul class='spaced-list'>
- <li>Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an
+ <li>
+ Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an
internal cache of bean classes encountered.
- <br>
- For performance reasons, it's recommended that serializers be reused whenever possible instead of
+ <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of
always creating new instances.
</ul>
</div>
@@ -730,8 +741,7 @@
<p>
{@link org.apache.juneau.urlencoding.UrlEncodingParser} and {@link org.apache.juneau.uon.UonParser} classes are
used to convert URL-encoded strings back into POJOs.
- <br>
- The <code>UonParser</code> class converts UON-encoded parameter values to POJOs.
+ <br>The <code>UonParser</code> class converts UON-encoded parameter values to POJOs.
The <code>UrlEncodingParser</code> class converts entire URL-Encoded strings to POJOs using
<code>UonSerializer</code> to serialize individual values.
If you're trying to parse an entire URL-Encoded string, use <code>UrlEncodingParser</code>.
@@ -742,26 +752,30 @@
The following static reusable instances of <code>UrlEncodingParser</code> are provided for convenience:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingParser#DEFAULT}
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingParser#DEFAULT}
- Default parser for entire URL-encoded strings, decode <code>%xx</code> sequences.
- <li>{@link org.apache.juneau.uon.UonParser#DEFAULT}
+ <li>
+ {@link org.apache.juneau.uon.UonParser#DEFAULT}
- Default parser for URL-encoded parameter values, don't decode <code>%xx</code> sequences.
- <li>{@link org.apache.juneau.uon.UonParser#DEFAULT_DECODING}
+ <li>
+ {@link org.apache.juneau.uon.UonParser#DEFAULT_DECODING}
- Default parser for URL-encoded parameter values, decode <code>%xx</code> sequences.
</ul>
<p>
The general guidelines on which parser to use is:
</p>
<ul class='spaced-list'>
- <li>Use the <code>DEFAULT</code> parser for parameter values that have already had <code>%xx</code> sequences
+ <li>
+ Use the <code>DEFAULT</code> parser for parameter values that have already had <code>%xx</code> sequences
decoded, such as when using <code>HttpServletRequest.getQueryParameter(name)</code>.
- <li>Use the <code>DEFAULT_ENCODED</code> parser if the input has not already had <code>%xx</code> sequences
+ <li>
+ Use the <code>DEFAULT_ENCODED</code> parser if the input has not already had <code>%xx</code> sequences
decoded.
</ul>
<p>
Let's build upon the previous example and parse the generated URL-encoded string back into the original bean.
- <br>
- We start with the URL-encoded string that was generated.
+ <br>We start with the URL-encoded string that was generated.
</p>
<p class='bcode'>
<jc>// Use serializer with readable output.</jc>
@@ -850,16 +864,14 @@
<div class='topic'>
<p>
The URL-encoding parser is not limited to parsing back into the original bean classes.
- <br>
- If the bean classes are not available on the parsing side, the parser can also be used to parse into a
+ <br>If the bean classes are not available on the parsing side, the parser can also be used to parse into a
generic model consisting of <code>Maps</code>, <code>Collections</code>, and primitive objects.
</p>
<p>
You can parse into any <code>Map</code> type (e.g. <code>HashMap</code>, <code>TreeMap</code>), but
using {@link org.apache.juneau.ObjectMap} is recommended since it has many convenience methods
for converting values to various types.
- <br>
- The same is true when parsing collections.
+ <br>The same is true when parsing collections.
You can use any Collection (e.g. <code>HashSet</code>, <code>LinkedList</code>)
or array (e.g. <code>Object[]</code>, <code>String[]</code>, <code>String[][]</code>), but using
{@link org.apache.juneau.ObjectList} is recommended.
@@ -904,8 +916,7 @@
</p>
<p>
What we end up with is the exact same output.
- <br>
- Even the numbers and booleans are preserved because they are parsed into <code>Number</code> and
+ <br>Even the numbers and booleans are preserved because they are parsed into <code>Number</code> and
<code>Boolean</code> objects when parsing into generic models.
</p>
<p class='bcode'>
@@ -957,8 +968,7 @@
<p>
As a general rule, parsing into beans is often more efficient than parsing into generic models.
- <br>
- And working with beans is often less error prone than working with generic models.
+ <br>And working with beans is often less error prone than working with generic models.
</p>
</div>
@@ -971,9 +981,12 @@
See the following classes for all configurable properties that can be used on this parser:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.BeanContext} - Bean context properties.
- <li>{@link org.apache.juneau.uon.UonParserContext} - UON parser context properties.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingParserContext} - URL-Encoding parser context properties.
+ <li>
+ {@link org.apache.juneau.BeanContext} - Bean context properties.
+ <li>
+ {@link org.apache.juneau.uon.UonParserContext} - UON parser context properties.
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingParserContext} - URL-Encoding parser context properties.
</ul>
</div>
@@ -983,10 +996,10 @@
<h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3>
<div class='topic'>
<ul class='spaced-list'>
- <li>Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache
+ <li>
+ Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache
of bean classes encountered.
- <br>
- For performance reasons, it's recommended that parser be reused whenever possible instead of always
+ <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always
creating new instances.
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
index abd3bb9..a419e48 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
@@ -41,7 +41,7 @@ public final class UrlEncodingContext implements Cloneable {
* </p>
* <p>
* This option only applies to beans.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>If parsing multi-part parameters, it's highly recommended to use <code>Collections</code> or <code>Lists</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
index 731ea51..4e96bb4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
@@ -79,14 +79,14 @@ public class UrlEncodingParserBuilder extends UonParserBuilder {
* </p>
* <p>
* This option only applies to beans.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>If parsing multi-part parameters, it's highly recommended to use Collections or Lists
* as bean property types instead of arrays since arrays have to be recreated from scratch every time a value
* is added to it.
* </ul>
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>URLENC_expandedParams</jsf>, value)</code>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
index 0af49c0..abaf23f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
@@ -77,14 +77,14 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
* </p>
* <p>
* This option only applies to beans.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>If parsing multi-part parameters, it's highly recommended to use Collections or Lists
* as bean property types instead of arrays since arrays have to be recreated from scratch every time a value
* is added to it.
* </ul>
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>URLENC_expandedParams</jsf>, value)</code>.
@@ -112,14 +112,16 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
* Specifies the format to use for URL GET parameter keys and values.
* <p>
* The possible values are:
- * <ul>
- * <li><js>"UON"</js> (default) - Use UON notation for values.
+ * <ul class='spaced-list'>
+ * <li>
+ * <js>"UON"</js> (default) - Use UON notation for values.
* <br>String values such as <js>"(foo='bar')"</js> will end up being quoted and escaped to <js>"'(foo=bar~'baz~')'"</js>.
* <br>Similarly, boolean and numeric values will also end up quoted.
- * <li><js>"PLAINTEXT"</js> (default) - Serialize as plain text.
+ * <li>
+ * <js>"PLAINTEXT"</js> (default) - Serialize as plain text.
* <br>Strings will never be quoted or escaped.
* <br>Note that this can cause errors during parsing if you're using the URL-encoding parser to parse
- * the results since UON constructs won't be differentiatable.
+ * the results since UON constructs won't be differentiable.
* <br>However, this is not an issue if you're simply creating queries or form posts against 3rd-party interfaces.
* </ul>
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
index a2e8c15..e880ec0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
@@ -84,11 +84,9 @@
<p>
Juneau supports converting arbitrary POJOs to and from URL-encoded strings using ultra-efficient serializers
and parsers.
- <br>
- The serializer converts POJOs directly to URL-encoded strings without the need for intermediate DOM objects
+ <br>The serializer converts POJOs directly to URL-encoded strings without the need for intermediate DOM objects
using a highly-efficient state machine.
- <br>
- Likewise, the parser creates POJOs directly from URL-encoded strings without the need for intermediate DOM
+ <br>Likewise, the parser creates POJOs directly from URL-encoded strings without the need for intermediate DOM
objects.
</p>
<p>
@@ -99,21 +97,28 @@
Juneau can serialize and parse instances of any of the following POJO types:
</p>
<ul class='spaced-list'>
- <li>Java primitives and primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>,
+ <li>
+ Java primitives and primitive objects (e.g. <code>String</code>, <code>Integer</code>, <code>Boolean</code>,
<code>Float</code>).
- <li>Java Collections Framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything
+ <li>
+ Java Collections Framework objects (e.g. <code>HashSet</code>, <code>TreeMap</code>) containing anything
on this list.
- <li>Multi-dimensional arrays of any type on this list.
- <li>Java Beans with properties of any type on this list.
- <li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing
+ <li>
+ Multi-dimensional arrays of any type on this list.
+ <li>
+ Java Beans with properties of any type on this list.
+ <li>
+ Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing
<code>toString()</code>, <code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>).
- <li>Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to
+ <li>
+ Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to
serializable forms.
</ul>
<p>
Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
+
<h6 class='topic'>Prerequisites</h6>
<p>
The Juneau URL-encoding serialization and parsing support does not require any external prerequisites.
@@ -127,8 +132,7 @@
<p>
The example shown here is from the Address Book resource located in the
<code>org.apache.juneau.sample.war</code> application
- <br>
- The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code>
+ <br>The POJO model consists of a <code>List</code> of <code>Person</code> beans, with each <code>Person</code>
containing zero or more <code>Address</code> beans.
</p>
<p>
@@ -206,14 +210,17 @@
Juneau supports two kinds of serialization:
</p>
<ul class='spaced-list'>
- <li>Construction of full URL query parameter strings (e.g. <code>&key=value</code> pairs) from beans
+ <li>
+ Construction of full URL query parameter strings (e.g. <code>&key=value</code> pairs) from beans
and maps.
- <li>Construction of URL query parameter value strings (e.g. just the <code>value</code> portion of
+ <li>
+ Construction of URL query parameter value strings (e.g. just the <code>value</code> portion of
<code>&key=value</code> pairs) from any POJO.
</ul>
<p>
Top-level beans and maps can serialized as key/value pairs as shown below:
</p>
+
<h6 class='figure'>Example: A bean with 2 string properties, 'foo' and 'baz', serialized to a query string</h6>
<p class='bcode'>
http://localhost/sample?<ua>foo</ua>=<us>bar</us>&<ua>baz</ua>=<us>bing</us>
@@ -223,6 +230,7 @@
<js>"(...)"</js> construct to denote an object mapping, and uses a comma as the parameter delimiter
instead of <js>"&"</js>.
</p>
+
<h6 class='figure'>Example: A bean serialized as a query parameter value.</h6>
<p class='bcode'>
http://localhost/sample?<ua>a1</ua>=(<ua>foo</ua>=<us>bar</us>,<ua>baz</ua>=<us>bing</us>)
@@ -288,14 +296,14 @@
<code>PojoSwaps</code> can be used to convert non-serializable POJOs into serializable forms, such as
converting <code>Calendar</code> object to ISO8601 strings, or <code><uk>byte</uk>[]</code> arrays to
Base-64 encoded strings.
- <br>
- These transforms can be associated at various levels:
+ <br>These transforms can be associated at various levels:
</p>
- <ul class='spaced-list'>
+ <ul>
<li>On serializer and parser instances to handle all objects of the class type globally.
<li>On classes through the <code><ja>@Bean</ja></code> annotation.
<li>On bean properties through the <code><ja>@BeanProperty</ja></code> annotations.
</ul>
+
<h6 class='figure'>Example: A serialized Calendar object using <code>CalendarSwap.RFC2822DTZ</code> transform.</h6>
<p class='bcode'>
http://localhost/sample?<ua>a1=<us>'Sun,+03+Mar+1901+09:05:06+GMT'</us>
@@ -315,8 +323,7 @@
<p>
{@link org.apache.juneau.urlencoding.UrlEncodingSerializer} and {@link org.apache.juneau.uon.UonSerializer}
classes are used to convert POJOs to URL-encoded strings.
- <br>
- The <code>UonSerializer</code> class converts parameter values to UON notation.
+ <br>The <code>UonSerializer</code> class converts parameter values to UON notation.
The <code>UrlEncodingSerializer</code> class converts a POJO to key/value URL-Encoded pairs using
<code>UonSerializer</code> to serialize the values.
If you're trying to construct complete URL-Encoded entities, use <code>UrlEncodingSerializer</code>.
@@ -324,39 +331,44 @@
</p>
<p>
The serializers include several configurable settings.
- <br>
- Static reusable instances of serializers are provided with commonly-used settings:
+ <br>Static reusable instances of serializers are provided with commonly-used settings:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT}
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT}
- All default settings, strict mode.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT_READABLE}
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializer#DEFAULT_READABLE}
- Use whitespace and indentation for readability.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT}
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT}
- All default settings, strict mode.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT_READABLE}
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT_READABLE}
- Use whitespace and indentation for readability.
- <li>{@link org.apache.juneau.uon.UonSerializer#DEFAULT_ENCODING}
+ <li>
+ {@link org.apache.juneau.uon.UonSerializer#DEFAULT_ENCODING}
- Same as DEFAULT, but use URL-Encoding on special characters.
</ul>
<p>
The general guidelines on which serializer to use is:
</p>
<ul class='spaced-list'>
- <li>Use encoding serializers when you're using the results to construct a URI yourself, and therefore
+ <li>
+ Use encoding serializers when you're using the results to construct a URI yourself, and therefore
need invalid URI characters to be encoded.
- <li>Use un-encoding serializers when you're creating parameter values and passing them off to some other
+ <li>
+ Use un-encoding serializers when you're creating parameter values and passing them off to some other
utility class that will itself encode invalid URI characters.
- <li>Use the readable serializer for debugging purposes.
+ <li>
+ Use the readable serializer for debugging purposes.
</ul>
<h6 class='topic'>Notes about examples</h6>
<p>
The examples shown in this document will use default strict settings.
- <br>
- For brevity, the examples will use public fields instead of getters/setters to reduce the size of the examples.
- <br>
- In the real world, you'll typically want to use standard bean getters and setters.
+ <br>For brevity, the examples will use public fields instead of getters/setters to reduce the size of the examples.
+ <br>In the real world, you'll typically want to use standard bean getters and setters.
</p>
<p>
To start off simple, we'll begin with the following simplified bean and build upon it.
@@ -426,10 +438,9 @@
<p>
The {@link org.apache.juneau.annotation.Bean @Bean} and {@link org.apache.juneau.annotation.BeanProperty @BeanProperty}
annotations are used to customize the behavior of beans across the entire framework.
- <br>
- They have various uses:
+ <br>They have various uses:
</p>
- <ul class='spaced-list'>
+ <ul>
<li>Hiding bean properties.
<li>Specifying the ordering of bean properties.
<li>Overriding the names of bean properties.
@@ -439,13 +450,10 @@
<p>
For example, we now add a <code>birthDate</code> property, and associate a transform with it to transform
it to an ISO8601 date-time string in GMT time.
- <br>
- We'll also add a couple of <code>URI</code> properties.
- <br>
- By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want
+ <br>We'll also add a couple of <code>URI</code> properties.
+ <br>By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want
them serialized.
- <br>
- Using transforms, we can convert them to standardized string forms.
+ <br>Using transforms, we can convert them to standardized string forms.
</p>
<p class='bcode'>
<jk>public class</jk> Person {
@@ -499,16 +507,17 @@
<p>
Another useful feature is the {@link org.apache.juneau.annotation.Bean#propertyNamer()} annotation that
allows you to plug in your own logic for determining bean property names.
- <br>
- The {@link org.apache.juneau.PropertyNamerDLC} is an example of an alternate property namer.
+ <br>The {@link org.apache.juneau.PropertyNamerDLC} is an example of an alternate property namer.
It converts bean property names to lowercase-dashed format.
</p>
+
<h6 class='figure'>Example:</h6>
<p class='bcode'>
<ja>@Bean</ja>(propertyNamer=PropertyNamerDLC.<jk>class</jk>)
<jk>public class</jk> Person {
...
</p>
+
<h6 class='figure'>Results</h6>
<p class='bcode'>
(<ua>id</ua>=<un>1</us>,<ua>name</ua>=<us>'John+Smith'</us>,<ua>uri</ua>=<us>http://sample/addressBook/person/1</us>,
@@ -627,17 +636,15 @@
<h3 class='topic' onclick='toggle(this)'>2.3 - Non-tree models and recursion detection</h3>
<div class='topic'>
<p>
- The URL-encoding serializer is designed to be used against POJO tree structures. <br>
- It expects that there not be loops in the POJO model (e.g. children with references to parents, etc...).
- <br>
- If you try to serialize models with loops, you will usually cause a <code>StackOverflowError</code> to
+ The URL-encoding serializer is designed to be used against POJO tree structures.
+ <br>It expects that there not be loops in the POJO model (e.g. children with references to parents, etc...).
+ <br>If you try to serialize models with loops, you will usually cause a <code>StackOverflowError</code> to
be thrown (if {@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_maxDepth} is not reached first).
</p>
<p>
If you still want to use the URL-encoding serializer on such models, Juneau provides the
{@link org.apache.juneau.serializer.SerializerContext#SERIALIZER_detectRecursions} setting.
- <br>
- It tells the serializer to look for instances of an object in the current branch of the tree and
+ <br>It tells the serializer to look for instances of an object in the current branch of the tree and
skip serialization when a duplicate is encountered.
</p>
<p>
@@ -688,8 +695,7 @@
</p>
<p>
Recursion detection introduces a performance penalty of around 20%.
- <br>
- For this reason the setting is disabled by default.
+ <br>For this reason the setting is disabled by default.
</p>
</div>
@@ -702,11 +708,14 @@
See the following classes for all configurable properties that can be used on this serializer:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.BeanContext}
+ <li>
+ {@link org.apache.juneau.BeanContext}
- Bean context properties.
- <li>{@link org.apache.juneau.uon.UonSerializerContext}
+ <li>
+ {@link org.apache.juneau.uon.UonSerializerContext}
- UON serializer context properties.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingSerializerContext}
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingSerializerContext}
- URL-Encoding serializer context properties.
</ul>
</div>
@@ -717,10 +726,10 @@
<h3 class='topic' onclick='toggle(this)'>2.5 - Other notes</h3>
<div class='topic'>
<ul class='spaced-list'>
- <li>Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an internal
+ <li>
+ Like all other Juneau serializers, the URL-encoding serializers are thread safe and maintain an internal
cache of bean classes encountered.
- <br>
- For performance reasons, it's recommended that serializers be reused whenever possible instead of
+ <br>For performance reasons, it's recommended that serializers be reused whenever possible instead of
always creating new instances.
</ul>
</div>
@@ -734,8 +743,7 @@
<p>
{@link org.apache.juneau.urlencoding.UrlEncodingParser} and {@link org.apache.juneau.uon.UonParser} classes
are used to convert URL-encoded strings back into POJOs.
- <br>
- The <code>UonParser</code> class converts UON-encoded parameter values to POJOs.
+ <br>The <code>UonParser</code> class converts UON-encoded parameter values to POJOs.
The <code>UrlEncodingParser</code> class converts entire URL-Encoded strings to POJOs using
<code>UonSerializer</code> to serialize individual values.
If you're trying to parse an entire URL-Encoded string, use <code>UrlEncodingParser</code>.
@@ -746,26 +754,30 @@
The following static reusable instances of <code>UrlEncodingParser</code> are provided for convenience:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingParser#DEFAULT}
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingParser#DEFAULT}
- Default parser for entire URL-encoded strings, decode <code>%xx</code> sequences.
- <li>{@link org.apache.juneau.uon.UonParser#DEFAULT}
+ <li>
+ {@link org.apache.juneau.uon.UonParser#DEFAULT}
- Default parser for URL-encoded parameter values, don't decode <code>%xx</code> sequences.
- <li>{@link org.apache.juneau.uon.UonParser#DEFAULT_DECODING}
+ <li>
+ {@link org.apache.juneau.uon.UonParser#DEFAULT_DECODING}
- Default parser for URL-encoded parameter values, decode <code>%xx</code> sequences.
</ul>
<p>
The general guidelines on which parser to use is:
</p>
<ul class='spaced-list'>
- <li>Use the <code>DEFAULT</code> parser for parameter values that have already had <code>%xx</code> sequences
+ <li>
+ Use the <code>DEFAULT</code> parser for parameter values that have already had <code>%xx</code> sequences
decoded, such as when using <code>HttpServletRequest.getQueryParameter(name)</code>.
- <li>Use the <code>DEFAULT_ENCODED</code> parser if the input has not already had <code>%xx</code> sequences
+ <li>
+ Use the <code>DEFAULT_ENCODED</code> parser if the input has not already had <code>%xx</code> sequences
decoded.
</ul>
<p>
Let's build upon the previous example and parse the generated URL-encoded string back into the original bean.
- <br>
- We start with the URL-encoded string that was generated.
+ <br>We start with the URL-encoded string that was generated.
</p>
<p class='bcode'>
<jc>// Use serializer with readable output.</jc>
@@ -854,16 +866,14 @@
<div class='topic'>
<p>
The URL-encoding parser is not limited to parsing back into the original bean classes.
- <br>
- If the bean classes are not available on the parsing side, the parser can also be used to parse into a
+ <br>If the bean classes are not available on the parsing side, the parser can also be used to parse into a
generic model consisting of <code>Maps</code>, <code>Collections</code>, and primitive objects.
</p>
<p>
You can parse into any <code>Map</code> type (e.g. <code>HashMap</code>, <code>TreeMap</code>), but
using {@link org.apache.juneau.ObjectMap} is recommended since it has many convenience methods
for converting values to various types.
- <br>
- The same is true when parsing collections. You can use any Collection (e.g. <code>HashSet</code>,
+ <br>The same is true when parsing collections. You can use any Collection (e.g. <code>HashSet</code>,
<code>LinkedList</code>) or array (e.g. <code>Object[]</code>, <code>String[]</code>,
<code>String[][]</code>), but using {@link org.apache.juneau.ObjectList} is recommended.
</p>
@@ -908,8 +918,7 @@
</p>
<p>
What we end up with is the exact same output.
- <br>
- Even the numbers and booleans are preserved because they are parsed into <code>Number</code> and
+ <br>Even the numbers and booleans are preserved because they are parsed into <code>Number</code> and
<code>Boolean</code> objects when parsing into generic models.
</p>
<p class='bcode'>
@@ -961,8 +970,7 @@
<p>
As a general rule, parsing into beans is often more efficient than parsing into generic models.
- <br>
- And working with beans is often less error prone than working with generic models.
+ <br>And working with beans is often less error prone than working with generic models.
</p>
</div>
@@ -975,9 +983,12 @@
See the following classes for all configurable properties that can be used on this parser:
</p>
<ul class='spaced-list'>
- <li>{@link org.apache.juneau.BeanContext} - Bean context properties.
- <li>{@link org.apache.juneau.uon.UonParserContext} - UON parser context properties.
- <li>{@link org.apache.juneau.urlencoding.UrlEncodingParserContext} - URL-Encoding parser context properties.
+ <li>
+ {@link org.apache.juneau.BeanContext} - Bean context properties.
+ <li>
+ {@link org.apache.juneau.uon.UonParserContext} - UON parser context properties.
+ <li>
+ {@link org.apache.juneau.urlencoding.UrlEncodingParserContext} - URL-Encoding parser context properties.
</ul>
</div>
@@ -987,10 +998,10 @@
<h3 class='topic' onclick='toggle(this)'>3.3 - Other notes</h3>
<div class='topic'>
<ul class='spaced-list'>
- <li>Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache
+ <li>
+ Like all other Juneau parsers, the URL-encoding parsers are thread safe and maintain an internal cache
of bean classes encountered.
- <br>
- For performance reasons, it's recommended that parser be reused whenever possible instead of always
+ <br>For performance reasons, it's recommended that parser be reused whenever possible instead of always
creating new instances.
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/Args.java b/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
index 72a1f0a..240d609 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
@@ -28,7 +28,7 @@ import org.apache.juneau.*;
* The format of a main argument is a token that does not start with <js>'-'</js>.
* <p>
* The format of an optional argument is <js>"-argName [zero or more tokens]"</js>.
- * <p>
+ *
* <h6 class='topic'>Command-line examples</h6>
* <ul>
* <li><code>java com.sample.MyClass mainArg1</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java b/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
index 4812adb..0df8d33 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
@@ -25,18 +25,24 @@ import org.apache.juneau.annotation.*;
/**
* Wraps a {@link ResourceBundle} to provide some useful additional functionality.
* <ul class='spaced-list'>
- * <li>Instead of throwing {@link MissingResourceException}, the {@link #getString(String)} method
+ * <li>
+ * Instead of throwing {@link MissingResourceException}, the {@link #getString(String)} method
* will return <js>"{!!key}"</js> if the bundle was not found, and <js>"{!key}"</js> if bundle
* was found but the key is not in the bundle.
- * <li>A client locale can be set as a {@link ThreadLocal} object using the static {@link #setClientLocale(Locale)}
+ * <li>
+ * A client locale can be set as a {@link ThreadLocal} object using the static {@link #setClientLocale(Locale)}
* so that client localized messages can be retrieved using the {@link #getClientString(String, Object...)}
* method on all instances of this class.
- * <li>Resource bundles on parent classes can be added to the search path for this class by using the
+ * <li>
+ * Resource bundles on parent classes can be added to the search path for this class by using the
* {@link #addSearchPath(Class, String)} method.
* This allows messages to be retrieved from the resource bundles of parent classes.
- * <li>Locale-specific bundles can be retrieved by using the {@link #getBundle(Locale)} method.
- * <li>The {@link #getString(Locale, String, Object...)} method can be used to retrieve locale-specific messages.
- * <li>Messages in the resource bundle can optionally be prefixed with the simple class name.
+ * <li>
+ * Locale-specific bundles can be retrieved by using the {@link #getBundle(Locale)} method.
+ * <li>
+ * The {@link #getString(Locale, String, Object...)} method can be used to retrieve locale-specific messages.
+ * <li>
+ * Messages in the resource bundle can optionally be prefixed with the simple class name.
* For example, if the class is <code>MyClass</code> and the properties file contains <js>"MyClass.myMessage"</js>,
* the message can be retrieved using <code>getString(<js>"myMessage"</js>)</code>.
* </ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java b/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
index 912dc18..26879ca 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
@@ -44,8 +44,7 @@ import org.apache.juneau.transform.*;
* <tr>
* <td>
* {@code Number} (e.g. {@code Integer}, {@code Short}, {@code Float},...)
- * <br>
- * <code>Number.<jsf>TYPE</jsf></code> (e.g. <code>Integer.<jsf>TYPE</jsf></code>,
+ * <br><code>Number.<jsf>TYPE</jsf></code> (e.g. <code>Integer.<jsf>TYPE</jsf></code>,
* <code>Short.<jsf>TYPE</jsf></code>, <code>Float.<jsf>TYPE</jsf></code>,...)
* </td>
* <td>
@@ -68,12 +67,11 @@ import org.apache.juneau.transform.*;
* </tr>
* <tr>
* <td>
- * {@code Collection} (e.g. {@code List}, {@code LinkedList}, {@code HashSet}, {@code ObjectList})
+ * {@code Collection} (e.g. {@code List}, {@code LinkedList}, {@code HashSet}, {@code ObjectList})
* </td>
* <td>
* {@code Collection<Object>}
- * <br>
- * {@code Object[]}
+ * <br>{@code Object[]}
* </td>
* <td>
* If {@code Collection} is not constructible, a {@code ObjectList} is created.
@@ -82,7 +80,6 @@ import org.apache.juneau.transform.*;
* <tr>
* <td>
* {@code X[]} (array of any type X)
- * <br>
* </td>
* <td>
* {@code List<X>}
@@ -95,10 +92,8 @@ import org.apache.juneau.transform.*;
* </td>
* <td>
* {@code List<List<X>>}
- * <br>
- * {@code List<X[]>}
- * <br>
- * {@code List[]<X>}
+ * <br>{@code List<X[]>}
+ * <br>{@code List[]<X>}
* </td>
* <td> </td>
* </tr>
@@ -134,12 +129,9 @@ import org.apache.juneau.transform.*;
* <tr>
* <td>
* Anything with one of the following methods:
- * <br>
- * <code><jk>public static</jk> T fromString(String)</code>
- * <br>
- * <code><jk>public static</jk> T valueOf(String)</code>
- * <br>
- * <code><jk>public</jk> T(String)</code>
+ * <br><code><jk>public static</jk> T fromString(String)</code>
+ * <br><code><jk>public static</jk> T valueOf(String)</code>
+ * <br><code><jk>public</jk> T(String)</code>
* </td>
* <td>
* <code>String</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
index 7eea934..3c4a32c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
@@ -69,11 +69,15 @@ public final class PojoIntrospector {
* the underlying constructor is inaccessible.
* @throws IllegalArgumentException If one of the following occurs:
* <ul class='spaced-list'>
- * <li>The number of actual and formal parameters differ.
- * <li>An unwrapping conversion for primitive arguments fails.
- * <li>A parameter value cannot be converted to the corresponding formal parameter type by a method invocation
+ * <li>
+ * The number of actual and formal parameters differ.
+ * <li>
+ * An unwrapping conversion for primitive arguments fails.
+ * <li>
+ * A parameter value cannot be converted to the corresponding formal parameter type by a method invocation
* conversion.
- * <li>The constructor pertains to an enum type.
+ * <li>
+ * The constructor pertains to an enum type.
* </ul>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -100,10 +104,15 @@ public final class PojoIntrospector {
* the underlying constructor is inaccessible.
* @throws IllegalArgumentException If one of the following occurs:
* <ul class='spaced-list'>
- * <li>The number of actual and formal parameters differ.
- * <li>An unwrapping conversion for primitive arguments fails.
- * <li>A parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion.
- * <li>The constructor pertains to an enum type.
+ * <li>
+ * The number of actual and formal parameters differ.
+ * <li>
+ * An unwrapping conversion for primitive arguments fails.
+ * <li>
+ * A parameter value cannot be converted to the corresponding formal parameter type by a method invocation
+ * conversion.
+ * <li>
+ * The constructor pertains to an enum type.
* </ul>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
index aa51b3a..9b83677 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
@@ -54,24 +54,30 @@ import org.apache.juneau.internal.*;
* <p>
* From this table, you can perform the following functions:
* <ul class='spaced-list'>
- * <li>Search - Return only rows where a search pattern matches.
- * <li>View - Return only the specified subset of columns in the specified order.
- * <li>Sort - Sort the table by one or more columns.
- * <li>Position/limit - Only return a subset of rows.
+ * <li>
+ * Search - Return only rows where a search pattern matches.
+ * <li>
+ * View - Return only the specified subset of columns in the specified order.
+ * <li>
+ * Sort - Sort the table by one or more columns.
+ * <li>
+ * Position/limit - Only return a subset of rows.
* </ul>
*
* <h5 class='topic'>Search</h5>
* <p>
* The search capabilities allow you to filter based on query patterns against strings, dates, and numbers.
* Queries take the form of a Map with column names as keys, and search patterns as values.
- * <br>
- * Multiple search patterns are ANDed (i.e. all patterns must match for the row to be returned).
+ * <br>Multiple search patterns are ANDed (i.e. all patterns must match for the row to be returned).
*
* <h5 class='section'>Example:</h5>
* <ul class='spaced-list'>
- * <li><tt>{myInt:'123'}</tt> - Return only rows where the <tt>myInt</tt> column is 123.
- * <li><tt>{myString:'foobar'}</tt> - Return only rows where the <tt>myString</tt> column is 'foobar'.
- * <li><tt>{myDate:'2001'}</tt> - Return only rows where the <tt>myDate</tt> column have dates in the year 2001.
+ * <li>
+ * <tt>{myInt:'123'}</tt> - Return only rows where the <tt>myInt</tt> column is 123.
+ * <li>
+ * <tt>{myString:'foobar'}</tt> - Return only rows where the <tt>myString</tt> column is 'foobar'.
+ * <li>
+ * <tt>{myDate:'2001'}</tt> - Return only rows where the <tt>myDate</tt> column have dates in the year 2001.
* </ul>
*
* <h5 class='topic'>String Patterns</h5>
@@ -92,9 +98,12 @@ import org.apache.juneau.internal.*;
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
- * <li>Whitespace is ignored around search patterns.
- * <li>Prepend <tt>+</tt> to tokens that must match. (e.g. <tt>+foo* +*bar</tt>)
- * <li>Prepend <tt>-</tt> to tokens that must not match. (e.g. <tt>+foo* -*bar</tt>)
+ * <li>
+ * Whitespace is ignored around search patterns.
+ * <li>
+ * Prepend <tt>+</tt> to tokens that must match. (e.g. <tt>+foo* +*bar</tt>)
+ * <li>
+ * Prepend <tt>-</tt> to tokens that must not match. (e.g. <tt>+foo* -*bar</tt>)
* </ul>
*
* <h5 class='topic'>Numeric Patterns</h5>
@@ -115,8 +124,10 @@ import org.apache.juneau.internal.*;
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
- * <li>Whitespace is ignored in search patterns.
- * <li>Negative numbers are supported.
+ * <li>
+ * Whitespace is ignored in search patterns.
+ * <li>
+ * Negative numbers are supported.
* </ul>
*
* <h5 class='topic'>Date Patterns</h5>
@@ -153,8 +164,7 @@ import org.apache.juneau.internal.*;
* <h5 class='topic'>View</h5>
* <p>
* The view capability allows you to return only the specified subset of columns in the specified order.
- * <br>
- * The view parameter is a list of either <tt>Strings</tt> or <tt>Maps</tt>.
+ * <br>The view parameter is a list of either <tt>Strings</tt> or <tt>Maps</tt>.
*
* <h6 class='topic'>Example view parameters:</h6>
* <ul>
@@ -165,8 +175,7 @@ import org.apache.juneau.internal.*;
* <h5 class='topic'>Sort</h5>
* <p>
* The sort capability allows you to sort values by the specified rows.
- * <br>
- * The sort parameter is a list of strings with an optional <js>'+'</js> or <js>'-'</js> suffix representing
+ * <br>The sort parameter is a list of strings with an optional <js>'+'</js> or <js>'-'</js> suffix representing
* ascending and descending order accordingly.
*
* <h6 class='topic'>Example sort parameters:</h6>
@@ -663,10 +672,8 @@ public final class PojoQuery {
/**
* Returns <jk>true</jk> if the specified date matches the pattern passed in through the constructor.
- * <br>
- * The Object can be of type {@link Date} or {@link Calendar}.
- * <br>
- * Always returns <jk>false</jk> on <jk>null</jk> input.
+ * <br>The Object can be of type {@link Date} or {@link Calendar}.
+ * <br>Always returns <jk>false</jk> on <jk>null</jk> input.
*/
@Override /* IMatcher */
public boolean matches(Object in) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/PojoRest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoRest.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoRest.java
index f2397b7..d4c4f94 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoRest.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoRest.java
@@ -25,23 +25,27 @@ import org.apache.juneau.parser.*;
/**
* Provides the ability to perform standard REST operations (GET, PUT, POST, DELETE) against nodes in a POJO model.
* Nodes in the POJO model are addressed using URLs.
+ *
* <p>
* A POJO model is defined as a tree model where nodes consist of consisting of the following:
* <ul class='spaced-list'>
- * <li>{@link Map Maps} and Java beans representing JSON objects.
- * <li>{@link Collection Collections} and arrays representing JSON arrays.
- * <li>Java beans.
+ * <li>
+ * {@link Map Maps} and Java beans representing JSON objects.
+ * <li>
+ * {@link Collection Collections} and arrays representing JSON arrays.
+ * <li>
+ * Java beans.
* </ul>
+ *
* <p>
* Leaves of the tree can be any type of object.
+ *
* <p>
* Use {@link #get(String) get()} to retrieve an element from a JSON tree.
- * <br>
- * Use {@link #put(String,Object) put()} to create (or overwrite) an element in a JSON tree.
- * <br>
- * Use {@link #post(String,Object) post()} to add an element to a list in a JSON tree.
- * <br>
- * Use {@link #delete(String) delete()} to remove an element from a JSON tree.
+ * <br>Use {@link #put(String,Object) put()} to create (or overwrite) an element in a JSON tree.
+ * <br>Use {@link #post(String,Object) post()} to add an element to a list in a JSON tree.
+ * <br>Use {@link #delete(String) delete()} to remove an element from a JSON tree.
+ *
* <p>
* Leading slashes in URLs are ignored.
* So <js>"/xxx/yyy/zzz"</js> and <js>"xxx/yyy/zzz"</js> are considered identical.
@@ -105,11 +109,12 @@ import org.apache.juneau.parser.*;
* + <js>"}"</js>
* );
* johnSmith.put(<js>"additionalInfo/medicalInfo"</js>, medicalInfo);
+ * </p>
+ *
* <p>
* In the special case of collections/arrays of maps/beans, a special XPath-like selector notation can be used in lieu
* of index numbers on GET requests to return a map/bean with a specified attribute value.
- * <br>
- * The syntax is {@code @attr=val}, where attr is the attribute name on the child map, and val is the matching value.
+ * <br>The syntax is {@code @attr=val}, where attr is the attribute name on the child map, and val is the matching value.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -459,9 +464,12 @@ public final class PojoRest {
* <p>
* Can be any of the following formats:
* <ul class='spaced-list'>
- * <li>Method name only. e.g. <js>"myMethod"</js>.
- * <li>Method name with class names. e.g. <js>"myMethod(String,int)"</js>.
- * <li>Method name with fully-qualified class names. e.g. <js>"myMethod(java.util.String,int)"</js>.
+ * <li>
+ * Method name only. e.g. <js>"myMethod"</js>.
+ * <li>
+ * Method name with class names. e.g. <js>"myMethod(String,int)"</js>.
+ * <li>
+ * Method name with fully-qualified class names. e.g. <js>"myMethod(java.util.String,int)"</js>.
* </ul>
* <p>
* As a rule, use the simplest format needed to uniquely resolve a method.
@@ -473,11 +481,15 @@ public final class PojoRest {
* the underlying constructor is inaccessible.
* @throws IllegalArgumentException If one of the following occurs:
* <ul class='spaced-list'>
- * <li>The number of actual and formal parameters differ.
- * <li>An unwrapping conversion for primitive arguments fails.
- * <li>A parameter value cannot be converted to the corresponding formal parameter type by a method invocation
+ * <li>
+ * The number of actual and formal parameters differ.
+ * <li>
+ * An unwrapping conversion for primitive arguments fails.
+ * <li>
+ * A parameter value cannot be converted to the corresponding formal parameter type by a method invocation
* conversion.
- * <li>The constructor pertains to an enum type.
+ * <li>
+ * The constructor pertains to an enum type.
* </ul>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -538,11 +550,11 @@ public final class PojoRest {
* If the list does not already exist, it will be created.
* <p>
* This method expands the POJO model as necessary to create the new element.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>You can only post to three types of nodes:
- * <ul class='spaced-list'>
+ * <ul>
* <li>{@link List Lists}
* <li>{@link Map Maps} containing integers as keys (i.e sparse arrays)
* <li>arrays
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/PojoRestException.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoRestException.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoRestException.java
index 8e7569b..7de95ff 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoRestException.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoRestException.java
@@ -24,11 +24,14 @@ import org.apache.juneau.*;
* <p>
* The status code is an HTTP-equivalent code. It will be one of the following:
* <ul class='spaced-list'>
- * <li>{@link HttpURLConnection#HTTP_BAD_REQUEST HTTP_BAD_REQUEST}
+ * <li>
+ * {@link HttpURLConnection#HTTP_BAD_REQUEST HTTP_BAD_REQUEST}
* - Attempting to do something impossible.
- * <li>{@link HttpURLConnection#HTTP_NOT_FOUND HTTP_NOT_FOUND}
+ * <li>
+ * {@link HttpURLConnection#HTTP_NOT_FOUND HTTP_NOT_FOUND}
* - Attempting to access a non-existent node in the tree.
- * <li>{@link HttpURLConnection#HTTP_FORBIDDEN HTTP_FORBIDDEN}
+ * <li>
+ * {@link HttpURLConnection#HTTP_FORBIDDEN HTTP_FORBIDDEN}
* - Attempting to overwrite the root object.
* </ul>
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/utils/SearchArgs.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/SearchArgs.java b/juneau-core/src/main/java/org/apache/juneau/utils/SearchArgs.java
index e8371da..3fd9100 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/SearchArgs.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/SearchArgs.java
@@ -142,18 +142,22 @@ public class SearchArgs {
/**
* Specifies the sort arguments.
+ *
* <p>
* The sort argument is a simple comma-delimited list of column names.
* <br>Column names can be suffixed with <js>'+'</js> or <js>'-'</js> to indicate ascending or descending order.
* <br>No suffix implies ascending order.
+ *
* <p>
* For example:
* <p class='bcode'>
* <jc>// Order by column1 ascending, then column2 descending.</jc>
* builder.sort(<js>"column1, column2-"</js>);
* </p>
+ *
* <p>
* Note that the order of the order arguments is important.
+ *
* <p>
* Whitespace is trimmed from column names.
*
@@ -169,9 +173,11 @@ public class SearchArgs {
/**
* Specifies the sort arguments.
+ *
* <p>
- * <br>Column names can be suffixed with <js>'+'</js> or <js>'-'</js> to indicate ascending or descending order.
+ * Column names can be suffixed with <js>'+'</js> or <js>'-'</js> to indicate ascending or descending order.
* <br>No suffix implies ascending order.
+ *
* <p>
* Note that the order of the sort is important.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/NamespaceFactory.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/NamespaceFactory.java b/juneau-core/src/main/java/org/apache/juneau/xml/NamespaceFactory.java
index 31f9cc7..396cbb3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/NamespaceFactory.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/NamespaceFactory.java
@@ -54,7 +54,7 @@ public final class NamespaceFactory {
* Converts the specified object into a {@link Namespace} object.
* <p>
* Can be any of following types:
- * <ul class='spaced-list'>
+ * <ul>
* <li>A {@link Namespace} object
* <li>A JSON string containing a single key/value pair indicating the name/URI mapping.
* <li>A <code>Map</code> containing a single key/value pair indicating the name/URI mapping.
@@ -86,7 +86,7 @@ public final class NamespaceFactory {
* Converts the specified object into an array of {@link Namespace} object.
* <p>
* Can be any of following types:
- * <ul class='spaced-list'>
+ * <ul>
* <li>A {@link Namespace} array
* <li>A JSON string with key/value pairs indicating name/URI pairs.
* <li>A <code>Map</code> with key/value pairs indicating name/URI pairs.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserBuilder.java
index 8e1a348..d6b287d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserBuilder.java
@@ -69,7 +69,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_validating</jsf>, value)</code>.
@@ -94,7 +94,7 @@ public class XmlParserBuilder extends ParserBuilder {
* </ul>
* <p>
* Associates an {@link XMLReporter} with this parser.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Reporters are not copied to new parsers during a clone.
@@ -102,7 +102,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_reporter</jsf>, value)</code>.
@@ -130,7 +130,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_resolver</jsf>, value)</code>.
@@ -158,7 +158,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_eventAllocator</jsf>, value)</code>.
@@ -198,7 +198,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <td><code>{ root: { a:<js>'foobar'</js> }}</code></td>
* </tr>
* </table>
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_preserveRootElement</jsf>, value)</code>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
index d7f36fc..fdeea43 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
@@ -28,12 +28,15 @@ import org.apache.juneau.parser.*;
*
* <h6 class='topic'>Inherited configurable properties</h6>
* <ul class='doctree'>
- * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a>
+ * <li class='jc'>
+ * <a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a>
* - Properties associated with handling beans on serializers and parsers.
- * <ul>
- * <li class='jc'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a>
- * - Configurable properties common to all parsers.
- * </ul>
+ * <ul>
+ * <li class='jc'>
+ * <a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a>
+ * - Configurable properties common to all parsers.
+ * </ul>
+ * </li>
* </ul>
*/
public class XmlParserContext extends ParserContext {
@@ -64,7 +67,7 @@ public class XmlParserContext extends ParserContext {
* </ul>
* <p>
* Associates an {@link XMLReporter} with this parser.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Reporters are not copied to new parsers during a clone.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
index 4c9d0a6..8d75f98 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
@@ -119,7 +119,7 @@ import org.apache.juneau.xml.annotation.*;
* <h6 class='topic'>Behavior-specific subclasses</h6>
* <p>
* The following direct subclasses are provided for convenience:
- * <ul class='spaced-list'>
+ * <ul>
* <li>{@link Sq} - Default serializer, single quotes.
* <li>{@link SqReadable} - Default serializer, single quotes, whitespace added.
* </ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
index 6592980..af35156 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
@@ -62,7 +62,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* </ul>
* <p>
* If not enabled, XML output will not contain any namespaces regardless of any other settings.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_enableNamespaces</jsf>, value)</code>.
@@ -105,14 +105,14 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* the root element is serialized.
* <p>
* This setting is ignored if {@link XmlSerializerContext#XML_enableNamespaces} is not enabled.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Auto-detection of namespaces can be costly performance-wise.
* In high-performance environments, it's recommended that namespace detection be disabled, and that
* namespaces be manually defined through the {@link XmlSerializerContext#XML_namespaces} property.
* </ul>
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_autoDetectNamespaces</jsf>, value)</code>.
@@ -140,7 +140,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* Use this setting to add {@code xmlns:x} attributes to the root element for the default and all mapped namespaces.
* <p>
* This setting is ignored if {@link XmlSerializerContext#XML_enableNamespaces} is not enabled.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_addNamespaceUrisToRoot</jsf>, value)</code>.
@@ -166,7 +166,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* </ul>
* <p>
* Specifies the default namespace URI for this document.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_defaultNamespace</jsf>, value)</code>.
@@ -193,7 +193,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* <p>
* Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated by the
* {@link XmlSchemaSerializer} class.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_xsNamespace</jsf>, value)</code>.
@@ -219,7 +219,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* </ul>
* <p>
* The default list of namespaces associated with this serializer.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This is equivalent to calling <code>property(<jsf>XML_namespaces</jsf>, values)</code>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
index cd11328..450ad36 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
@@ -25,13 +25,15 @@ import org.apache.juneau.serializer.*;
*
* <h6 class='topic'>Inherited configurable properties</h6>
* <ul class='doctree'>
- * <li class='jc'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a>
+ * <li class='jc'>
+ * <a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a>
* - Properties associated with handling beans on serializers and parsers.
- * <ul>
- * <li class='jc'><a class="doclink"
- * href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a>
- * - Configurable properties common to all serializers.
- * </ul>
+ * <ul>
+ * <li class='jc'>
+ * <a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a>
+ * - Configurable properties common to all serializers.
+ * </ul>
+ * </li>
* </ul>
*/
public class XmlSerializerContext extends SerializerContext {
@@ -69,7 +71,7 @@ public class XmlSerializerContext extends SerializerContext {
* the root element is serialized.
* <p>
* This setting is ignored if {@link #XML_enableNamespaces} is not enabled.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Auto-detection of namespaces can be costly performance-wise.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlUtils.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlUtils.java
index 43d0835..2b1160e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlUtils.java
@@ -164,18 +164,18 @@ public final class XmlUtils {
/**
* Encodes the specified element text and sends the results to the specified writer.
+ *
* <p>
* Encodes any invalid XML text characters to <code>_x####_</code> sequences and sends the response to the specified
* writer.
- * <br>
- * Encodes <js>'&'</js>, <js>'<'</js>, and <js>'>'</js> as XML entities.
- * <br>
- * Encodes invalid XML text characters to <code>_x####_</code> sequences.
+ * <br>Encodes <js>'&'</js>, <js>'<'</js>, and <js>'>'</js> as XML entities.
+ * <br>Encodes invalid XML text characters to <code>_x####_</code> sequences.
*
* @param w The writer to send the output to.
* @param o The object being encoded.
* @param trim Trim the text before serializing it.
- * @param preserveWhitespace Specifies whether we're in preserve-whitespace mode.
+ * @param preserveWhitespace
+ * Specifies whether we're in preserve-whitespace mode.
* (e.g. {@link XmlFormat#MIXED_PWS} or {@link XmlFormat#TEXT_PWS}.
* If <jk>true</jk>, leading and trailing whitespace characters will be encoded.
* @return The same writer passed in.
@@ -300,13 +300,12 @@ public final class XmlUtils {
/**
* Encodes the specified attribute value and sends the results to the specified writer.
+ *
* <p>
* Encodes any invalid XML text characters to <code>_x####_</code> sequences and sends the response to the specified
* writer.
- * <br>
- * Encodes <js>'&'</js>, <js>'<'</js>, <js>'>'</js>, <js>'"'</js>, and <js>'\''</js> as XML entities.
- * <br>
- * Encodes invalid XML text characters to <code>_x####_</code> sequences.
+ * <br>Encodes <js>'&'</js>, <js>'<'</js>, <js>'>'</js>, <js>'"'</js>, and <js>'\''</js> as XML entities.
+ * <br>Encodes invalid XML text characters to <code>_x####_</code> sequences.
*
* @param w The writer to send the output to.
* @param o The object being encoded.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/XmlWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlWriter.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlWriter.java
index cb00878..93d6248 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlWriter.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlWriter.java
@@ -21,7 +21,7 @@ import org.apache.juneau.xml.annotation.*;
/**
* Specialized writer for serializing XML.
- * <p>
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>This class is not intended for external use.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0d913b38/juneau-core/src/main/java/org/apache/juneau/xml/annotation/Xml.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/Xml.java b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/Xml.java
index 97e2d92..596151d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/Xml.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/Xml.java
@@ -23,7 +23,7 @@ import java.lang.annotation.*;
* Can be applied to Java packages, types, fields, and methods.
* <p>
* Can be used for the following:
- * <ul class='spaced-list'>
+ * <ul>
* <li>Override the child element name on the XML representation of collection or array properties.
* <li>Specify the XML namespace on a package, class, or method.
* <li>Override the XML format on a POJO.
@@ -75,9 +75,11 @@ public @interface Xml {
/**
* Sets the XML prefix of this property or class.
* <ul class='spaced-list'>
- * <li>When applied to a {@link ElementType#TYPE}, namespace is applied to all properties in the class, and all
+ * <li>
+ * When applied to a {@link ElementType#TYPE}, namespace is applied to all properties in the class, and all
* subclasses of the class.
- * <li>When applied to bean properties on {@link ElementType#METHOD} and {@link ElementType#FIELD}, applies
+ * <li>
+ * When applied to bean properties on {@link ElementType#METHOD} and {@link ElementType#FIELD}, applies
* to the bean property.
* </ul>
* <p>