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/26 00:41:19 UTC
[04/23] incubator-juneau git commit: Clean up javadocs.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 e7d1e4c..f2397b7 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
@@ -23,8 +23,8 @@ import org.apache.juneau.json.*;
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.
+ * 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'>
@@ -35,12 +35,16 @@ import org.apache.juneau.parser.*;
* <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 #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.
* <p>
- * Leading slashes in URLs are ignored. So <js>"/xxx/yyy/zzz"</js> and <js>"xxx/yyy/zzz"</js> are considered identical.
+ * Leading slashes in URLs are ignored.
+ * So <js>"/xxx/yyy/zzz"</js> and <js>"xxx/yyy/zzz"</js> are considered identical.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -102,8 +106,9 @@ import org.apache.juneau.parser.*;
* );
* johnSmith.put(<js>"additionalInfo/medicalInfo"</js>, medicalInfo);
* <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>
+ * 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.
*
* <h5 class='section'>Example:</h5>
@@ -155,7 +160,7 @@ public final class PojoRest {
}
/**
- * Call this method to prevent the root object from being overwritten on put("", xxx); calls.
+ * Call this method to prevent the root object from being overwritten on <code>put("", xxx);</code> calls.
*
* @return This object (for method chaining).
*/
@@ -223,7 +228,6 @@ public final class PojoRest {
* If null or blank, returns the root.
* @param def The default value if addressed item does not exist.
* @param <T> The specified object type.
- *
* @return The addressed element, or null if that element does not exist in the tree.
*/
public <T> T get(Class<T> type, String url, T def) {
@@ -461,30 +465,33 @@ public final class PojoRest {
* </ul>
* <p>
* As a rule, use the simplest format needed to uniquely resolve a method.
- * @param args The arguments to pass as parameters to the method.<br>
- * These will automatically be converted to the appropriate object type if possible.<br>
+ * @param args The arguments to pass as parameters to the method.
+ * These will automatically be converted to the appropriate object type if possible.
* This must be an array, like a JSON array.
* @return The returned object from the method call.
- * @throws IllegalAccessException If the <code>Constructor</code> object enforces Java language access control and the underlying constructor is inaccessible.
+ * @throws IllegalAccessException If the <code>Constructor</code> object enforces Java language access control and
+ * 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.
- * </ul>
+ * <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.
+ * </ul>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
* @throws NoSuchMethodException
* @throws IOException
*/
- public Object invokeMethod(String url, String method, String args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, ParseException, NoSuchMethodException, IOException {
+ public Object invokeMethod(String url, String method, String args) throws InvocationTargetException,
+ IllegalArgumentException, IllegalAccessException, ParseException, NoSuchMethodException, IOException {
return new PojoIntrospector(get(url), parser).invokeMethod(method, args);
}
/**
- * Returns the list of available methods that can be passed to the {@link #invokeMethod(String, String, String)} for the object
- * addressed by the specified URL.
+ * Returns the list of available methods that can be passed to the {@link #invokeMethod(String, String, String)}
+ * for the object addressed by the specified URL.
*
* @param url The URL.
* @return The list of methods.
@@ -543,7 +550,7 @@ public final class PojoRest {
* </ul>
*
* @param url The URL of the element being added to.
- * <br>If <jk>null</jk> or blank, the root itself (assuming it's one of the types specified above) is added to.
+ * If <jk>null</jk> or blank, the root itself (assuming it's one of the types specified above) is added to.
* @param val The value being added.
* @return The URL of the element that was added.
*/
@@ -554,7 +561,7 @@ public final class PojoRest {
/**
* Remove an element from a POJO model.
* <p>
- * qIf the element does not exist, no action is taken.
+ * If the element does not exist, no action is taken.
*
* @param url The URL of the element being deleted.
* If <jk>null</jk> or blank, the root itself is deleted.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 318ec02..8e7569b 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,9 +24,12 @@ 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} - Attempting to do something impossible.
- * <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} - Attempting to overwrite the root object.
+ * <li>{@link HttpURLConnection#HTTP_BAD_REQUEST HTTP_BAD_REQUEST}
+ * - Attempting to do something impossible.
+ * <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}
+ * - Attempting to overwrite the root object.
* </ul>
*/
public final class PojoRestException extends FormattedRuntimeException {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/utils/ProcBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ProcBuilder.java b/juneau-core/src/main/java/org/apache/juneau/utils/ProcBuilder.java
index d44831f..6cdf495 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ProcBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ProcBuilder.java
@@ -72,11 +72,11 @@ public class ProcBuilder {
/**
* Command arguments if the specified matcher matches.
- * Can be used for specifying os-specific commands.
+ * Can be used for specifying OS-specific commands.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
- * ProcessBuilder pb = ProcessBuilder
+ * ProcBuilder pb = ProcBuilder
* .create()
* .commandIf(<jsf>WINDOWS</jsf>, <js>"cmd /c dir"</js>)
* .commandIf(<jsf>UNIX</jsf>, <js>"bash -c ls"</js>)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 b44297a..e8371da 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
@@ -40,6 +40,7 @@ public class SearchArgs {
/**
* Creates a new builder for {@link SearchArgs}
+ *
* @return A new builder for {@link SearchArgs}
*/
public static Builder builder() {
@@ -72,7 +73,7 @@ public class SearchArgs {
* Whitespace is trimmed from column names and search tokens.
*
* @param searchTerms The search terms string.
- * Can be <jk>null</jk>.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder search(String searchTerms) {
@@ -117,7 +118,7 @@ public class SearchArgs {
* Empty view columns imply view all columns.
*
* @param columns The columns being viewed.
- * Can be <jk>null</jk>.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder view(String columns) {
@@ -157,7 +158,7 @@ public class SearchArgs {
* Whitespace is trimmed from column names.
*
* @param sortArgs The columns to sort by.
- * Can be <jk>null</jk>.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder sort(String sortArgs) {
@@ -175,7 +176,7 @@ public class SearchArgs {
* Note that the order of the sort is important.
*
* @param sortArgs The columns to sort by.
- * Can be <jk>null</jk>.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder sort(Collection<String> sortArgs) {
@@ -205,7 +206,7 @@ public class SearchArgs {
* Specifies the number of rows to return.
*
* @param limit The number of rows to return.
- * If <code><=0</code>, all rows should be returned.
+ * If <code><=0</code>, all rows should be returned.
* @return This object (for method chaining).
*/
public Builder limit(int limit) {
@@ -279,7 +280,7 @@ public class SearchArgs {
* The first-row position.
*
* @return The zero-indexed row number of the first row to display.
- * Default is <code>0</code>
+ * Default is <code>0</code>
*/
public int getPosition() {
return position;
@@ -289,7 +290,7 @@ public class SearchArgs {
* The number of rows to return.
*
* @return The number of rows to return in the result.
- * Default is <code>0</code> which means return all rows.
+ * Default is <code>0</code> which means return all rows.
*/
public int getLimit() {
return limit;
@@ -301,7 +302,7 @@ public class SearchArgs {
* Used in conjunction with {@link #getSearch()} to specify whether case-insensitive searches should be performed.
*
* @return The number of rows to return in the result.
- * Default is <jk>false</jk>.
+ * Default is <jk>false</jk>.
*/
public boolean isIgnoreCase() {
return ignoreCase;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/utils/StringObject.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/StringObject.java b/juneau-core/src/main/java/org/apache/juneau/utils/StringObject.java
index 169d20e..7198b26 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/StringObject.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/StringObject.java
@@ -40,6 +40,7 @@ public class StringObject implements CharSequence, Writable {
/**
* Constructor.
+ *
* @param s The serializer to use to serialize the object.
* @param o The object to be serialized.
*/
@@ -50,6 +51,7 @@ public class StringObject implements CharSequence, Writable {
/**
* Constructor with default serializer {@link JsonSerializer#DEFAULT_LAX}
+ *
* @param o The object to be serialized.
*/
public StringObject(Object o) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/utils/ZipFileList.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ZipFileList.java b/juneau-core/src/main/java/org/apache/juneau/utils/ZipFileList.java
index 17bcd6c..9d6d6f9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ZipFileList.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ZipFileList.java
@@ -17,12 +17,11 @@ import java.util.*;
import java.util.zip.*;
/**
- * Utility class for representing the contents of a zip file as a list of entries
- * whose contents don't resolve until serialize time.
+ * Utility class for representing the contents of a zip file as a list of entries whose contents don't resolve until
+ * serialization time.
* <p>
- * Generally associated with <code>RestServlets</code> using the <code>responseHandlers</code>
- * annotation so that REST methods can easily create ZIP file responses by simply returning instances
- * of this class.
+ * Generally associated with <code>RestServlets</code> using the <code>responseHandlers</code> annotation so that
+ * REST methods can easily create ZIP file responses by simply returning instances of this class.
*/
@SuppressWarnings("serial")
public class ZipFileList extends LinkedList<ZipFileList.ZipFileEntry> {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/Namespace.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/Namespace.java b/juneau-core/src/main/java/org/apache/juneau/xml/Namespace.java
index d8f4a76..dc775e6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/Namespace.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/Namespace.java
@@ -17,8 +17,8 @@ import org.apache.juneau.annotation.*;
/**
* Represents a simple namespace mapping between a simple name and URI.
* <p>
- * In general, the simple name will be used as the XML prefix mapping unless
- * there are conflicts or prefix remappings in the serializer.
+ * In general, the simple name will be used as the XML prefix mapping unless there are conflicts or prefix
+ * re-mappings in the serializer.
*/
@Bean(sort=true)
public final class Namespace implements Comparable<Namespace> {
@@ -67,8 +67,8 @@ public final class Namespace implements Comparable<Namespace> {
}
/**
- * For performance reasons, equality is always based on identity, since
- * the {@link NamespaceFactory} class ensures no duplicate name+uri pairs.
+ * For performance reasons, equality is always based on identity, since the {@link NamespaceFactory} class ensures
+ * no duplicate name+uri pairs.
*/
@Override /* Object */
public boolean equals(Object o) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 52fe1ea..31f9cc7 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
@@ -24,7 +24,7 @@ import org.apache.juneau.parser.*;
* <p>
* For performance reasons, {@link Namespace} objects are stored in {@link IdentityList IdentityLists}.
* For this to work property, namespaces with the same name and URI must only be represented by a single
- * {@link Namespace} instance.
+ * {@link Namespace} instance.
* This factory class ensures this identity uniqueness.
*/
public final class NamespaceFactory {
@@ -32,8 +32,8 @@ public final class NamespaceFactory {
private static ConcurrentHashMap<String,Namespace> cache = new ConcurrentHashMap<String,Namespace>();
/**
- * Get the {@link Namespace} with the specified name and URI, and create a new one
- * if this is the first time it's been encountered.
+ * Get the {@link Namespace} with the specified name and URI, and create a new one if this is the first time it's
+ * been encountered.
*
* @param name The namespace name. See {@link Namespace#getName()}.
* @param uri The namespace URI. See {@link Namespace#getUri()}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
index ed7ebb8..ad489fa 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanMeta.java
@@ -20,7 +20,8 @@ import org.apache.juneau.*;
import org.apache.juneau.xml.annotation.*;
/**
- * Metadata on beans specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation on the class.
+ * Metadata on beans specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation on the
+ * class.
*/
public class XmlBeanMeta extends BeanMetaExtended {
@@ -250,7 +251,8 @@ public class XmlBeanMeta extends BeanMetaExtended {
/**
* Returns bean property meta with the specified name.
* This is identical to calling {@link BeanMeta#getPropertyMeta(String)} except it first retrieves
- * the bean property meta based on the child name (e.g. a property whose name is "people", but whose child name is "person").
+ * the bean property meta based on the child name (e.g. a property whose name is "people", but whose child name is
+ * "person").
*
* @param fieldName The bean property name.
* @return The property metadata.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanPropertyMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanPropertyMeta.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanPropertyMeta.java
index 5e869cf..ad34afb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanPropertyMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlBeanPropertyMeta.java
@@ -18,7 +18,8 @@ import org.apache.juneau.*;
import org.apache.juneau.xml.annotation.*;
/**
- * Metadata on bean properties specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation on the bean property.
+ * Metadata on bean properties specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation
+ * on the bean property.
*/
public class XmlBeanPropertyMeta extends BeanPropertyMetaExtended {
@@ -61,8 +62,7 @@ public class XmlBeanPropertyMeta extends BeanPropertyMetaExtended {
* <li>{@link Xml#prefix()} annotation defined on bean interface packages.
* </ol>
*
- * @return The namespace associated with this bean property, or <jk>null</jk> if no namespace is
- * associated with it.
+ * @return The namespace associated with this bean property, or <jk>null</jk> if no namespace is associated with it.
*/
public Namespace getNamespace() {
return namespace;
@@ -105,7 +105,8 @@ public class XmlBeanPropertyMeta extends BeanPropertyMetaExtended {
String cen = xml.childName();
if ((! cen.isEmpty()) && (! isCollection))
- throw new BeanRuntimeException(cmProperty.getInnerClass(), "Annotation error on property ''{0}''. @Xml.childName can only be specified on collections and arrays.", name);
+ throw new BeanRuntimeException(cmProperty.getInnerClass(),
+ "Annotation error on property ''{0}''. @Xml.childName can only be specified on collections and arrays.", name);
if (xmlFormat == XmlFormat.COLLAPSED) {
if (isCollection) {
@@ -116,7 +117,8 @@ public class XmlBeanPropertyMeta extends BeanPropertyMetaExtended {
if (cen == null || cen.isEmpty())
cen = name;
} else {
- throw new BeanRuntimeException(cmBean.getInnerClass(), "Annotation error on property ''{0}''. @Xml.format=COLLAPSED can only be specified on collections and arrays.", name);
+ throw new BeanRuntimeException(cmBean.getInnerClass(),
+ "Annotation error on property ''{0}''. @Xml.format=COLLAPSED can only be specified on collections and arrays.", name);
}
if (cen.isEmpty() && isCollection)
cen = cmProperty.getDictionaryName();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlClassMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlClassMeta.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlClassMeta.java
index 8624c43..395bc80 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlClassMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlClassMeta.java
@@ -23,7 +23,8 @@ import org.apache.juneau.internal.*;
import org.apache.juneau.xml.annotation.*;
/**
- * Metadata on classes specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation on the class.
+ * Metadata on classes specific to the XML serializers and parsers pulled from the {@link Xml @Xml} annotation on the
+ * class.
*/
public class XmlClassMeta extends ClassMetaExtended {
@@ -55,7 +56,8 @@ public class XmlClassMeta extends ClassMetaExtended {
/**
* Returns the {@link Xml} annotation defined on the class.
*
- * @return The value of the {@link Xml} annotation defined on the class, or <jk>null</jk> if annotation is not specified.
+ * @return The value of the {@link Xml} annotation defined on the class, or <jk>null</jk> if annotation is not
+ * specified.
*/
protected Xml getAnnotation() {
return xml;
@@ -92,8 +94,7 @@ public class XmlClassMeta extends ClassMetaExtended {
* <li>{@link Xml#prefix()} annotation defined on interface packages.
* </ol>
*
- * @return The namespace associated with this class, or <jk>null</jk> if no namespace is
- * associated with it.
+ * @return The namespace associated with this class, or <jk>null</jk> if no namespace is associated with it.
*/
protected Namespace getNamespace() {
return namespace;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlDocSerializer.java
index 0d4a9d2..b26f025 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlDocSerializer.java
@@ -29,8 +29,8 @@ import org.apache.juneau.serializer.*;
*
* <h5 class='section'>Description:</h5>
* <p>
- * Same as {@link XmlSerializer}, except prepends <code><xt><?xml</xt> <xa>version</xa>=<xs>'1.0'</xs> <xa>encoding</xa>=<xs>'UTF-8'</xs><xt>?></xt></code> to the response
- * to make it a valid XML document.
+ * Same as {@link XmlSerializer}, except prepends <code><xt><?xml</xt> <xa>version</xa>=<xs>'1.0'</xs>
+ * <xa>encoding</xa>=<xs>'UTF-8'</xs><xt>?></xt></code> to the response to make it a valid XML document.
*
*/
public class XmlDocSerializer extends XmlSerializer {
@@ -41,6 +41,7 @@ public class XmlDocSerializer extends XmlSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public Ns(PropertyStore propertyStore) {
@@ -55,6 +56,7 @@ public class XmlDocSerializer extends XmlSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public XmlDocSerializer(PropertyStore propertyStore) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
index f1d24d2..c4f4d35 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
@@ -62,6 +62,7 @@ public class XmlParser extends ReaderParser {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public XmlParser(PropertyStore propertyStore) {
@@ -87,7 +88,8 @@ public class XmlParser extends ReaderParser {
* @return The parsed object.
* @throws Exception
*/
- protected <T> T parseAnything(XmlParserSession session, ClassMeta<T> eType, String currAttr, XMLStreamReader r, Object outer, boolean isRoot, BeanPropertyMeta pMeta) throws Exception {
+ protected <T> T parseAnything(XmlParserSession session, ClassMeta<T> eType, String currAttr, XMLStreamReader r,
+ Object outer, boolean isRoot, BeanPropertyMeta pMeta) throws Exception {
if (eType == null)
eType = (ClassMeta<T>)object();
@@ -180,7 +182,9 @@ public class XmlParser extends ReaderParser {
} else if (sType.canCreateNewInstanceFromNumber(outer)) {
o = sType.newInstanceFromNumber(session, outer, parseNumber(session.getElementText(r), sType.getNewInstanceFromNumberClass()));
} else {
- throw new ParseException(session, "Class ''{0}'' could not be instantiated. Reason: ''{1}'', property: ''{2}''", sType.getInnerClass().getName(), sType.getNotABeanReason(), pMeta == null ? null : pMeta.getName());
+ throw new ParseException(session,
+ "Class ''{0}'' could not be instantiated. Reason: ''{1}'', property: ''{2}''",
+ sType.getInnerClass().getName(), sType.getNotABeanReason(), pMeta == null ? null : pMeta.getName());
}
if (transform != null && o != null)
@@ -192,7 +196,8 @@ public class XmlParser extends ReaderParser {
return (T)o;
}
- private <K,V> Map<K,V> parseIntoMap(XmlParserSession session, XMLStreamReader r, Map<K,V> m, ClassMeta<K> keyType, ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception {
+ private <K,V> Map<K,V> parseIntoMap(XmlParserSession session, XMLStreamReader r, Map<K,V> m, ClassMeta<K> keyType,
+ ClassMeta<V> valueType, BeanPropertyMeta pMeta) throws Exception {
int depth = 0;
for (int i = 0; i < r.getAttributeCount(); i++) {
String a = r.getAttributeLocalName(i);
@@ -230,7 +235,8 @@ public class XmlParser extends ReaderParser {
return m;
}
- private <E> Collection<E> parseIntoCollection(XmlParserSession session, XMLStreamReader r, Collection<E> l, ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception {
+ private <E> Collection<E> parseIntoCollection(XmlParserSession session, XMLStreamReader r, Collection<E> l,
+ ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception {
int depth = 0;
int argIndex = 0;
do {
@@ -497,7 +503,8 @@ public class XmlParser extends ReaderParser {
//--------------------------------------------------------------------------------
@Override /* Parser */
- public XmlParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) {
+ public XmlParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale,
+ TimeZone timeZone, MediaType mediaType) {
return new XmlParserSession(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType);
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 eaf97f8..8e1a348 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
@@ -37,6 +37,7 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* Constructor.
+ *
* @param propertyStore The initial configuration settings for this builder.
*/
public XmlParserBuilder(PropertyStore propertyStore) {
@@ -66,7 +67,8 @@ public class XmlParserBuilder extends ParserBuilder {
* If <jk>true</jk>, XML document will be validated.
* See {@link XMLInputFactory#IS_VALIDATING} for more info.
* <p>
- * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO.
+ * 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>
@@ -98,7 +100,8 @@ public class XmlParserBuilder extends ParserBuilder {
* <li>Reporters are not copied to new parsers during a clone.
* </ul>
* <p>
- * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO.
+ * 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>
@@ -125,7 +128,8 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* Associates an {@link XMLResolver} with this parser.
* <p>
- * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO.
+ * 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>
@@ -152,7 +156,8 @@ public class XmlParserBuilder extends ParserBuilder {
* <p>
* Associates an {@link XMLEventAllocator} with this parser.
* <p>
- * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO.
+ * 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>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 6c56276..d7f36fc 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,9 +28,11 @@ 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> - Properties associated with handling beans on serializers and parsers.
+ * <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.
+ * <li class='jc'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a>
+ * - Configurable properties common to all parsers.
* </ul>
* </ul>
*/
@@ -108,9 +110,9 @@ public class XmlParserContext extends ParserContext {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * If <jk>true</jk>, when parsing into a generic {@link ObjectMap}, the map will
- * contain a single entry whose key is the root element name.
- *
+ * If <jk>true</jk>, when parsing into a generic {@link ObjectMap}, the map will contain a single entry whose key
+ * is the root element name.
+ * <p>
* Example:
* <table class='styled'>
* <tr>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserSession.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserSession.java
index 098c5ee..c903421 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserSession.java
@@ -50,13 +50,13 @@ public class XmlParserSession extends ParserSession {
* @param ctx The context creating this session object.
* The context contains all the configuration settings for this object.
* @param input The input. Can be any of the following types:
- * <ul>
- * <li><jk>null</jk>
- * <li>{@link Reader}
- * <li>{@link CharSequence}
- * <li>{@link InputStream} containing UTF-8 encoded text.
- * <li>{@link File} containing system encoded text.
- * </ul>
+ * <ul>
+ * <li><jk>null</jk>
+ * <li>{@link Reader}
+ * <li>{@link CharSequence}
+ * <li>{@link InputStream} containing UTF-8 encoded text.
+ * <li>{@link File} containing system encoded text.
+ * </ul>
* @param op The override properties.
* These override any context properties defined in the context.
* @param javaMethod The java method that called this parser, usually the method in a REST servlet.
@@ -67,7 +67,8 @@ public class XmlParserSession extends ParserSession {
* If <jk>null</jk>, then the timezone defined on the context is used.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
- public XmlParserSession(XmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) {
+ public XmlParserSession(XmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
+ Locale locale, TimeZone timeZone, MediaType mediaType) {
super(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType);
if (op == null || op.isEmpty()) {
validating = ctx.validating;
@@ -257,8 +258,8 @@ public class XmlParserSession extends ParserSession {
/**
* Parses the current element as text.
- * Note that this is different than {@link #getText(XMLStreamReader)} since it
- * assumes that we're pointing to a whitespace element.
+ * Note that this is different than {@link #getText(XMLStreamReader)} since it assumes that we're pointing to a
+ * whitespace element.
*
* @param r
* @return The parsed text.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaDocSerializer.java
index 5036bf8..edab0e4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaDocSerializer.java
@@ -26,8 +26,8 @@ import org.apache.juneau.serializer.*;
*
* <h5 class='section'>Description:</h5>
* <p>
- * Same as {@link XmlSchemaSerializer}, except prepends <code><xt><?xml</xt> <xa>version</xa>=<xs>'1.0'</xs> <xa>encoding</xa>=<xs>'UTF-8'</xs><xt>?></xt></code> to the response
- * to make it a valid XML document.
+ * Same as {@link XmlSchemaSerializer}, except prepends <code><xt><?xml</xt> <xa>version</xa>=<xs>'1.0'</xs>
+ * <xa>encoding</xa>=<xs>'UTF-8'</xs><xt>?></xt></code> to the response to make it a valid XML document.
*/
public class XmlSchemaDocSerializer extends XmlSchemaSerializer {
@@ -37,6 +37,7 @@ public class XmlSchemaDocSerializer extends XmlSchemaSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public XmlSchemaDocSerializer(PropertyStore propertyStore) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializer.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializer.java
index 8a06047..ab93ce9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializer.java
@@ -61,6 +61,7 @@ public class XmlSchemaSerializer extends XmlSerializer {
/**
* Constructor.
+ *
* @param propertyStore Initialize with the specified config property store.
*/
public XmlSchemaSerializer(PropertyStore propertyStore) {
@@ -69,6 +70,7 @@ public class XmlSchemaSerializer extends XmlSerializer {
/**
* Constructor
+ *
* @param propertyStore The property store containing all the settings for this object.
* @param overrideProperties A set of overridden settings, typically defined by the class itself.
*/
@@ -95,7 +97,8 @@ public class XmlSchemaSerializer extends XmlSerializer {
/**
* Returns an XML-Schema validator based on the output returned by {@link #doSerialize(SerializerSession, Object)};
*
- * @param session The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale, TimeZone, MediaType, UriContext)}.<br>
+ * @param session The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale,
+ * TimeZone, MediaType, UriContext)}.
* Can be <jk>null</jk>.
* @param o The object to serialize.
* @return The new validator.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializerBuilder.java
index dcb590c..30701cb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSchemaSerializerBuilder.java
@@ -32,6 +32,7 @@ public class XmlSchemaSerializerBuilder extends XmlSerializerBuilder {
/**
* Constructor.
+ *
* @param propertyStore The initial configuration settings for this builder.
*/
public XmlSchemaSerializerBuilder(PropertyStore propertyStore) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 73fdf7e..4c9d0a6 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
@@ -101,10 +101,12 @@ import org.apache.juneau.xml.annotation.*;
* <xt><fico_x0020_score</xt> <xa>_type</xa>=<xs>'string'</xs><xt>></xt> &gt; 640<xt></fico_x0020_score></xt>
* <xt></object></xt>
* <p>
- * This serializer provides several serialization options. Typically, one of the predefined <jsf>DEFAULT</jsf> serializers will be sufficient.
+ * This serializer provides several serialization options.
+ * Typically, one of the predefined <jsf>DEFAULT</jsf> serializers will be sufficient.
* However, custom serializers can be constructed to fine-tune behavior.
* <p>
- * If an attribute name contains any non-valid XML element characters, they will be escaped using standard {@code _x####_} notation.
+ * If an attribute name contains any non-valid XML element characters, they will be escaped using standard
+ * {@code _x####_} notation.
*
* <h5 class='section'>Configurable properties:</h5>
* <p>
@@ -150,6 +152,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public Sq(PropertyStore propertyStore) {
@@ -167,6 +170,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public SqReadable(PropertyStore propertyStore) {
@@ -185,6 +189,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public Ns(PropertyStore propertyStore) {
@@ -202,6 +207,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public NsSq(PropertyStore propertyStore) {
@@ -219,6 +225,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public NsSqReadable(PropertyStore propertyStore) {
@@ -227,7 +234,8 @@ public class XmlSerializer extends WriterSerializer {
@Override /* CoreObject */
protected ObjectMap getOverrideProperties() {
- return super.getOverrideProperties().append(XML_enableNamespaces, true).append(SERIALIZER_quoteChar, '\'').append(SERIALIZER_useWhitespace, true);
+ return super.getOverrideProperties().append(XML_enableNamespaces, true).append(SERIALIZER_quoteChar, '\'')
+ .append(SERIALIZER_useWhitespace, true);
}
}
@@ -237,6 +245,7 @@ public class XmlSerializer extends WriterSerializer {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public XmlSerializer(PropertyStore propertyStore) {
@@ -344,7 +353,8 @@ public class XmlSerializer extends WriterSerializer {
* @param addNamespaceUris Flag indicating that namespace URIs need to be added.
* @param format The format to serialize the output to.
* @param isMixed We're serializing mixed content, so don't use whitespace.
- * @param preserveWhitespace <jk>true</jk> if we're serializing {@link XmlFormat#MIXED_PWS} or {@link XmlFormat#TEXT_PWS}.
+ * @param preserveWhitespace <jk>true</jk> if we're serializing {@link XmlFormat#MIXED_PWS} or
+ * {@link XmlFormat#TEXT_PWS}.
* @param pMeta The bean property metadata if this is a bean property being serialized.
* @return The same writer passed in so that calls to the writer can be chained.
* @throws Exception If a problem occurred trying to convert the output.
@@ -576,7 +586,8 @@ public class XmlSerializer extends WriterSerializer {
return out;
}
- private ContentResult serializeMap(XmlSerializerSession session, XmlWriter out, Map m, ClassMeta<?> sType, ClassMeta<?> eKeyType, ClassMeta<?> eValueType, boolean isMixed) throws Exception {
+ private ContentResult serializeMap(XmlSerializerSession session, XmlWriter out, Map m, ClassMeta<?> sType,
+ ClassMeta<?> eKeyType, ClassMeta<?> eValueType, boolean isMixed) throws Exception {
m = session.sort(m);
@@ -607,7 +618,8 @@ public class XmlSerializer extends WriterSerializer {
return hasChildren ? CR_ELEMENTS : CR_EMPTY;
}
- private ContentResult serializeBeanMap(XmlSerializerSession session, XmlWriter out, BeanMap<?> m, Namespace elementNs, boolean isCollapsed, boolean isMixed) throws Exception {
+ private ContentResult serializeBeanMap(XmlSerializerSession session, XmlWriter out, BeanMap<?> m,
+ Namespace elementNs, boolean isCollapsed, boolean isMixed) throws Exception {
boolean hasChildren = false;
BeanMeta<?> bm = m.getMeta();
@@ -745,7 +757,8 @@ public class XmlSerializer extends WriterSerializer {
return isMixed ? CR_MIXED : CR_ELEMENTS;
}
- private XmlWriter serializeCollection(XmlSerializerSession session, XmlWriter out, Object in, ClassMeta<?> sType, ClassMeta<?> eType, BeanPropertyMeta ppMeta, boolean isMixed) throws Exception {
+ private XmlWriter serializeCollection(XmlSerializerSession session, XmlWriter out, Object in, ClassMeta<?> sType,
+ ClassMeta<?> eType, BeanPropertyMeta ppMeta, boolean isMixed) throws Exception {
ClassMeta<?> seType = sType.getElementType();
if (seType == null)
@@ -831,7 +844,8 @@ public class XmlSerializer extends WriterSerializer {
}
@Override /* Serializer */
- public XmlSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
+ public XmlSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale,
+ TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
return new XmlSerializerSession(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 56b2fff..6592980 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
@@ -34,6 +34,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* Constructor.
+ *
* @param propertyStore The initial configuration settings for this builder.
*/
public XmlSerializerBuilder(PropertyStore propertyStore) {
@@ -97,21 +98,19 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* <p>
* Detect namespace usage before serialization.
* <p>
- * Used in conjunction with {@link XmlSerializerContext#XML_addNamespaceUrisToRoot} to reduce
- * the list of namespace URLs appended to the root element to only those
- * that will be used in the resulting document.
+ * Used in conjunction with {@link XmlSerializerContext#XML_addNamespaceUrisToRoot} to reduce the list of namespace
+ * URLs appended to the root element to only those that will be used in the resulting document.
* <p>
- * If enabled, then the data structure will first be crawled looking for
- * namespaces that will be encountered before the root element is
- * serialized.
+ * If enabled, then the data structure will first be crawled looking for namespaces that will be encountered before
+ * 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.
+ * 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>
@@ -138,8 +137,7 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * Use this setting to add {@code xmlns:x} attributes to the root
- * element for the default and all mapped namespaces.
+ * 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>
@@ -193,8 +191,8 @@ public class XmlSerializerBuilder extends SerializerBuilder {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated
- * by the {@link XmlSchemaSerializer} class.
+ * 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>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 7239f25..cd11328 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,9 +25,12 @@ 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> - Properties associated with handling beans on serializers and parsers.
+ * <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.
+ * <li class='jc'><a class="doclink"
+ * href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a>
+ * - Configurable properties common to all serializers.
* </ul>
* </ul>
*/
@@ -59,13 +62,11 @@ public class XmlSerializerContext extends SerializerContext {
* <p>
* Detect namespace usage before serialization.
* <p>
- * Used in conjunction with {@link #XML_addNamespaceUrisToRoot} to reduce
- * the list of namespace URLs appended to the root element to only those
- * that will be used in the resulting document.
+ * Used in conjunction with {@link #XML_addNamespaceUrisToRoot} to reduce the list of namespace URLs appended to the
+ * root element to only those that will be used in the resulting document.
* <p>
- * If enabled, then the data structure will first be crawled looking for
- * namespaces that will be encountered before the root element is
- * serialized.
+ * If enabled, then the data structure will first be crawled looking for namespaces that will be encountered before
+ * the root element is serialized.
* <p>
* This setting is ignored if {@link #XML_enableNamespaces} is not enabled.
* <p>
@@ -88,8 +89,7 @@ public class XmlSerializerContext extends SerializerContext {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * Use this setting to add {@code xmlns:x} attributes to the root
- * element for the default and all mapped namespaces.
+ * 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 #XML_enableNamespaces} is not enabled.
*/
@@ -119,8 +119,8 @@ public class XmlSerializerContext extends SerializerContext {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated
- * by the {@link XmlSchemaSerializer} class.
+ * Specifies the namespace for the <code>XMLSchema</code> namespace, used by the schema generated by the
+ * {@link XmlSchemaSerializer} class.
*/
public static final String XML_xsNamespace = "XmlSerializer.xsNamespace";
@@ -148,9 +148,11 @@ public class XmlSerializerContext extends SerializerContext {
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
* <p>
- * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred through reflection.
+ * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred
+ * through reflection.
* This is used to recreate the correct objects during parsing if the object types cannot be inferred.
- * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from the value type.
+ * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from
+ * the value type.
* <p>
* When present, this value overrides the {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting and is
* provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
index ca67989..76588c4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerSession.java
@@ -51,20 +51,21 @@ public class XmlSerializerSession extends SerializerSession {
* 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.
+ * The context contains all the configuration settings for this object.
* @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types.
* @param op The override properties.
- * These override any context properties defined in the context.
+ * These override any context properties defined in the context.
* @param javaMethod The java method that called this serializer, usually the method in a REST servlet.
* @param locale The session locale.
- * If <jk>null</jk>, then the locale defined on the context is used.
+ * If <jk>null</jk>, then the locale defined on the context is used.
* @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * If <jk>null</jk>, then the timezone defined on the context is used.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
* @param uriContext The URI context.
- * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
- public XmlSerializerSession(XmlSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
+ public XmlSerializerSession(XmlSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale,
+ TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
super(ctx, op, output, javaMethod, locale, timeZone, mediaType, uriContext);
if (op == null || op.isEmpty()) {
enableNamespaces = ctx.enableNamespaces;
@@ -187,8 +188,7 @@ public class XmlSerializerSession extends SerializerSession {
* 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.
+ * 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.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 28d858a..43d0835 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
@@ -165,16 +165,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.
+ * 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.
* @param preserveWhitespace Specifies whether we're in preserve-whitespace mode.
- * (e.g. {@link XmlFormat#MIXED_PWS} or {@link XmlFormat#TEXT_PWS}.
+ * (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.
* @throws IOException Thrown from the writer.
@@ -299,10 +301,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.
+ * 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.
@@ -475,8 +479,7 @@ public final class XmlUtils {
/**
* Find the namespace given a list of <ja>@Xml</ja> and <ja>@XmlSchema</ja> annotations.
- * The annotations should be a child-to-parent ordering of annotations found on
- * a class or method.
+ * 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 21d1d2a..cb00878 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
@@ -44,7 +44,8 @@ public class XmlWriter extends SerializerWriter {
* @param enableNs Flag to indicate if XML namespaces are enabled.
* @param defaultNamespace The default namespace if XML namespaces are enabled.
*/
- public XmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, UriResolver uriResolver, boolean enableNs, Namespace defaultNamespace) {
+ public XmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar,
+ UriResolver uriResolver, boolean enableNs, Namespace defaultNamespace) {
super(out, useWhitespace, maxIndent, trimStrings, quoteChar, uriResolver);
this.enableNs = enableNs;
this.defaultNsPrefix = defaultNamespace == null ? null : defaultNamespace.name;
@@ -496,7 +497,7 @@ public class XmlWriter extends SerializerWriter {
*
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
- * @param value The attribute value, convertable to a URI via <code>toString()</code>
+ * @param value The attribute value, convertible to a URI via <code>toString()</code>
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
*/
@@ -509,7 +510,7 @@ public class XmlWriter extends SerializerWriter {
*
* @param ns The namespace. Can be <jk>null</jk>.
* @param name The attribute name.
- * @param value The attribute value, convertable to a URI via <code>toString()</code>
+ * @param value The attribute value, convertible to a URI via <code>toString()</code>
* @return This object (for method chaining).
* @throws IOException If a problem occurred.
*/
@@ -533,7 +534,8 @@ 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.
+ * @param preserveWhitespace If <jk>true</jk>, then we're serializing {@link XmlFormat#MIXED_PWS} or
+ * {@link XmlFormat#TEXT_PWS} content.
* @return This object (for method chaining).
* @throws IOException
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/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 13f7613..97e2d92 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
@@ -81,17 +81,16 @@ public @interface Xml {
* 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} with the same name
- * through the {@link XmlSchema#xmlNs()} annotation on the package.
- * </p>
+ * Must either be matched to a {@link #namespace()} annotation on the same object, parent object, or a
+ * {@link XmlNs} with the same name through the {@link XmlSchema#xmlNs()} annotation on the package.
*/
String prefix() default "";
/**
* 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} with the same name
- * through the {@link XmlSchema#xmlNs()} annotation on the package.
+ * Must be matched with a {@link #prefix()} annotation on this object, a parent object, or a {@link XmlNs} with the
+ * same name through the {@link XmlSchema#xmlNs()} annotation on the package.
*/
String namespace() default "";
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
index a96b945..690f0ac 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlFormat.java
@@ -40,9 +40,10 @@ public enum XmlFormat {
* <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.
+ * On bean properties, implies that the bean property value itself should be serialized as attributes on the bean
+ * element.
* The bean property data type must be of class type <code>Map<Object,Object></code> where both
- * objects are convertible to <code>Strings</code>.
+ * objects are convertible to <code>Strings</code>.
*/
ATTRS,
@@ -63,7 +64,8 @@ public enum XmlFormat {
* <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.
+ * On a bean property, implies that the bean property value itself should be serialized as child elements of the
+ * bean element.
*/
ELEMENTS,
@@ -105,7 +107,7 @@ 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 reserialized and set on the property.
+ * During parsing, this XML text will be re-serialized and set on the property.
* <p>
* Only applicable for bean properties, not bean classes.
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
index 8d67da8..04a9def 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlSchema.java
@@ -29,33 +29,30 @@ 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.
- * </p>
+ * Must either be matched with a {@link #namespace()} annotation, or an {@link #xmlNs()} mapping with the same
+ * {@link XmlNs#prefix} value.
*/
public String prefix() default "";
/**
* 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} value.
- * </p>
+ * Must either be matched with a {@link #prefix()} annotation, or an {@link #xmlNs()} mapping with the same
+ * {@link XmlNs#namespaceURI} value.
*/
public String namespace() default "";
/**
* 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()} annotation.
+ * 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()} annotation.
* <p>
* Inherited by child packages.
*
* <h5 class='section'>Example:</h5>
* <p>
* Contents of <code>package-info.java</code>...
- * </p>
* <p class='bcode'>
* <jc>// XML namespaces used within this package.</jc>
* <ja>@XmlSchema</ja>(prefix=<js>"ab"</js>,
@@ -71,7 +68,6 @@ public @interface XmlSchema {
* </p>
* <p>
* Class in package using defined namespaces...
- * </p>
* <p class='bcode'>
* <jk>package</jk> corg.apache.juneau.examples.addressbook;
*