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:37 UTC
[09/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/xml/XmlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
index a026209..39e4171 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerBuilder.java
@@ -34,7 +34,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Constructor.
- *
+ *
* @param ps The initial configuration settings for this builder.
*/
public XmlSerializerBuilder(PropertyStore ps) {
@@ -53,10 +53,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Add namespace URLs to the root element.
- *
+ *
* <p>
* Use this setting to add {@code xmlns:x} attributes to the root element for the default and all mapped namespaces.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_addNamespaceUrisToRoot}
@@ -73,10 +73,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Add namespace URLs to the root element.
- *
+ *
* <p>
* Shortcut for calling <code>addNamespaceUrisToRoot(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_addNamespaceUrisToRoot}
@@ -90,10 +90,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Auto-detect namespace usage.
- *
+ *
* <p>
* Detect namespace usage before serialization.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_autoDetectNamespaces}
@@ -110,10 +110,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Default namespace.
- *
+ *
* <p>
* Specifies the default namespace URI for this document.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_defaultNamespace}
@@ -130,10 +130,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Enable support for XML namespaces.
- *
+ *
* <p>
* If not enabled, XML output will not contain any namespaces regardless of any other settings.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_enableNamespaces}
@@ -150,10 +150,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Enable support for XML namespaces.
- *
+ *
* <p>
* Shortcut for calling <code>enableNamespaces(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_enableNamespaces}
@@ -167,10 +167,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Enable support for XML namespaces.
- *
+ *
* <p>
* Shortcut for calling <code>enableNamespaces(<jk>true</jk>)</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_enableNamespaces}
@@ -184,10 +184,10 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Default namespaces.
- *
+ *
* <p>
* The default list of namespaces associated with this serializer.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_namespaces}
@@ -202,11 +202,11 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: XMLSchema namespace.
- *
+ *
* <p>
* Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated by the
* {@link XmlSchemaSerializer} class.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link XmlSerializer#XML_xsNamespace}
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
index 46290ed..935dfd4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
@@ -29,7 +29,7 @@ import org.apache.juneau.xml.annotation.*;
/**
* Session object that lives for the duration of a single use of {@link XmlSerializer}.
- *
+ *
* <p>
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused within the same thread.
@@ -52,7 +52,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* 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.
@@ -107,7 +107,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/*
* Add a namespace to this session.
- *
+ *
* @param ns The namespace being added.
*/
private void addNamespace(Namespace ns) {
@@ -126,7 +126,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Returns the {@link XmlSerializer#XML_addBeanTypeProperties} setting value for this session.
- *
+ *
* @return The {@link XmlSerializer#XML_addBeanTypeProperties} setting value for this session.
*/
@Override /* SerializerSession */
@@ -136,11 +136,11 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Returns <jk>true</jk> if we're serializing HTML.
- *
+ *
* <p>
* The difference in behavior is how empty non-void elements are handled.
* The XML serializer will produce a collapsed tag, whereas the HTML serializer will produce a start and end tag.
- *
+ *
* @return <jk>true</jk> if we're generating HTML.
*/
protected boolean isHtmlMode() {
@@ -149,7 +149,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Converts the specified output target object to an {@link XmlWriter}.
- *
+ *
* @param out The output target object.
* @return The output target object wrapped in an {@link XmlWriter}.
* @throws Exception
@@ -172,7 +172,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Recursively searches for the XML namespaces on the specified POJO and adds them to the serializer context object.
- *
+ *
* @param o The POJO to check.
* @throws SerializeException
*/
@@ -254,7 +254,7 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Workhorse method.
- *
+ *
* @param out The writer to send the output to.
* @param o The object to serialize.
* @param eType The expected type if this is a bean property value being serialized.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlUtils.java
index 8cbdccc..88d9270 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlUtils.java
@@ -35,7 +35,7 @@ public final class XmlUtils {
/**
* Encodes any invalid XML element name characters to <code>_x####_</code> sequences.
- *
+ *
* @param w The writer to send the output to.
* @param o The object being encoded.
* @return The same writer passed in.
@@ -57,7 +57,7 @@ public final class XmlUtils {
/**
* Encodes any invalid XML element name characters to <code>_x####_</code> sequences.
- *
+ *
* @param o The object being encoded.
* @return The encoded element name string.
*/
@@ -131,7 +131,7 @@ public final class XmlUtils {
/**
* Escapes invalid XML text characters to <code>_x####_</code> sequences.
- *
+ *
* @param o The object being encoded.
* @return The encoded string.
*/
@@ -166,13 +166,13 @@ 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.
- *
+ *
* @param w The writer to send the output to.
* @param o The object being encoded.
* @param trim Trim the text before serializing it.
@@ -245,7 +245,7 @@ public final class XmlUtils {
/**
* Serializes and encodes the specified object as valid XML attribute name.
- *
+ *
* @param w The writer to send the output to.
* @param o The object being serialized.
* @return This object (for method chaining).
@@ -302,13 +302,13 @@ 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.
- *
+ *
* @param w The writer to send the output to.
* @param o The object being encoded.
* @param trim
@@ -380,7 +380,7 @@ public final class XmlUtils {
/**
* Translates any _x####_ sequences (introduced by the various encode methods) back into their original characters.
- *
+ *
* @param s The string being decoded.
* @param sb The string builder to use as a scratch pad.
* @return The decoded string.
@@ -418,7 +418,7 @@ public final class XmlUtils {
/**
* Given a list of Strings and other Objects, combines Strings that are next to each other in the list.
- *
+ *
* @param l The list of text nodes to collapse.
* @return The same list.
*/
@@ -481,10 +481,10 @@ public final class XmlUtils {
/**
* Find the namespace given a list of <ja>@Xml</ja> and <ja>@XmlSchema</ja> annotations.
- *
+ *
* <p>
* The annotations should be a child-to-parent ordering of annotations found on a class or method.
- *
+ *
* @param xmls The list of <ja>@Xml</ja> annotations.
* @param schemas The list of <ja>@XmlSchema</ja> annotations.
* @return The namespace, or <jk>null</jk> if it couldn't be found.
@@ -548,7 +548,7 @@ public final class XmlUtils {
/**
* Utility method that converts the current event on the XML stream to something human-readable for debug purposes.
- *
+ *
* @param r The XML stream reader whose current event is to be converted to a readable string.
* @return The event in human-readable form.
*/
@@ -589,7 +589,7 @@ public final class XmlUtils {
/**
* Shortcut for calling <code>URLEncoder.<jsm>encode</jsm>(o.toString(), <js>"UTF-8"</js>)</code>.
- *
+ *
* @param o The object to encode.
* @return The URL encoded string, or <jk>null</jk> if the object was null.
*/
@@ -603,7 +603,7 @@ public final class XmlUtils {
/**
* Shortcut for calling <code>URLEncoder.<jsm>decode</jsm>(o.toString(), <js>"UTF-8"</js>)</code>.
- *
+ *
* @param s The string to decode.
* @return The decoded string, or <jk>null</jk> if the string was null.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlWriter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlWriter.java
index 509b6a2..5a4cf52 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlWriter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlWriter.java
@@ -21,8 +21,9 @@ import org.apache.juneau.xml.annotation.*;
/**
* Specialized writer for serializing XML.
- *
- * <h5 class='section'>Notes:</h5>
+ *
+ *
+ * <h5 class='topic'>Notes</h5>
* <ul>
* <li>This class is not intended for external use.
* </ul>
@@ -34,7 +35,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Constructor.
- *
+ *
* @param out The wrapped writer.
* @param useWhitespace If <jk>true</jk> XML elements will be indented.
* @param maxIndent The maximum indentation level.
@@ -53,7 +54,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an opening tag to the output: <code><xt><ns:name</xt></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @param needsEncoding If <jk>true</jk>, element name will be encoded.
@@ -73,7 +74,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>oTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @return This object (for method chaining).
@@ -85,7 +86,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>oTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param name The element name.
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
@@ -96,7 +97,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).oTag(ns, name, needsEncoding);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -110,7 +111,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).oTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -123,7 +124,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).oTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param name The element name.
* @return This object (for method chaining).
@@ -135,10 +136,10 @@ public class XmlWriter extends SerializerWriter {
/**
* Closes a tag.
- *
+ *
* <p>
* Shortcut for <code>append(<js>'>'</js>);</code>
- *
+ *
* @return This object (for method chaining).
* @throws IOException
*/
@@ -149,10 +150,10 @@ public class XmlWriter extends SerializerWriter {
/**
* Closes an empty tag.
- *
+ *
* <p>
* Shortcut for <code>append(<js>'/'</js>).append(<js>'>'</js>);</code>
- *
+ *
* @return This object (for method chaining).
* @throws IOException
*/
@@ -163,7 +164,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes a closed tag to the output: <code><xt><ns:name/></xt></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @param needsEncoding If <jk>true</jk>, element name will be encoded.
@@ -183,7 +184,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>tag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @return This object (for method chaining).
@@ -195,7 +196,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>tag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param name The element name.
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
@@ -206,7 +207,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).tag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param name The element name.
* @return This object (for method chaining).
@@ -218,7 +219,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).tag(ns, name, needsEncoding);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -232,7 +233,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).tag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -246,7 +247,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes a start tag to the output: <code><xt><ns:name></xt></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @param needsEncoding If <jk>true</jk>, element name will be encoded.
@@ -259,7 +260,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>sTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @return This object (for method chaining).
@@ -271,7 +272,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>sTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param name The element name.
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
@@ -282,7 +283,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).sTag(ns, name, needsEncoding);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -296,7 +297,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).sTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -309,7 +310,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).sTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param name The element name.
* @return This object (for method chaining).
@@ -322,7 +323,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an end tag to the output: <code><xt></ns:name></xt></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @param needsEncoding If <jk>true</jk>, element name will be encoded.
@@ -342,7 +343,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>eTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
* @return This object (for method chaining).
@@ -354,7 +355,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>eTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param name The element name.
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
@@ -365,7 +366,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).eTag(ns, name, needsEncoding);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -379,7 +380,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).eTag(ns, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The element name.
@@ -392,7 +393,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>i(indent).eTag(<jk>null</jk>, name, <jk>false</jk>);</code>
- *
+ *
* @param indent The number of prefix tabs to add.
* @param name The element name.
* @return This object (for method chaining).
@@ -404,7 +405,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an attribute to the output: <code><xa>ns:name</xa>=<xs>'value'</xs></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @param value The attribute value.
@@ -418,7 +419,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>attr(<jk>null</jk>, name, value, <jk>false</jk>);</code>
- *
+ *
* @param name The attribute name.
* @param value The attribute value.
* @param valNeedsEncoding If <jk>true</jk>, attribute name will be encoded.
@@ -431,7 +432,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>attr(ns, name, value, <jk>false</jk>);</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @param value The attribute value.
@@ -444,7 +445,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Same as {@link #attr(String, String, Object)}, except pass in a {@link Namespace} object for the namespace.
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @param value The attribute value.
@@ -457,7 +458,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for <code>attr(<jk>null</jk>, name, value, <jk>false</jk>);</code>
- *
+ *
* @param name The attribute name.
* @param value The attribute value.
* @return This object (for method chaining).
@@ -470,7 +471,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an open-ended attribute to the output: <code><xa>ns:name</xa>=</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @return This object (for method chaining).
@@ -486,7 +487,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an open-ended attribute to the output: <code><xa>ns:name</xa>=</code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @return This object (for method chaining).
@@ -498,7 +499,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an attribute with a URI value to the output: <code><xa>ns:name</xa>=<xs>'uri-value'</xs></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @param value The attribute value, convertible to a URI via <code>toString()</code>
@@ -511,7 +512,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Writes an attribute with a URI value to the output: <code><xa>ns:name</xa>=<xs>'uri-value'</xs></code>
- *
+ *
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
* @param value The attribute value, convertible to a URI via <code>toString()</code>
@@ -524,7 +525,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Shortcut for calling <code>text(o, <jk>false</jk>);</code>
- *
+ *
* @param o The object being serialized.
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
@@ -536,7 +537,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Serializes and encodes the specified object as valid XML text.
- *
+ *
* @param o The object being serialized.
* @param preserveWhitespace
* If <jk>true</jk>, then we're serializing {@link XmlFormat#MIXED_PWS} or {@link XmlFormat#TEXT_PWS} content.
@@ -550,7 +551,7 @@ public class XmlWriter extends SerializerWriter {
/**
* Same as {@link #text(Object)} but treats the value as a URL to resolved then serialized.
- *
+ *
* @param o The object being serialized.
* @return This object (for method chaining).
* @throws IOException
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
index 80e93c4..f4681a0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
@@ -19,10 +19,10 @@ import java.lang.annotation.*;
/**
* Annotation for specifying various XML options for the XML and RDF/XML serializers.
- *
+ *
* <p>
* Can be applied to Java packages, types, fields, and methods.
- *
+ *
* <p>
* Can be used for the following:
* <ul>
@@ -39,10 +39,10 @@ public @interface Xml {
/**
* Sets the name of the XML child elements for bean properties of type collection and array.
- *
+ *
* <p>
* Applies only to collection and array bean properties.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jk>public class</jk> MyBean {
@@ -50,7 +50,7 @@ public @interface Xml {
* <jk>public</jk> String[] <jf>children</jf> = {<js>"foo"</js>,<js>"bar"</js>};
* }
* </p>
- *
+ *
* <p>
* Without the <ja>@Xml</ja> annotation, serializing this bean as XML would have produced the following...
* <p class='bcode'>
@@ -61,7 +61,7 @@ public @interface Xml {
* <xt></children></xt>
* <xt></object></xt>
* </p>
- *
+ *
* <p>
* With the annotations, serializing this bean as XML produces the following...
* <p class='bcode'>
@@ -77,29 +77,29 @@ public @interface Xml {
/**
* The {@link XmlFormat} to use for serializing this object type.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jk>public class</jk> MyBean {
- *
+ *
* <jc>// Normally, bean properties would be rendered as child elements of the bean element.</jc>
* <jc>// Override so that it's rendered as a "f1='123'" attribute on the bean element instead.</jc>
* <ja>@Xml</ja>(format=XmlFormat.<jsf>ATTR</jsf>}
* <jk>public int</jk> f1 = 123;
- *
+ *
* <jc>// Normally, bean URL properties would be rendered as XML attributes on the bean element.</jc>
* <jc>// Override so that it's rendered as an <href>http://foo</href> child element instead.</jc>
* <ja>@BeanProperty</ja>(uri=<jk>true</jk>)
* <ja>@Xml</ja>(format=XmlFormat.<jsf>ELEMENT</jsf>}
* <jk>public</jk> URL <jf>href</jf> = <jk>new</jk> URL(<js>"http://foo"</js>);
- *
+ *
* <jc>// Normally, collection properties would be grouped under a single <children> child element on the bean element.</jc>
* <jc>// Override so that entries are directly children of the bean element with each entry having an element name of <child>.</jc>
* <ja>@Xml</ja>(format=XmlFormat.<jsf>COLLAPSED</jsf>, childName=<js>"child"</js>}
* <jk>public</jk> String[] <jf>children</jf> = <js>"foo"</js>,<js>"bar"</js>};
* }
* </p>
- *
+ *
* <p>
* Without the <ja>@Xml</ja> annotations, serializing this bean as XML would have produced the following...
* <p class='bcode'>
@@ -111,7 +111,7 @@ public @interface Xml {
* <xt></children></xt>
* <xt></object></xt>
* </p>
- *
+ *
* <p>
* With the annotations, serializing this bean as XML produces the following...
* <p class='bcode'>
@@ -126,7 +126,7 @@ public @interface Xml {
/**
* Sets the namespace URI of this property or class.
- *
+ *
* <p>
* Must be matched with a {@link #prefix()} annotation on this object, a parent object, or a {@link XmlNs @XmlNs} with the
* same name through the {@link XmlSchema#xmlNs() @XmlSchema.xmlNs()} annotation on the package.
@@ -135,7 +135,7 @@ 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
@@ -144,7 +144,7 @@ public @interface Xml {
* When applied to bean properties on {@link ElementType#METHOD} and {@link ElementType#FIELD}, applies
* to the bean property.
* </ul>
- *
+ *
* <p>
* Must either be matched to a {@link #namespace()} annotation on the same object, parent object, or a
* {@link XmlNs @XmlNs} with the same name through the {@link XmlSchema#xmlNs() @XmlSchema.xmlNs()} annotation on the package.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
index f536b7c..f730e25 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
@@ -19,10 +19,10 @@ public enum XmlFormat {
/**
* Normal formatting (default).
- *
+ *
* <p>
* On a bean class, implies {@link #ELEMENTS} meaning bean properties will be serialized as child elements by default.
- *
+ *
* <p>
* On a bean property, implies {@link #ELEMENT} meaning the bean property will be serialized as a child element.
*/
@@ -30,10 +30,10 @@ public enum XmlFormat {
/**
* Render a bean property as an attribute instead of an element.
- *
+ *
* <p>
* Only applicable for bean properties, not bean classes.
- *
+ *
* <p>
* Can only be applied to properties (methods/fields) of class types that can be convertible to <code>Strings</code>.
*/
@@ -41,10 +41,10 @@ public enum XmlFormat {
/**
* Render property as attributes instead of an element.
- *
+ *
* <p>
* On a bean class, implies bean properties will be serialized as attributes instead of child elements by default.
- *
+ *
* <p>
* On bean properties, implies that the bean property value itself should be serialized as attributes on the bean
* element.
@@ -55,10 +55,10 @@ public enum XmlFormat {
/**
* Render property as an element instead of an attribute.
- *
+ *
* <p>
* Only applicable for bean properties, not bean classes.
- *
+ *
* <p>
* Used to override the behavior of the {@link #ATTRS} format applied to the bean class.
*/
@@ -66,14 +66,14 @@ public enum XmlFormat {
/**
* Render property value directly as the contents of the element.
- *
+ *
* <p>
* On a bean class, implies that bean properties will be serialized as child elements.
* Note that this is equivalent to {@link #DEFAULT}.
- *
+ *
* <p>
* Only applicable for objects of type array/Collection.
- *
+ *
* <p>
* On a bean property, implies that the bean property value itself should be serialized as child elements of the
* bean element.
@@ -82,13 +82,13 @@ public enum XmlFormat {
/**
* Same as {@link #ELEMENTS} except primitive types (e.g. string/boolean/number/null) are not wrapped in elements.
- *
+ *
* <p>
* Only applicable for bean properties, not bean classes.
- *
+ *
* <p>
* Only applicable for objects of type array/Collection.
- *
+ *
* <p>
* Use of this format may cause data type loss during parsing if the types cannot be inferred through reflection.
*/
@@ -96,7 +96,7 @@ public enum XmlFormat {
/**
* Same as {@link XmlFormat#MIXED}, but whitespace in text nodes are not trimmed during parsing.
- *
+ *
* <p>
* An example use is HTML5 <xt><pre></xt> where whitespace should not be discarded.
*/
@@ -104,13 +104,13 @@ public enum XmlFormat {
/**
* Render property value as the text content of the element.
- *
+ *
* <p>
* Similar to {@link #MIXED} but value must be a single value, not a collection.
- *
+ *
* <p>
* Only applicable for bean properties, not bean classes.
- *
+ *
* <p>
* Use of this format may cause data type loss during parsing if the type cannot be inferred through reflection.
*/
@@ -123,13 +123,13 @@ public enum XmlFormat {
/**
* Same as {@link #TEXT} except the content is expected to be fully-formed XML that will get serialized as-is.
- *
+ *
* <p>
* During parsing, this XML text will be re-serialized and set on the property.
- *
+ *
* <p>
* Only applicable for bean properties, not bean classes.
- *
+ *
* <p>
* Use of this format may cause data type loss during parsing if the type cannot be inferred through reflection.
*/
@@ -137,7 +137,7 @@ public enum XmlFormat {
/**
* Prevents collections and arrays from being enclosed in <xt><array></xt> elements.
- *
+ *
* <p>
* Can only be applied to properties (methods/fields) of type collection or array, or collection classes.
*/
@@ -145,13 +145,13 @@ public enum XmlFormat {
/**
* Identifies a void element.
- *
+ *
* <p>
* Only applicable for bean classes.
- *
+ *
* <p>
* Identifies an element that never contains content.
- *
+ *
* <p>
* The main difference in behavior is how non-void empty elements are handled in the HTML serializer.
* Void elements are serialized as collapsed nodes (e.g. <js>"<br/>"</js>) whereas non-void empty elements are
@@ -161,7 +161,7 @@ public enum XmlFormat {
/**
* Returns <jk>true</jk> if this format is one of those specified.
- *
+ *
* @param formats The formats to match against.
* @return <jk>true</jk> if this format is one of those specified.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
index 1f4f6d1..38d973d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
@@ -18,7 +18,7 @@ import java.lang.annotation.*;
/**
* Namespace name/URL mapping pair.
- *
+ *
* <p>
* Used to identify a namespace/URI pair on a {@link XmlSchema#xmlNs() @XmlSchema.xmlNs()} annotation.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
index b60b085..a8ec5eb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
@@ -28,7 +28,7 @@ public @interface XmlSchema {
/**
* Sets the default XML namespace URL for all classes in this and child packages.
- *
+ *
* <p>
* Must either be matched with a {@link #prefix()} annotation, or an {@link #xmlNs()} mapping with the same
* {@link XmlNs#namespaceURI() @XmlNs.namespaceURI()} value.
@@ -37,7 +37,7 @@ public @interface XmlSchema {
/**
* Sets the default XML prefix for all classes in this and child packages.
- *
+ *
* <p>
* Must either be matched with a {@link #namespace()} annotation, or an {@link #xmlNs()} mapping with the same
* {@link XmlNs#prefix} value.
@@ -46,14 +46,14 @@ public @interface XmlSchema {
/**
* Lists all namespace mappings to be used on all classes within this package.
- *
+ *
* <p>
* The purpose of this annotation is to allow namespace mappings to be defined in a single location and referred
* to by name through just the {@link Xml#prefix() @Xml.prefix()} annotation.
- *
+ *
* <p>
* Inherited by child packages.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p>
* Contents of <code>package-info.java</code>...
@@ -70,19 +70,19 @@ public @interface XmlSchema {
* <jk>package</jk> org.apache.juneau.examples.addressbook;
* <jk>import</jk> org.apache.juneau.xml.annotation.*;
* </p>
- *
+ *
* <p>
* Class in package using defined namespaces...
* <p class='bcode'>
* <jk>package</jk> corg.apache.juneau.examples.addressbook;
- *
+ *
* <jc>// Bean class, override "ab" namespace on package.</jc>
* <ja>@Xml</ja>(prefix=<js>"addr"</js>)
* <jk>public class</jk> Address {
- *
+ *
* <jc>// Bean property, use "addr" namespace on class.</jc>
* <jk>public int</jk> <jf>id</jf>;
- *
+ *
* <jc>// Bean property, override with "mail" namespace.</jc>
* <ja>@Xml</ja>(prefix=<js>"mail"</js>)
* <jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>;
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlClassMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlClassMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlClassMeta.java
index 6398cfb..a61625b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlClassMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlClassMeta.java
@@ -26,7 +26,7 @@ public class YamlClassMeta extends ClassMetaExtended {
/**
* Constructor.
- *
+ *
* @param cm The class that this annotation is defined on.
*/
public YamlClassMeta(ClassMeta<?> cm) {
@@ -36,7 +36,7 @@ public class YamlClassMeta extends ClassMetaExtended {
/**
* Returns the {@link Json @Json} annotation defined on the class.
- *
+ *
* @return The value of the annotation, or <jk>null</jk> if not specified.
*/
protected Json getAnnotation() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParser.java
index 42a8ce4..ede1366 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParser.java
@@ -17,16 +17,18 @@ import org.apache.juneau.parser.*;
/**
* Parses any valid JSON text into a POJO model.
- *
- * <h5 class='section'>Media types:</h5>
- *
- * Handles <code>Content-Type</code> types: <code>application/json, text/json</code>
- *
- * <h5 class='section'>Description:</h5>
- *
+ *
+ *
+ * <h5 class='topic'>Media types</h5>
+ *
+ * Handles <code>Content-Type</code> types: <code><b>application/json, text/json</b></code>
+ *
+ *
+ * <h5 class='topic'>Description</h5>
+ *
* This parser uses a state machine, which makes it very fast and efficient. It parses JSON in about 70% of the
* time that it takes the built-in Java DOM parsers to parse equivalent XML.
- *
+ *
* <p>
* This parser handles all valid JSON syntax.
* In addition, when strict mode is disable, the parser also handles the following:
@@ -40,10 +42,10 @@ import org.apache.juneau.parser.*;
* <li>
* Unquoted attributes.
* </ul>
- *
+ *
* <p>
* Also handles negative, decimal, hexadecimal, octal, and double numbers, including exponential notation.
- *
+ *
* <p>
* This parser handles the following input, and automatically returns the corresponding Java class.
* <ul class='spaced-list'>
@@ -68,7 +70,7 @@ import org.apache.juneau.parser.*;
* <li>
* Input consisting of only whitespace or JSON comments are converted to <jk>null</jk>.
* </ul>
- *
+ *
* <p>
* Input can be any of the following:
* <ul class='spaced-list'>
@@ -91,7 +93,7 @@ import org.apache.juneau.parser.*;
* <li>
* <js>"'xxx' + \"yyy\""</js> - Converted to a concatenated {@link String}.
* </ul>
- *
+ *
* <p>
* TIP: If you know you're parsing a JSON object or array, it can be easier to parse it using the
* {@link ObjectMap#ObjectMap(CharSequence) ObjectMap(CharSequence)} or {@link ObjectList#ObjectList(CharSequence)
@@ -120,7 +122,7 @@ public class YamlParser extends ReaderParser {
/**
* Constructor.
- *
+ *
* @param ps The property store containing all the settings for this object.
*/
public Strict(PropertyStore ps) {
@@ -135,7 +137,7 @@ public class YamlParser extends ReaderParser {
/**
* Constructor.
- *
+ *
* @param ps The property store containing all the settings for this object.
*/
public YamlParser(PropertyStore ps) {
@@ -144,7 +146,7 @@ public class YamlParser extends ReaderParser {
/**
* Constructor.
- *
+ *
* @param ps The property store containing all the settings for this object.
* @param consumes The list of media types that this parser consumes (e.g. <js>"application/json"</js>).
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserBuilder.java
index dcf12a0..19e27f0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserBuilder.java
@@ -32,7 +32,7 @@ public class YamlParserBuilder extends ParserBuilder {
/**
* Constructor.
- *
+ *
* @param ps The initial configuration settings for this builder.
*/
public YamlParserBuilder(PropertyStore ps) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserSession.java
index 188ce90..b494a41 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlParserSession.java
@@ -25,7 +25,7 @@ import org.apache.juneau.transform.*;
/**
* Session object that lives for the duration of a single use of {@link YamlParser}.
- *
+ *
* <p>
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused against multiple inputs.
@@ -37,7 +37,7 @@ public final class YamlParserSession extends ReaderParserSession {
/**
* 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.
@@ -50,12 +50,12 @@ public final class YamlParserSession extends ReaderParserSession {
/**
* Returns <jk>true</jk> if the specified character is whitespace.
- *
+ *
* <p>
* The definition of whitespace is different for strict vs lax mode.
* Strict mode only interprets 0x20 (space), 0x09 (tab), 0x0A (line feed) and 0x0D (carriage return) as whitespace.
* Lax mode uses {@link Character#isWhitespace(int)} to make the determination.
- *
+ *
* @param cp The codepoint.
* @return <jk>true</jk> if the specified character is whitespace.
*/
@@ -67,7 +67,7 @@ public final class YamlParserSession extends ReaderParserSession {
/**
* Returns <jk>true</jk> if the specified character is whitespace or '/'.
- *
+ *
* @param cp The codepoint.
* @return <jk>true</jk> if the specified character is whitespace or '/'.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
index 0715f07..c69c4f3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
@@ -20,15 +20,17 @@ import org.apache.juneau.serializer.*;
/**
* Serializes POJO models to JSON.
- *
- * <h5 class='section'>Media types:</h5>
- *
- * Handles <code>Accept</code> types: <code>application/json, text/json</code>
+ *
+ *
+ * <h5 class='topic'>Media types</h5>
+ *
+ * Handles <code>Accept</code> types: <code><b>application/json, text/json</b></code>
* <p>
- * Produces <code>Content-Type</code> types: <code>application/json</code>
- *
- * <h5 class='section'>Description:</h5>
- *
+ * Produces <code>Content-Type</code> types: <code><b>application/json</b></code>
+ *
+ *
+ * <h5 class='topic'>Description</h5>
+ *
* The conversion is as follows...
* <ul class='spaced-list'>
* <li>
@@ -49,30 +51,30 @@ import org.apache.juneau.serializer.*;
* <li>
* {@code beans} are converted to JSON objects.
* </ul>
- *
+ *
* <p>
* The types above are considered "JSON-primitive" object types.
* Any non-JSON-primitive object types are transformed into JSON-primitive object types through
* {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated through the
* {@link BeanContextBuilder#pojoSwaps(Class...)} method.
* Several default transforms are provided for transforming Dates, Enums, Iterators, etc...
- *
+ *
* <p>
* This serializer provides several serialization options.
* Typically, one of the predefined DEFAULT serializers will be sufficient.
* However, custom serializers can be constructed to fine-tune behavior.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Use one of the default serializers to serialize a POJO</jc>
* String json = JsonSerializer.<jsf>DEFAULT</jsf>.serialize(someObject);
- *
+ *
* <jc>// Create a custom serializer for lax syntax using single quote characters</jc>
* JsonSerializer serializer = JsonSerializer.<jsm>create</jsm>().simple().sq().build();
- *
+ *
* <jc>// Clone an existing serializer and modify it to use single-quotes</jc>
* JsonSerializer serializer = JsonSerializer.<jsf>DEFAULT</jsf>.builder().sq().build();
- *
+ *
* <jc>// Serialize a POJO to JSON</jc>
* String json = serializer.serialize(someObject);
* </p>
@@ -88,7 +90,7 @@ public class YamlSerializer extends WriterSerializer {
/**
* Configuration property: Add <js>"_type"</js> properties when needed.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.addBeanTypeProperties.b"</js>
@@ -100,12 +102,12 @@ public class YamlSerializer extends WriterSerializer {
* <li class='jm'>{@link JsonSerializerBuilder#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
* through reflection.
- *
+ *
* <p>
* When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
* provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
@@ -114,7 +116,7 @@ public class YamlSerializer extends WriterSerializer {
/**
* Configuration property: Prefix solidus <js>'/'</js> characters with escapes.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.escapeSolidus.b"</js>
@@ -127,7 +129,7 @@ public class YamlSerializer extends WriterSerializer {
* <li class='jm'>{@link JsonSerializerBuilder#escapeSolidus()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, solidus (e.g. slash) characters should be escaped.
@@ -159,7 +161,7 @@ public class YamlSerializer extends WriterSerializer {
/**
* Configuration property: Simple JSON mode.
- *
+ *
* <h5 class='section'>Property:</h5>
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.simpleMode.b"</js>
@@ -173,7 +175,7 @@ public class YamlSerializer extends WriterSerializer {
* <li class='jm'>{@link JsonSerializerBuilder#ssq()}
* </ul>
* </ul>
- *
+ *
* <h5 class='section'>Description:</h5>
* <p>
* If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
@@ -260,7 +262,7 @@ public class YamlSerializer extends WriterSerializer {
/**
* Constructor.
- *
+ *
* @param ps
* The property store containing all the settings for this object.
*/
@@ -270,7 +272,7 @@ public class YamlSerializer extends WriterSerializer {
/**
* Constructor.
- *
+ *
* @param ps
* The property store containing all the settings for this object.
* @param produces
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
index 7f27569..2ab79c0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
@@ -34,7 +34,7 @@ public class YamlSerializerBuilder extends SerializerBuilder {
/**
* Constructor.
- *
+ *
* @param ps The initial configuration settings for this builder.
*/
public YamlSerializerBuilder(PropertyStore ps) {
@@ -53,13 +53,13 @@ public class YamlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Prefix solidus <js>'/'</js> characters with escapes.
- *
+ *
* <p>
* If <jk>true</jk>, solidus (e.g. slash) characters should be escaped.
* The JSON specification allows for either format.
* However, if you're embedding JSON in an HTML script tag, this setting prevents confusion when trying to
* serialize <xt><\/script></xt>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link YamlSerializer#YAML_escapeSolidus}
@@ -74,11 +74,11 @@ public class YamlSerializerBuilder extends SerializerBuilder {
/**
* Configuration property: Simple JSON mode.
- *
+ *
* <p>
* If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
* Otherwise, they are always quoted.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link YamlSerializer#YAML_simpleMode}
@@ -93,7 +93,7 @@ public class YamlSerializerBuilder extends SerializerBuilder {
/**
* Shortcut for calling <code>setSimpleMode(<jk>true</jk>).sq()</code>.
- *
+ *
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='jf'>{@link YamlSerializer#YAML_simpleMode}
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
index 5a2dda1..f299a7a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
@@ -23,7 +23,7 @@ import org.apache.juneau.transform.*;
/**
* Session object that lives for the duration of a single use of {@link YamlSerializer}.
- *
+ *
* <p>
* This class is NOT thread safe.
* It is typically discarded after one-time use although it can be reused within the same thread.
@@ -35,7 +35,7 @@ public class YamlSerializerSession extends WriterSerializerSession {
/**
* 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.
@@ -220,7 +220,7 @@ public class YamlSerializerSession extends WriterSerializerSession {
/**
* Returns the {@link #YAML_addBeanTypeProperties} setting value for this session.
- *
+ *
* @return The {@link #YAML_addBeanTypeProperties} setting value for this session.
*/
@Override /* SerializerSession */
@@ -230,7 +230,7 @@ public class YamlSerializerSession extends WriterSerializerSession {
/**
* Converts the specified output target object to an {@link YamlWriter}.
- *
+ *
* @param out The output target object.
* @return The output target object wrapped in an {@link YamlWriter}.
* @throws Exception
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlWriter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlWriter.java
index f9345b0..2b657a2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlWriter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlWriter.java
@@ -20,8 +20,9 @@ import org.apache.juneau.serializer.*;
/**
* Specialized writer for serializing JSON.
- *
- * <h5 class='section'>Notes:</h5>
+ *
+ *
+ * <h5 class='topic'>Notes</h5>
* <ul>
* <li>This class is not intended for external use.
* </ul>
@@ -51,7 +52,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Constructor.
- *
+ *
* @param out The writer being wrapped.
* @param quoteChar The quote character to use (i.e. <js>'\''</js> or <js>'"'</js>)
* @param trimStrings If <jk>true</jk>, strings will be trimmed before being serialized.
@@ -64,7 +65,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Serializes the specified object as a JSON string value.
- *
+ *
* @param s The object being serialized.
* @return This object (for method chaining).
* @throws IOException Should never happen.
@@ -109,7 +110,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Serializes the specified object as a JSON attribute name.
- *
+ *
* @param s The object being serialized.
* @return This object (for method chaining).
* @throws IOException Should never happen.
@@ -157,7 +158,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Appends a URI to the output.
- *
+ *
* @param uri The URI to append to the output.
* @return This object (for method chaining).
* @throws IOException
@@ -184,7 +185,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Performs an indentation only if we're currently past max indentation.
- *
+ *
* @param depth The current indentation depth.
* @return This object (for method chaining).
* @throws IOException
@@ -227,7 +228,7 @@ public final class YamlWriter extends SerializerWriter {
/**
* Adds a space only if the current indentation level is below maxIndent.
- *
+ *
* @param indent
* @return This object (for method chaining).
* @throws IOException
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/annotation/Yaml.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/annotation/Yaml.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/annotation/Yaml.java
index 08e2e50..d3d3c9f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/annotation/Yaml.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/annotation/Yaml.java
@@ -19,10 +19,10 @@ import java.lang.annotation.*;
/**
* Annotation for specifying various YAML options for the YAML serializers and parsers.
- *
+ *
* <p>
* Can be applied to Java types.
- *
+ *
* <p>
* Can be used for the following:
* <ul class='spaced-list'>
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/DefaultingVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/DefaultingVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/DefaultingVar.java
index 2497f03..3b3d2a6 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/DefaultingVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/DefaultingVar.java
@@ -16,21 +16,21 @@ import static org.apache.juneau.internal.StringUtils.*;
/**
* Interface for the resolution of vars with a default value if the <code>resolve()</code> method returns <jk>null</jk>.
- *
+ *
* <p>
* For example, to resolve the system property <js>"myProperty"</js> but resolve to <js>"not found"</js> if the
* property doesn't exist: <js>"$S{myProperty,not found}"</js>
- *
+ *
* <p>
* Subclasses must implement the {@link #resolve(VarResolverSession, String)} method.
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class DefaultingVar extends SimpleVar {
/**
* Constructor.
- *
+ *
* @param name The name of this variable.
*/
public DefaultingVar(String name) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MapVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MapVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MapVar.java
index e13eeb6..41e5bc7 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MapVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MapVar.java
@@ -20,7 +20,7 @@ import org.apache.juneau.internal.*;
/**
* A subclass of {@link DefaultingVar} that simply pulls values from a {@link Map}.
- *
+ *
* @see org.apache.juneau.svl
*/
@SuppressWarnings("rawtypes")
@@ -30,7 +30,7 @@ public abstract class MapVar extends DefaultingVar {
/**
* Constructor.
- *
+ *
* @param name The name of this variable.
* @param m The map to pull values from.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartResolvingVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartResolvingVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartResolvingVar.java
index b4c8d9b..9ba8acf 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartResolvingVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartResolvingVar.java
@@ -16,21 +16,21 @@ import static org.apache.juneau.internal.StringUtils.*;
/**
* Interface for the resolution of vars that can have one or more keys where the first non-null resolution is returned.
- *
+ *
* <p>
* For example, to resolve the system property <js>"myProperty"</js> but then resolve <js>"myProperty2"</js> if the
* property doesn't exist: <js>"$S{myProperty1,myProperty2}"</js>
- *
+ *
* <p>
* Subclasses must implement the {@link #resolve(VarResolverSession, String)} method.
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class MultipartResolvingVar extends SimpleVar {
/**
* Constructor.
- *
+ *
* @param name The name of this variable.
*/
public MultipartResolvingVar(String name) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartVar.java
index 9c3f2d1..7fe18c0 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/MultipartVar.java
@@ -16,17 +16,17 @@ import static org.apache.juneau.internal.StringUtils.*;
/**
* Interface for the resolution of vars that consist of a comma-delimited list.
- *
+ *
* <p>
* (e.g. <js>"$X{foo, bar, baz}"</js>)
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class MultipartVar extends SimpleVar {
/**
* Constructor.
- *
+ *
* @param name The name of this variable.
*/
public MultipartVar(String name) {
@@ -35,7 +35,7 @@ public abstract class MultipartVar extends SimpleVar {
/**
* The interface that needs to be implemented for this interface.
- *
+ *
* @param session The session object used for a single instance of a string resolution.
* @param args The arguments inside the variable.
* @return The resolved variable.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/ResolvingObjectMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/ResolvingObjectMap.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/ResolvingObjectMap.java
index a31ae91..75d2506 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/ResolvingObjectMap.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/ResolvingObjectMap.java
@@ -16,7 +16,7 @@ import org.apache.juneau.*;
/**
* Subclass of an {@link ObjectMap} that automatically resolves any SVL variables in values.
- *
+ *
* <p>
* Resolves variables in the following values:
* <ul>
@@ -25,7 +25,7 @@ import org.apache.juneau.*;
* <li>Collections containing values of type {@link CharSequence}.
* <li>Maps containing values of type {@link CharSequence}.
* </ul>
- *
+ *
* <p>
* All other data types are left as-is.
*/
@@ -36,7 +36,7 @@ public class ResolvingObjectMap extends ObjectMap {
/**
* Constructor.
- *
+ *
* @param varResolver The var resolver session to use for resolving SVL variables.
*/
public ResolvingObjectMap(VarResolverSession varResolver) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/SimpleVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/SimpleVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/SimpleVar.java
index ad74aa7..fcf2ff0 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/SimpleVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/SimpleVar.java
@@ -16,22 +16,22 @@ import java.io.*;
/**
* Abstract superclass of all Simple Var Language variables that resolve to simple returned string values.
- *
+ *
* <p>
* Note the difference between this class and {@link StreamedVar} that streams values to writers.
* Unlike the {@link StreamedVar} class, the returned value from this class can contain nested variables that will be
* recursively resolved by {@link VarResolver}.
- *
+ *
* <p>
* Subclasses must implement the {@link #resolve(VarResolverSession, String)} method.
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class SimpleVar extends Var {
/**
* Constructor.
- *
+ *
* @param name The variable name (e.g. <js>"C"</js> for variables of the form <js>"$C{...}"</js>)
*/
protected SimpleVar(String name) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/StreamedVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/StreamedVar.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/StreamedVar.java
index d94b93e..4819cf8 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/StreamedVar.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/StreamedVar.java
@@ -14,23 +14,23 @@ package org.apache.juneau.svl;
/**
* Abstract superclass of all Simple Var Language variables that write their values directly to a writer.
- *
+ *
* <p>
* Note the difference between this class and {@link SimpleVar} that returns simple string values.
* Unlike the {@link SimpleVar} class, the output from this class cannot contain nested variables.
* However, this class can be more efficient for variables that produce large amounts of output so that the creation
* of large in-memory strings is avoided.
- *
+ *
* <p>
* Subclasses must implement the {@link #resolveTo(VarResolverSession, java.io.Writer, String)} method.
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class StreamedVar extends Var {
/**
* Constructor.
- *
+ *
* @param name The variable name (e.g. <js>"C"</js> for variables of the form <js>"$C{...}"</js>)
*/
public StreamedVar(String name) {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/Var.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/Var.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/Var.java
index 4b47d22..bca200d 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/Var.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/Var.java
@@ -18,30 +18,30 @@ import java.io.*;
/**
* Abstract superclass of all Simple Var Language variables.
- *
+ *
* <p>
* Vars are used to convert simple variables of the form <js>"$varName{varKey}"</js> into something else by the
* {@link VarResolver} class.
- *
+ *
* <p>
* Subclasses must implement one of the following two methods:
* <ul>
* <li>{@link #resolve(VarResolverSession,String)} - For simple vars.
* <li>{@link #resolveTo(VarResolverSession,Writer,String)} - For streamed vars.
* </ul>
- *
+ *
* <p>
* Subclasses MUST implement a no-arg constructor so that class names can be passed to the
* {@link VarResolverBuilder#vars(Class...)} method.
* They must also be thread safe!
- *
+ *
* <p>
* Two direct abstract subclasses are provided to differentiated between simple and streamed vars:
* <ul>
* <li>{@link SimpleVar}
* <li>{@link StreamedVar}
* </ul>
- *
+ *
* @see org.apache.juneau.svl
*/
public abstract class Var {
@@ -51,7 +51,7 @@ public abstract class Var {
/**
* Constructor.
- *
+ *
* @param name The name of this variable.
* @param streamed
* Whether this variable is 'streamed', meaning the {@link #resolveTo(VarResolverSession, Writer, String)} method
@@ -74,11 +74,11 @@ public abstract class Var {
/**
* Return the name of this variable.
- *
+ *
* <p>
* For example, the system property variable returns <js>"S"</js> since the format of the variable is
* <js>"$S{system.property}"</js>.
- *
+ *
* @return The name of this variable.
*/
protected String getName() {
@@ -126,11 +126,11 @@ public abstract class Var {
/**
* The method called from {@link VarResolver}.
- *
+ *
* <p>
* Can be overridden to intercept the request and do special handling.
* Default implementation simply calls resolve(String).
- *
+ *
* @param session The session object used for a single instance of a string resolution.
* @param arg The inside argument of the variable.
* @return The resolved value.
@@ -142,7 +142,7 @@ public abstract class Var {
/**
* The interface that needs to be implemented for subclasses of {@link SimpleVar}.
- *
+ *
* @param session The session object used for a single instance of a var resolution.
* @param arg The inside argument of the variable.
* @return The resolved value.
@@ -152,7 +152,7 @@ public abstract class Var {
/**
* The interface that needs to be implemented for subclasses of {@link StreamedVar}.
- *
+ *
* @param session The session object used for a single instance of a var resolution.
* @param w The writer to send the resolved value to.
* @param arg The inside argument of the variable.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolver.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolver.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolver.java
index 28053ac..38bb335 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolver.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolver.java
@@ -20,58 +20,58 @@ import org.apache.juneau.svl.vars.*;
/**
* Utility class for resolving variables of the form <js>"$X{key}"</js> in strings.
- *
+ *
* <p>
* Variables are of the form <code>$X{key}</code>, where <code>X</code> can consist of zero or more ASCII characters.
* <br>The variable key can contain anything, even nested variables that get recursively resolved.
- *
+ *
* <p>
* Variables are defined through the {@link VarResolverBuilder#vars(Class[])} method.
- *
+ *
* <p>
* The {@link Var} interface defines how variables are converted to values.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jk>public class</jk> SystemPropertiesVar <jk>extends</jk> SimpleVar {
- *
+ *
* <jc>// Must have a no-arg constructor!</jc>
* <jk>public</jk> SystemPropertiesVar() {
* <jk>super</jk>(<js>"S"</js>);
* }
- *
+ *
* <ja>@Override</ja>
* <jk>public</jk> String resolve(VarResolverSession session, String varVal) {
* <jk>return</jk> System.<jsm>getProperty</jsm>(varVal);
* }
* }
- *
+ *
* <jc>// Create a variable resolver that resolves system properties (e.g. "$S{java.home}")</jc>
* VarResolver r = <jk>new</jk> VarResolver().addVars(SystemPropertiesVar.<js>class</js>);
- *
+ *
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"java.home is set to $S{java.home}"</js>));
* </p>
- *
+ *
* <h6 class='topic'>Context objects</h6>
- *
+ *
* Var resolvers can have zero or more context objects associated with them.
- *
+ *
* <p>
* Context objects are arbitrary objects associated with this var resolver, such as a <code>ConfigFile</code> object.
* They can be any class type.
- *
+ *
* <p>
* Context objects can be retrieved by {@link Var} classes through the
* {@link VarResolverSession#getSessionObject(Class, String)} method.
- *
+ *
* <h6 class='topic'>Session objects</h6>
- *
+ *
* Session objects are considered more ephemeral than context objects.
* While a context object is unlikely to ever change, a session object may change on every use of the var resolver.
* For example, the server API defines various <code>Var</code> objects that use the <code>RestRequest</code>
* object as a session object for the duration of a single HTTP request.
- *
+ *
* <p>
* Session objects are used by calling the {@link #createSession()} or {@link #createSession(Map)} methods to create
* an instance of a {@link VarResolverSession} object that contains {@link VarResolverSession#resolve(String)}
@@ -79,37 +79,38 @@ import org.apache.juneau.svl.vars.*;
* {@link VarResolver#resolve(String)} and {@link VarResolver#resolveTo(String, Writer)} except that the
* <code>Var</code> objects have access to the session objects through the
* {@link VarResolverSession#getSessionObject(Class, String)} method.
- *
+ *
* <p>
* Session objects are specified through either the {@link #createSession(Map)} method or the
* {@link VarResolverSession#sessionObject(String, Object)} methods.
- *
- * <h6 class='topic'>Cloning</h6>
- *
+ *
+ *
+ * <h5 class='topic'>Cloning</h5>
+ *
* Var resolvers can be cloned by using the {@link #builder()} method.
* Cloning a resolver will copy it's {@link Var} class names and context objects.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Create a resolver that copies the default resolver and adds $C and $ARG vars.</jc>
* VarResolver myVarResolver = VarResolver.<jsf>DEFAULT</jsf>.builder().vars(ConfigVar.<jk>class</jk>,
* ArgsVar.<jk>class</jk>).build();
* </p>
- *
+ *
* @see org.apache.juneau.svl
*/
public class VarResolver {
/**
* Default string variable resolver with support for system properties and environment variables:
- *
+ *
* <ul>
* <li><code>$S{key}</code>,<code>$S{key,default}</code> - System properties.
* <li><code>$E{key}</code>,<code>$E{key,default}</code> - Environment variables.
* <li><code>$IF{booleanValue,thenValue[,elseValue]}</code> - If-else patterns.
* <li><code>$SW{test,matchPattern,thenValue[,matchPattern,thenValue][,elseValue]}</code> - Switch patterns.
* </ul>
- *
+ *
* @see SystemPropertiesVar
* @see EnvVariablesVar
*/
@@ -119,7 +120,7 @@ public class VarResolver {
/**
* Constructor.
- *
+ *
* @param vars The var classes
* @param contextObjects
*/
@@ -129,7 +130,7 @@ public class VarResolver {
/**
* Returns a new builder object using the settings in this resolver as a base.
- *
+ *
* @return A new var resolver builder.
*/
public VarResolverBuilder builder() {
@@ -140,7 +141,7 @@ public class VarResolver {
/**
* Returns the read-only properties on this variable resolver.
- *
+ *
* @return The read-only properties on this variable resolver.
*/
public VarResolverContext getContext() {
@@ -149,11 +150,11 @@ public class VarResolver {
/**
* Creates a new resolver session with no session objects.
- *
+ *
* <p>
* Session objects can be associated with the specified session using the {@link VarResolverSession#sessionObject(String, Object)}
* method.
- *
+ *
* @return A new resolver session.
*/
public VarResolverSession createSession() {
@@ -162,7 +163,7 @@ public class VarResolver {
/**
* Same as {@link #createSession()} except allows you to specify session objects as a map.
- *
+ *
* @param sessionObjects The session objects to associate with the session.
* @return A new resolver session.
*/
@@ -172,12 +173,12 @@ public class VarResolver {
/**
* Resolve variables in the specified string.
- *
+ *
* <p>
* This is a shortcut for calling <code>createSession(<jk>null</jk>).resolve(s);</code>.
* This method can only be used if the string doesn't contain variables that rely on the existence of session
* variables.
- *
+ *
* @param s The input string.
* @return The string with variables resolved, or the same string if it doesn't contain any variables to resolve.
*/
@@ -187,12 +188,12 @@ public class VarResolver {
/**
* Resolve variables in the specified string and sends the results to the specified writer.
- *
+ *
* <p>
* This is a shortcut for calling <code>createSession(<jk>null</jk>).resolveTo(s, w);</code>.
* This method can only be used if the string doesn't contain variables that rely on the existence of session
* variables.
- *
+ *
* @param s The input string.
* @param w The writer to send the result to.
* @throws IOException
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
index 5ceef57..58d02b1 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
@@ -28,7 +28,7 @@ public class VarResolverBuilder {
/**
* Create a new var resolver using the settings in this builder.
- *
+ *
* @return A new var resolver.
*/
public VarResolver build() {
@@ -37,7 +37,7 @@ public class VarResolverBuilder {
/**
* Register new variables with this resolver.
- *
+ *
* @param vars
* The variable resolver classes.
* These classes must subclass from {@link Var} and have no-arg constructors.
@@ -54,7 +54,7 @@ public class VarResolverBuilder {
/**
* Adds the default variables to this builder.
- *
+ *
* <p>
* The default variables are:
* <ul>
@@ -63,7 +63,7 @@ public class VarResolverBuilder {
* <li>{@link SwitchVar}
* <li>{@link IfVar}
* </ul>
- *
+ *
* @return This object (for method chaining).
*/
public VarResolverBuilder defaultVars() {
@@ -72,11 +72,11 @@ public class VarResolverBuilder {
/**
* Associates a context object with this resolver.
- *
+ *
* <p>
* A context object is essentially some environmental object that doesn't change but is used by vars to customize
* output.
- *
+ *
* @param name The name of the context object.
* @param object The context object.
* @return This object (for method chaining).
@@ -88,11 +88,11 @@ public class VarResolverBuilder {
/**
* Associates multiple context objects with this resolver.
- *
+ *
* <p>
* A context object is essentially some environmental object that doesn't change but is used by vars to customize
* output.
- *
+ *
* @param map A map of context objects keyed by their name.
* @return This object (for method chaining).
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverContext.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverContext.java
index f0eecf6..5283de8 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverContext.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverContext.java
@@ -19,10 +19,10 @@ import java.util.concurrent.*;
/**
* Configurable properties on the {@link VarResolver} class.
- *
+ *
* <p>
* Used to associate {@link Var Vars} and context objects with {@link VarResolver VarResolvers}.
- *
+ *
* @see org.apache.juneau.svl
*/
public class VarResolverContext {
@@ -33,7 +33,7 @@ public class VarResolverContext {
/**
* Constructor.
- *
+ *
* @param vars The Var classes used for resolving string variables.
* @param contextObjects Read-only context objects.
*/
@@ -55,7 +55,7 @@ public class VarResolverContext {
/**
* Returns an unmodifiable map of {@link Var Vars} associated with this context.
- *
+ *
* @return A map whose keys are var names (e.g. <js>"S"</js>) and values are {@link Var} instances.
*/
protected Map<String,Var> getVarMap() {
@@ -64,7 +64,7 @@ public class VarResolverContext {
/**
* Returns an array of variables define in this variable resolver context.
- *
+ *
* @return A new array containing the variables in this context.
*/
protected Class<?>[] getVars() {
@@ -73,7 +73,7 @@ public class VarResolverContext {
/**
* Returns the context object with the specified name.
- *
+ *
* @param name The name of the context object.
* @return The context object, or <jk>null</jk> if no context object is specified with that name.
*/
@@ -83,7 +83,7 @@ public class VarResolverContext {
/**
* Returns the context map of this variable resolver context.
- *
+ *
* @return An unmodifiable map of the context objects of this variable resolver context.
*/
protected Map<String,Object> getContextObjects() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverSession.java b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverSession.java
index bbc6ffc..4009b56 100644
--- a/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverSession.java
+++ b/juneau-core/juneau-svl/src/main/java/org/apache/juneau/svl/VarResolverSession.java
@@ -22,20 +22,20 @@ import org.apache.juneau.*;
/**
* A var resolver session that combines a {@link VarResolver} with one or more session objects.
- *
+ *
* <p>
* Instances of this class are considered light-weight and fast to construct, use, and discard.
- *
+ *
* <p>
* This class contains the workhorse code for var resolution.
- *
+ *
* <p>
* Instances of this class are created through the {@link VarResolver#createSession()} and
* {@link VarResolver#createSession(Map)} methods.
- *
+ *
* <p>
* Instances of this class are NOT guaranteed to be thread safe.
- *
+ *
* @see org.apache.juneau.svl
*/
public class VarResolverSession {
@@ -45,12 +45,12 @@ public class VarResolverSession {
/**
* Constructor.
- *
+ *
* @param context
* The {@link VarResolver} context object that contains the {@link Var Vars} and context objects associated with
* that resolver.
* @param sessionObjects The session objects.
- *
+ *
*/
public VarResolverSession(VarResolverContext context, Map<String,Object> sessionObjects) {
this.context = context;
@@ -59,7 +59,7 @@ public class VarResolverSession {
/**
* Adds a session object to this session.
- *
+ *
* @param name The name of the session object.
* @param o The session object.
* @return This method (for method chaining).
@@ -71,7 +71,7 @@ public class VarResolverSession {
/**
* Resolve all variables in the specified string.
- *
+ *
* @param s
* The string to resolve variables in.
* @return
@@ -119,7 +119,7 @@ public class VarResolverSession {
/**
* Convenience method for resolving variables in arbitrary objects.
- *
+ *
* <p>
* Supports resolving variables in the following object types:
* <ul>
@@ -130,7 +130,7 @@ public class VarResolverSession {
* <li>Maps containing values of type {@link CharSequence}.
* <br>Map class must have a no-arg constructor.
* </ul>
- *
+ *
* @param o The object.
* @return The same object if no resolution was needed, otherwise a new object or data structure if resolution was
* needed.
@@ -243,11 +243,11 @@ public class VarResolverSession {
/**
* Resolves variables in the specified string and sends the output to the specified writer.
- *
+ *
* <p>
* More efficient than first parsing to a string and then serializing to the writer since this method doesn't need
* to construct a large string.
- *
+ *
* @param s The string to resolve variables in.
* @param out The writer to write to.
* @return The same writer.
@@ -364,10 +364,10 @@ public class VarResolverSession {
/**
* Returns the session object with the specified name.
- *
+ *
* <p>
* Casts it to the specified class type for you.
- *
+ *
* @param c The class type to cast to.
* @param name The name of the session object.
* @return The session object. Never <jk>null</jk>.
@@ -394,7 +394,7 @@ public class VarResolverSession {
/**
* Returns the {@link Var} with the specified name.
- *
+ *
* @param name The var name (e.g. <js>"S"</js>).
* @return The {@link Var} instance, or <jk>null</jk> if no <code>Var</code> is associated with the specified name.
*/