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/28 23:37:18 UTC
[01/11] incubator-juneau git commit: Clean up javadocs
Repository: incubator-juneau
Updated Branches:
refs/heads/master 19c566dd2 -> f400b0c0f
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java
index 4287407..85496a1 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/PathRemainder.java
@@ -28,9 +28,9 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/foo/*"</js>)
* <jk>public void</jk> doGet(RestRequest req, RestResponse res) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java
index b1ab9e0..c00269f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Properties.java
@@ -31,6 +31,7 @@ import org.apache.juneau.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
* <p class='bcode'>
@@ -41,6 +42,7 @@ import org.apache.juneau.*;
* ...
* }
* </p>
+ *
* <p>
* ...or this...
* <p class='bcode'>
@@ -50,6 +52,7 @@ import org.apache.juneau.*;
* ...
* }
* </p>
+ *
* <p>
* The parameter type can be one of the following:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java
index e48228a..fa25444 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Property.java
@@ -26,6 +26,7 @@ import org.apache.juneau.xml.*;
/**
* Property name/value pair used in the {@link RestResource#properties()} annotation.
+ *
* <p>
* Any of the following property names can be specified:
* <ul>
@@ -39,9 +40,11 @@ import org.apache.juneau.xml.*;
* <li>{@link XmlSerializerContext}
* <li>{@link XmlParserContext}
* </ul>
+ *
* <p>
* Property values types that are not <code>Strings</code> will automatically be converted to the correct type
* (e.g. <code>Boolean</code>, etc...).
+ *
* <p>
* See {@link RestResource#properties} for more information.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java
index 298b312..f548d61 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Query.java
@@ -22,6 +22,7 @@ import org.apache.juneau.rest.*;
/**
* Identical to {@link FormData @FormData}, but only retrieves the parameter from the URL string, not URL-encoded form
* posts.
+ *
* <p>
* Unlike {@link FormData @FormData}, using this annotation does not result in the servlet reading the contents of
* URL-encoded form posts.
@@ -36,9 +37,9 @@ import org.apache.juneau.rest.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>)
* <jk>public void</jk> doGet(RestRequest req, RestResponse res) {
@@ -62,6 +63,7 @@ public @interface Query {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -69,11 +71,13 @@ public @interface Query {
/**
* Specify <jk>true</jk> if using multi-part parameters to represent collections and arrays.
+ *
* <p>
* Normally, we expect single parameters to be specified in UON notation for representing collections of values
* (e.g. <js>"&key=(1,2,3)"</js>.
* This annotation allows the use of multi-part parameters to represent collections
* (e.g. <js>"&key=1&key=2&key=3"</js>.
+ *
* <p>
* This setting should only be applied to Java parameters of type array or Collection.
*/
@@ -81,6 +85,7 @@ public @interface Query {
/**
* The expected format of the request parameter.
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -95,6 +100,7 @@ public @interface Query {
* <js>"INHERIT"</js> (default) - Inherit from the {@link RestContext#REST_paramFormat} property on the
* servlet method or class.
* </ul>
+ *
* <p>
* Note that the parameter value <js>"(foo)"</js> is interpreted as <js>"(foo)"</js> when using plain mode, but
* <js>"foo"</js> when using UON mode.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
index 05f6b69..e30c4f1 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
@@ -37,8 +37,10 @@ public @interface ResourceSwagger {
/**
* Optional contact information for the exposed API.
+ *
* <p>
* It is used to populate the Swagger contact field and to display on HTML pages.
+ *
* <p>
* A simplified JSON string with the following fields:
* <p class='bcode'>
@@ -48,6 +50,7 @@ public @interface ResourceSwagger {
* email: string
* }
* </p>
+ *
* <p>
* The default value pulls the description from the <code>contact</code> entry in the servlet resource bundle.
* (e.g. <js>"contact = {name:'John Smith',email:'john.smith@foo.bar'}"</js> or
@@ -61,10 +64,13 @@ public @interface ResourceSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/info/contact</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getContact(RestRequest)} method.
*/
@@ -72,8 +78,10 @@ public @interface ResourceSwagger {
/**
* Optional license information for the exposed API.
+ *
* <p>
* It is used to populate the Swagger license field and to display on HTML pages.
+ *
* <p>
* A simplified JSON string with the following fields:
* <p class='bcode'>
@@ -82,6 +90,7 @@ public @interface ResourceSwagger {
* url: string
* }
* </p>
+ *
* <p>
* The default value pulls the description from the <code>license</code> entry in the servlet resource bundle.
* (e.g. <js>"license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js> or
@@ -95,10 +104,13 @@ public @interface ResourceSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/info/license</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getLicense(RestRequest)} method.
*/
@@ -106,15 +118,20 @@ public @interface ResourceSwagger {
/**
* Provides the version of the application API (not to be confused with the specification version).
+ *
* <p>
* It is used to populate the Swagger version field and to display on HTML pages.
+ *
* <p>
* The default value pulls the description from the <code>version</code> entry in the servlet resource bundle.
* (e.g. <js>"version = 2.0"</js> or <js>"MyServlet.version = 2.0"</js>).
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/info/version</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getVersion(RestRequest)} method.
*/
@@ -122,8 +139,10 @@ public @interface ResourceSwagger {
/**
* Optional tagging information for the exposed API.
+ *
* <p>
* It is used to populate the Swagger tags field and to display on HTML pages.
+ *
* <p>
* A simplified JSON string with the following fields:
* <p class='bcode'>
@@ -138,6 +157,7 @@ public @interface ResourceSwagger {
* }
* ]
* </p>
+ *
* <p>
* The default value pulls the description from the <code>tags</code> entry in the servlet resource bundle.
* (e.g. <js>"tags = [{name:'Foo',description:'Foobar'}]"</js> or
@@ -151,10 +171,13 @@ public @interface ResourceSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/tags</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTags(RestRequest)} method.
*/
@@ -162,8 +185,10 @@ public @interface ResourceSwagger {
/**
* Optional external documentation information for the exposed API.
+ *
* <p>
* It is used to populate the Swagger external documentation field and to display on HTML pages.
+ *
* <p>
* A simplified JSON string with the following fields:
* <p class='bcode'>
@@ -172,6 +197,7 @@ public @interface ResourceSwagger {
* url: string
* }
* </p>
+ *
* <p>
* The default value pulls the description from the <code>externalDocs</code> entry in the servlet resource bundle.
* (e.g. <js>"externalDocs = {url:'http://juneau.apache.org'}"</js> or
@@ -185,10 +211,13 @@ public @interface ResourceSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/tags</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)}
* method.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java
index 68c2634..2080b2a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Response.java
@@ -50,12 +50,15 @@ public @interface Response {
/**
* Optional description.
+ *
* <p>
* The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
* (e.g. <js>"myMethod.res.[code].description = foo"</js> or
* <js>"MyServlet.myMethod.res.[code].description = foo"</js>).
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/responses/{code}/description</code>.
*/
@@ -63,6 +66,7 @@ public @interface Response {
/**
* A definition of the response structure.
+ *
* <p>
* It can be a primitive, an array or an object.
* If this field does not exist, it means no content is returned as part of the response.
@@ -85,6 +89,7 @@ public @interface Response {
/**
* Optional response headers.
+ *
* <p>
* Response variables can also be defined in the servlet resource bundle.
* (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
index 003dece..62a63d4 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
@@ -38,13 +38,16 @@ public @interface RestMethod {
/**
* REST method name.
+ *
* <p>
* Typically <js>"GET"</js>, <js>"PUT"</js>, <js>"POST"</js>, <js>"DELETE"</js>, or <js>"OPTIONS"</js>.
+ *
* <p>
* Method names are case-insensitive (always folded to upper-case).
+ *
* <p>
* Besides the standard HTTP method names, the following can also be specified:
- * <ul>
+ * <ul class='spaced-list'>
* <li>
* <js>"*"</js>
* - Denotes any method.
@@ -78,11 +81,12 @@ public @interface RestMethod {
/**
* Optional path pattern for the specified method.
+ *
* <p>
* Appending <js>"/*"</js> to the end of the path pattern will make it match any remainder too.
- * <br>
- * Not appending <js>"/*"</js> to the end of the pattern will cause a 404 (Not found) error to occur if the exact
+ * <br>Not appending <js>"/*"</js> to the end of the pattern will cause a 404 (Not found) error to occur if the exact
* pattern is not found.
+ *
* <p>
* The path can contain variables that get resolved to {@link Path @Path} parameters:
* <p class='bcode'>
@@ -92,6 +96,7 @@ public @interface RestMethod {
* <jc>// Example 2</jc>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{0}/{1}/{2}/*"</js>)
* </p>
+ *
* <p>
* Refer to {@link Path @Path} on how path variables get resolved.
*/
@@ -99,8 +104,10 @@ public @interface RestMethod {
/**
* URL path pattern priority.
+ *
* <p>
* To force path patterns to be checked before other path patterns, use a higher priority number.
+ *
* <p>
* By default, it's <code>0</code>, which means it will use an internal heuristic to determine a best match.
*/
@@ -108,9 +115,11 @@ public @interface RestMethod {
/**
* Method guards.
+ *
* <p>
* Associates one or more {@link RestGuard RestGuards} with a method call.
* These guards get called immediately before execution of the REST method.
+ *
* <p>
* Typically, guards will be used for permissions checking on the user making the request, but it can also be used
* for other purposes like pre-call validation of a request.
@@ -119,12 +128,15 @@ public @interface RestMethod {
/**
* Method response converters.
+ *
* <p>
* Associates one or more {@link RestConverter RestConverters} with a method call.
* These converters get called immediately after execution of the REST method in the same order specified in the
* annotation.
+ *
* <p>
* Can be used for performing post-processing on the response object before serialization.
+ *
* <p>
* Default converters are available in the <a class='doclink'
* href='../converters/package-summary.html#TOC'>org.apache.juneau.rest.converters</a> package.
@@ -133,11 +145,14 @@ public @interface RestMethod {
/**
* Method matchers.
+ *
* <p>
* Associates one more more {@link RestMatcher RestMatchers} with this method.
+ *
* <p>
* Matchers are used to allow multiple Java methods to handle requests assigned to the same URL path pattern, but
* differing based on some request attribute, such as a specific header value.
+ *
* <p>
* See {@link RestMatcher} for details.
*/
@@ -145,9 +160,11 @@ public @interface RestMethod {
/**
* Overrides the list of serializers assigned at the method level.
+ *
* <p>
* Use this annotation when the list of serializers assigned to a method differs from the list of serializers
* assigned at the servlet level.
+ *
* <p>
* To append to the list of serializers assigned at the servlet level, use
* <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>.
@@ -172,6 +189,7 @@ public @interface RestMethod {
/**
* Used in conjunction with {@link #serializers()} to identify what class-level settings are inherited by the method
* serializer group.
+ *
* <p>
* Possible values:
* <ul>
@@ -179,9 +197,9 @@ public @interface RestMethod {
* <li>{@link Inherit#PROPERTIES} - Inherit class-level properties.
* <li>{@link Inherit#TRANSFORMS} - Inherit class-level transforms.
* </ul>
+ *
* <p>
* For example, to inherit all serializers, properties, and transforms from the servlet class:
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(
* path=<js>"/foo"</js>,
@@ -194,9 +212,11 @@ public @interface RestMethod {
/**
* Overrides the list of parsers assigned at the method level.
+ *
* <p>
* Use this annotation when the list of parsers assigned to a method differs from the list of parsers assigned at
* the servlet level.
+ *
* <p>
* To append to the list of serializers assigned at the servlet level, use
* <code>serializersInherit=<jsf>SERIALIZERS</jsf></code>.
@@ -221,6 +241,7 @@ public @interface RestMethod {
/**
* Used in conjunction with {@link #parsers()} to identify what class-level settings are inherited by the method
* parser group.
+ *
* <p>
* Possible values:
* <ul>
@@ -228,6 +249,7 @@ public @interface RestMethod {
* <li>{@link Inherit#PROPERTIES} - Inherit class-level properties.
* <li>{@link Inherit#TRANSFORMS} - Inherit class-level transforms.
* </ul>
+ *
* <p>
* For example, to inherit all parsers, properties, and transforms from the servlet class:
* <p class='bcode'>
@@ -242,9 +264,11 @@ public @interface RestMethod {
/**
* Appends to the list of {@link Encoder encoders} specified on the servlet.
+ *
* <p>
* Use this annotation when the list of encoders assigned to a method differs from the list of encoders assigned at
* the servlet level.
+ *
* <p>
* These can be used to enable various kinds of compression (e.g. <js>"gzip"</js>) on requests and responses.
*
@@ -261,6 +285,7 @@ public @interface RestMethod {
* }
* }
* </p>
+ *
* <p>
* If you want to OVERRIDE the set of encoders specified by the servlet, combine this annotation with
* <code><ja>@RestMethod</ja>(inheritEncoders=<jk>false</jk>)</code>.
@@ -274,6 +299,7 @@ public @interface RestMethod {
/**
* Same as {@link RestResource#properties()}, except defines property values by default when this method is called.
+ *
* <p>
* This is equivalent to simply calling <code>res.addProperties()</code> in the Java method, but is provided for
* convenience.
@@ -282,6 +308,7 @@ public @interface RestMethod {
/**
* Shortcut for setting {@link #properties()} of simple boolean types.
+ *
* <p>
* Setting a flag is equivalent to setting the same property to <js>"true"</js>.
*/
@@ -299,9 +326,11 @@ public @interface RestMethod {
/**
* Shortcut for specifying the {@link BeanContext#BEAN_includeProperties} property on all serializers.
+ *
* <p>
* The typical use case is when you're rendering summary and details views of the same bean in a resource and
* you want to expose or hide specific properties depending on the level of detail you want.
+ *
* <p>
* In the example below, our 'summary' view is a list of beans where we only want to show the ID property,
* and our detail view is a single bean where we want to expose different fields:
@@ -325,22 +354,22 @@ public @interface RestMethod {
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/mybeans/{id}"</js>, bpIncludes=<js>"{MyBean:'a,b'}"</js>)
* <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id);
* </p>
+ *
* <p>
* The format of this value is a lax JSON object.
- * <br>
- * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
- * <br>
- * Values are comma-delimited lists of bean property names.
- * <br>
- * Properties apply to specified class and all subclasses.
+ * <br>Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
+ * <br>Values are comma-delimited lists of bean property names.
+ * <br>Properties apply to specified class and all subclasses.
*/
String bpIncludes() default "";
/**
* Shortcut for specifying the {@link BeanContext#BEAN_excludeProperties} property on all serializers.
+ *
* <p>
* Same as {@link #bpIncludes()} except you specify a list of bean property names that you want to exclude from
* serialization.
+ *
* <p>
* In the example below, our 'summary' view is a list of beans where we want to exclude some properties:
* <p class='bcode'>
@@ -363,28 +392,31 @@ public @interface RestMethod {
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/mybeans/{id}"</js>)
* <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id);
* </p>
+ *
* <p>
* The format of this value is a lax JSON object.
- * <br>
- * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
- * <br>
- * Values are comma-delimited lists of bean property names.
- * <br>
- * Properties apply to specified class and all subclasses.
+ * <br>Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
+ * <br>Values are comma-delimited lists of bean property names.
+ * <br>Properties apply to specified class and all subclasses.
*/
String bpExcludes() default "";
/**
* Specifies default values for request headers.
+ *
* <p>
* Strings are of the format <js>"Header-Name: header-value"</js>.
+ *
* <p>
* Affects values returned by {@link RestRequest#getHeader(String)} when the header is not present on the request.
+ *
* <p>
* The most useful reason for this annotation is to provide a default <code>Accept</code> header when one is not
* specified so that a particular default {@link Serializer} is picked.
+ *
* <p>
* Only one header value can be specified per entry (i.e. it's not a delimited list of header entries).
+ *
* <p>
* Header values specified at the method level override header values specified at the servlet level.
*
@@ -396,6 +428,7 @@ public @interface RestMethod {
* ...
* }
* </p>
+ *
* <p>
* You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter.
* Key and value is trimmed of whitespace.
@@ -404,8 +437,10 @@ public @interface RestMethod {
/**
* Specifies default values for query parameters.
+ *
* <p>
* Strings are of the format <js>"name=value"</js>.
+ *
* <p>
* Affects values returned by {@link RestRequest#getQuery(String)} when the parameter is not present on the request.
*
@@ -416,6 +451,7 @@ public @interface RestMethod {
* ...
* }
* </p>
+ *
* <p>
* You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter.
* Key and value is trimmed of whitespace.
@@ -424,8 +460,10 @@ public @interface RestMethod {
/**
* Specifies default values for form-data parameters.
+ *
* <p>
* Strings are of the format <js>"name=value"</js>.
+ *
* <p>
* Affects values returned by {@link RestRequest#getFormData(String)} when the parameter is not present on the
* request.
@@ -437,6 +475,7 @@ public @interface RestMethod {
* ...
* }
* </p>
+ *
* <p>
* You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter.
* Key and value is trimmed of whitespace.
@@ -445,6 +484,7 @@ public @interface RestMethod {
/**
* Optional summary for the exposed API.
+ *
* <p>
* This summary is used in the following locations:
* <ul class='spaced-list'>
@@ -455,11 +495,14 @@ public @interface RestMethod {
* <li>
* The summary of the method in the Swagger page.
* </ul>
+ *
* <p>
* The default value pulls the description from the <code>(className.?)[javaMethodName].summary</code> entry in the
* servlet resource bundle. (e.g. <js>"MyClass.myMethod.summary = foo"</js> or <js>"myMethod.summary = foo"</js>).
+ *
* <p>
* This field value can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/summary</code>.
*/
@@ -467,6 +510,7 @@ public @interface RestMethod {
/**
* Optional description for the exposed API.
+ *
* <p>
* This description is used in the following locations:
* <ul class='spaced-list'>
@@ -477,12 +521,15 @@ public @interface RestMethod {
* <li>
* The description of the method in the Swagger page.
* </ul>
+ *
* <p>
* The default value pulls the description from the <code>(className.?)[javaMethodName].description</code> entry in
* the servlet resource bundle. (e.g. <js>"MyClass.myMethod.description = foo"</js> or
* <js>"myMethod.description = foo"</js>).
+ *
* <p>
* This field value can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/description</code>.
*/
@@ -490,14 +537,18 @@ public @interface RestMethod {
/**
* Specifies whether this method can be called based on the client version.
+ *
* <p>
* The client version is identified via the HTTP request header identified by
* {@link RestResource#clientVersionHeader()} which by default is <js>"X-Client-Version"</js>.
+ *
* <p>
* This is a specialized kind of {@link RestMatcher} that allows you to invoke different Java methods for the same
* method/path based on the client version.
+ *
* <p>
* The format of the client version range is similar to that of OSGi versions.
+ *
* <p>
* In the following example, the Java methods are mapped to the same HTTP method and URL <js>"/foobar"</js>.
* <p class='bcode'>
@@ -520,6 +571,7 @@ public @interface RestMethod {
* ...
* }
* </p>
+ *
* <p>
* It's common to combine the client version with transforms that will convert new POJOs into older POJOs for
* backwards compatibility.
@@ -535,6 +587,7 @@ public @interface RestMethod {
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod()
* }
+ *
* <p>
* Note that in the previous example, we're returning the exact same POJO, but using a transform to convert it into
* an older form.
@@ -551,6 +604,7 @@ public @interface RestMethod {
/**
* Defines widgets that can be used in conjunction with string variables of the form <js>"$W{name}"</js>to quickly
* generate arbitrary replacement text.
+ *
* <p>
* Widgets are inherited from parent to child, but can be overridden by reusing the widget name.
*/
@@ -563,6 +617,7 @@ public @interface RestMethod {
/**
* Provides HTML-doc-specific metadata on this method.
+ *
* <p>
* Information provided here overrides information provided in the servlet-level annotation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index c7f49a0..5db9ae5 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -34,6 +34,7 @@ import org.apache.juneau.xml.*;
/**
* Used to denote that a class is a REST resource and to associate metadata on it.
+ *
* <p>
* Usually used on a subclass of {@link RestServlet}, but can be used to annotate any class that you want to expose as
* a REST resource.
@@ -49,14 +50,17 @@ public @interface RestResource {
/**
* Identifies the location of the resource bundle for this class.
+ *
* <p>
* This annotation is used to provide localized messages for the following methods:
* <ul>
* <li>{@link RestRequest#getMessage(String, Object...)}
* <li>{@link RestContext#getMessages()}
* </ul>
+ *
* <p>
* Refer to the {@link MessageBundle} class for a description of the message key formats used in the properties file.
+ *
* <p>
* The value can be a relative path like <js>"nls/Messages"</js>, indicating to look for the resource bundle
* <js>"com.foo.sample.nls.Messages"</js> if the resource class is in <js>"com.foo.sample"</js>, or it can be an
@@ -66,12 +70,15 @@ public @interface RestResource {
/**
* Class-level guards.
+ *
* <p>
* Associates one or more {@link RestGuard RestGuards} with all REST methods defined in this class.
* These guards get called immediately before execution of any REST method in this class.
+ *
* <p>
* Typically, guards will be used for permissions checking on the user making the request, but it can also be used
* for other purposes like pre-call validation of a request.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addGuards(Class...)}/
* {@link RestConfig#addGuards(RestGuard...)} methods.
@@ -80,15 +87,19 @@ public @interface RestResource {
/**
* Class-level converters.
+ *
* <p>
* Associates one or more {@link RestConverter converters} with a resource class.
* These converters get called immediately after execution of the REST method in the same order specified in the
* annotation.
+ *
* <p>
* Can be used for performing post-processing on the response object before serialization.
+ *
* <p>
* Default converter implementations are provided in the <a class='doclink'
* href='../converters/package-summary.html#TOC'>org.apache.juneau.rest.converters</a> package.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addConverters(Class...)}/
* {@link RestConfig#addConverters(RestConverter...)} methods.
@@ -97,6 +108,7 @@ public @interface RestResource {
/**
* Class-level bean filters.
+ *
* <p>
* Shortcut to add bean filters to the bean contexts of the objects returned by the following methods:
* <ul>
@@ -104,10 +116,12 @@ public @interface RestResource {
* <li>{@link RestContext#getSerializers()}
* <li>{@link RestContext#getParsers()}
* </ul>
+ *
* <p>
* If the specified class is an instance of {@link BeanFilterBuilder}, then a filter built from that builder is added.
* Any other classes are wrapped in a {@link InterfaceBeanFilterBuilder} to indicate that subclasses should be
* treated as the specified class type.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#addBeanFilters(Class...)} method.
*/
@@ -115,6 +129,7 @@ public @interface RestResource {
/**
* Class-level POJO swaps.
+ *
* <p>
* Shortcut to add POJO swaps to the bean contexts of the objects returned by the following methods:
* <ul>
@@ -122,9 +137,11 @@ public @interface RestResource {
* <li>{@link RestContext#getSerializers()}
* <li>{@link RestContext#getParsers()}
* </ul>
+ *
* <p>
* If the specified class is an instance of {@link PojoSwap}, then that swap is added.
* Any other classes are wrapped in a {@link SurrogateSwap}.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#addPojoSwaps(Class...)} method.
*/
@@ -132,10 +149,12 @@ public @interface RestResource {
/**
* Class-level Java method parameter resolvers.
+ *
* <p>
* By default, the Juneau framework will automatically Java method parameters of various types (e.g.
* <code>RestRequest</code>, <code>Accept</code>, <code>Reader</code>).
* This annotation allows you to provide your own resolvers for your own class types that you want resolved.
+ *
* <p>
* For example, if you want to pass in instances of <code>MySpecialObject</code> to your Java method, define
* the following resolver:
@@ -155,8 +174,10 @@ public @interface RestResource {
* }
* }
* </p>
+ *
* <p>
* <b>Note:</b>{@link RestParam} classes must have no-arg constructors.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#addParamResolvers(Class...)} method.
*/
@@ -164,6 +185,7 @@ public @interface RestResource {
/**
* Class-level properties.
+ *
* <p>
* Shortcut for specifying class-level properties on this servlet to the objects returned by the following methods:
* <ul>
@@ -185,12 +207,15 @@ public @interface RestResource {
* <li>{@link XmlSerializerContext}
* <li>{@link XmlParserContext}
* </ul>
+ *
* <p>
* Property values will be converted to the appropriate type.
+ *
* <p>
* In some cases, properties can be overridden at runtime through the
* {@link RestResponse#setProperty(String, Object)} method or through a {@link Properties @Properties} annotated
* method parameter.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#setProperty(String, Object)}/
* {@link RestConfig#setProperties(java.util.Map)} methods.
@@ -199,6 +224,7 @@ public @interface RestResource {
/**
* Shortcut for setting {@link #properties()} of simple boolean types.
+ *
* <p>
* Setting a flag is equivalent to setting the same property to <js>"true"</js>.
*/
@@ -206,8 +232,10 @@ public @interface RestResource {
/**
* Specifies a list of {@link Serializer} classes to add to the list of serializers available for this servlet.
+ *
* <p>
* This annotation can only be used on {@link Serializer} classes that have no-arg constructors.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addSerializers(Class...)}/
* {@link RestConfig#addSerializers(Serializer...)} methods.
@@ -216,8 +244,10 @@ public @interface RestResource {
/**
* Specifies a list of {@link Parser} classes to add to the list of parsers available for this servlet.
+ *
* <p>
* This annotation can only be used on {@link Parser} classes that have no-arg constructors.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addParsers(Class...)}/
* {@link RestConfig#addParsers(Parser...)} methods.
@@ -227,8 +257,10 @@ public @interface RestResource {
/**
* Specifies a list of {@link ResponseHandler} classes that know how to convert POJOs returned by REST methods or
* set via {@link RestResponse#setOutput(Object)} into appropriate HTTP responses.
+ *
* <p>
* See {@link ResponseHandler} for details.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addResponseHandlers(Class...)}/
* {@link RestConfig#addResponseHandlers(ResponseHandler...)} methods.
@@ -237,8 +269,10 @@ public @interface RestResource {
/**
* Specifies a list of {@link Encoder} to associate with this servlet.
+ *
* <p>
* These can be used to enable various kinds of compression (e.g. <js>"gzip"</js>) on requests and responses.
+ *
* <p>
* This annotation can only be used on {@link Encoder} classes that have no-arg constructors.
*
@@ -250,6 +284,7 @@ public @interface RestResource {
* ...
* }
* </p>
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addEncoders(Class...)}/
* {@link RestConfig#addEncoders(Encoder...)} methods.
@@ -258,13 +293,17 @@ public @interface RestResource {
/**
* Specifies default values for request headers.
+ *
* <p>
* Strings are of the format <js>"Header-Name: header-value"</js>.
+ *
* <p>
* Affects values returned by {@link RestRequest#getHeader(String)} when the header is not present on the request.
+ *
* <p>
* The most useful reason for this annotation is to provide a default <code>Accept</code> header when one is not
* specified so that a particular default {@link Serializer} is picked.
+ *
* <p>
* Only one header value can be specified per entry (i.e. it's not a delimited list of header entries).
*
@@ -276,6 +315,7 @@ public @interface RestResource {
* ...
* }
* </p>
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addDefaultRequestHeader(String, Object)}/
* {@link RestConfig#addDefaultRequestHeaders(String...)} methods.
@@ -284,13 +324,17 @@ public @interface RestResource {
/**
* Specifies default values for response headers.
+ *
* <p>
* Strings are of the format <js>"Header-Name: header-value"</js>.
+ *
* <p>
* This is equivalent to calling {@link RestResponse#setHeader(String, String)} programmatically in each of the Java
* methods.
+ *
* <p>
* The header value will not be set if the header value has already been specified (hence the 'default' in the name).
+ *
* <p>
* Only one header value can be specified per entry (i.e. it's not a delimited list of header entries).
*
@@ -302,6 +346,7 @@ public @interface RestResource {
* ...
* }
* </p>
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addDefaultResponseHeader(String, Object)}/
* {@link RestConfig#addDefaultResponseHeaders(String...)} methods.
@@ -310,6 +355,7 @@ public @interface RestResource {
/**
* Defines children of this resource.
+ *
* <p>
* A REST child resource is simply another servlet that is initialized as part of the parent resource and has a
* servlet path directly under the parent servlet path.
@@ -317,9 +363,11 @@ public @interface RestResource {
* <code>web.xml</code> file of the web application.
* This can cut down on the number of entries that show up in the <code>web.xml</code> file if you are defining
* large numbers of servlets.
+ *
* <p>
* Child resources must specify a value for {@link #path()} that identifies the subpath of the child resource
* relative to the parent path.
+ *
* <p>
* It should be noted that servlets can be nested arbitrarily deep using this technique (i.e. children can also have
* children).
@@ -347,6 +395,7 @@ public @interface RestResource {
* </p>
* </dd>
* </dl>
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addChildResource(String, Object)}/
* {@link RestConfig#addChildResources(Class...)}/{@link RestConfig#addChildResources(Object...)} methods.
@@ -355,13 +404,16 @@ public @interface RestResource {
/**
* Identifies the URL subpath relative to the parent resource.
+ *
* <p>
* Typically, this annotation is only applicable to resources defined as children through the {@link #children()}
* annotation.
* However, it may be used in other ways (e.g. defining paths for top-level resources in microservices).
+ *
* <p>
* This annotation is ignored on top-level servlets (i.e. servlets defined in <code>web.xml</code> files).
* Therefore, implementers can optionally specify a path value for documentation purposes.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#setPath(String)} method.
*/
@@ -369,16 +421,21 @@ public @interface RestResource {
/**
* Optional servlet title.
+ *
* <p>
* It is used to populate the Swagger title field and as a default value for the {@link HtmlDoc#title()} value.
* This value can be retrieved programmatically through the {@link RestRequest#getServletTitle()} method.
+ *
* <p>
* The default value pulls the label from the <code>label</code> entry in the servlet resource bundle.
* (e.g. <js>"title = foo"</js> or <js>"MyServlet.title = foo"</js>).
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/info/title</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTitle(RestRequest)} method.
*/
@@ -386,17 +443,22 @@ public @interface RestResource {
/**
* Optional servlet description.
+ *
* <p>
* It is used to populate the Swagger description field and as a default value for the {@link HtmlDoc#description()}
* value.
* This value can be retrieved programmatically through the {@link RestRequest#getServletDescription()} method.
+ *
* <p>
* The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
* (e.g. <js>"description = foo"</js> or <js>"MyServlet.description = foo"</js>).
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/info/description</code>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestInfoProvider#getDescription(RestRequest)} method.
*/
@@ -404,10 +466,13 @@ public @interface RestResource {
/**
* Optional location of configuration file for this servlet.
+ *
* <p>
* The configuration file .
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#setConfigFile(ConfigFile)} method.
*/
@@ -415,9 +480,11 @@ public @interface RestResource {
/**
* The stylesheet to use for HTML views.
+ *
* <p>
* The name is a path to a stylesheet located in either the classpath or working directory.
* The resulting stylesheet becomes available through the servlet via the URL <js>"[servlet-path]/style.css"</js>.
+ *
* <p>
* The default set of styles located in the <code>org.apache.juneau.rest.styles</code> package are:
* <ul class='spaced-list'>
@@ -426,15 +493,18 @@ public @interface RestResource {
* <li>
* <js>"styles/devops.css"</js> - Theme based on IBM DevOps look-and-feel.
* </ul>
+ *
* <p>
* The classpath search starts with the child servlet class and proceeds up the class hierarchy chain.
* Since the {@link RestServlet} class is in the <code>org.apache.juneau.rest</code> package and the predefined
* styles are in the <code>org.apache.juneau.rest.styles</code> package, the paths to the predefined styles are
* prefixed with <js>"styles/"</js>.
+ *
* <p>
* If the stylesheet cannot be found on the classpath, an attempt to look in the working directory for it will be
* made.
* This allows for stylesheets to be placed on the file system in the working directory.
+ *
* <p>
* If the file cannot be located, the request to <js>"[servlet-path]/style.css"</js> will return
* {@link HttpServletResponse#SC_NOT_FOUND}.
@@ -449,6 +519,7 @@ public @interface RestResource {
* <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault {
* }
* </p>
+ *
* <p>
* In this example, the servlet will attempt to find the <code>mycss.css</code> file in the following ordered
* locations:
@@ -459,10 +530,12 @@ public @interface RestResource {
* <code>org.apache.juneau.rest</code>).
* <li><code>[working-dir]/mystyles</code> directory.
* </ol>
+ *
* <p>
* Multiple stylesheets can be specified as a comma-delimited list.
* When multiple stylesheets are specified, their contents will be concatenated and return in the order specified
* in the list.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#addStyleSheet(Object...)}/
* {@link RestConfig#addStyleSheet(Class, String)} methods.
@@ -471,10 +544,12 @@ public @interface RestResource {
/**
* The favicon to use for HTML views.
+ *
* <p>
* The name is a path to an icon file located in either the classpath or working directory in a similar way to how
* the {@link #stylesheet()} stylesheet is resolved.
* The resulting favicon becomes available in the servlet via the URL <js>"[servlet-path]/favicon.ico"</js>.
+ *
* <p>
* If the file cannot be located, the request to <js>"[servlet-path]/favicon.ico"</js> will return
* {@link HttpServletResponse#SC_NOT_FOUND}.
@@ -489,16 +564,17 @@ public @interface RestResource {
* <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault {
* }
* </p>
+ *
* <p>
* In this example, the servlet will attempt to find the <code>myicon.ico</code> file in the following ordered
* locations:
- * </p>
* <ol>
* <li><code>com.foo.mypackage.mydocs</code> package.
* <li><code>org.apache.juneau.rest.mydocs</code> package (since <code>RestServletDefault</code> is in
* <code>org.apache.juneau.rest</code>).
* <li><code>[working-dir]/mydocs</code> directory.
* </ol>
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#setFavIcon(Object)}/
* {@link RestConfig#setFavIcon(Class, String)} methods.
@@ -507,10 +583,13 @@ public @interface RestResource {
/**
* Defines paths and locations of statically served files.
+ *
* <p>
* This is a JSON map of paths to packages/directories located on either the classpath or working directory.
+ *
* <p>
* Mappings are cumulative from parent to child. Child resources can override mappings made on parent resources.
+ *
* <p>
* If the file cannot be located, the request will return {@link HttpServletResponse#SC_NOT_FOUND}.
*
@@ -525,16 +604,17 @@ public @interface RestResource {
* <jk>public class</jk> MyResource <jk>extends</jk> RestServletDefault {
* }
* </p>
+ *
* <p>
* In this example, given a GET request to <code>/myresource/htdocs/foobar.html</code>, the servlet will attempt to
* find the <code>foobar.html</code> file in the following ordered locations:
- * </p>
* <ol>
* <li><code>com.foo.mypackage.docs</code> package.
* <li><code>org.apache.juneau.rest.docs</code> package (since <code>RestServletDefault</code> is in
* <code>org.apache.juneau.rest</code>).
* <li><code>[working-dir]/docs</code> directory.
* </ol>
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#addStaticFiles(Class, String)} method.
*/
@@ -542,11 +622,14 @@ public @interface RestResource {
/**
* Specifies the HTTP header name used to identify the client version.
+ *
* <p>
* The client version is used to support backwards compatibility for breaking REST interface changes.
* Used in conjunction with {@link RestMethod#clientVersion()} annotation.
+ *
* <p>
* If not specified, uses <js>"X-Client-Version"</js>.
+ *
* <p>
* The programmatic equivalent to this annotation is the {@link RestConfig#setClientVersionHeader(String)} method.
*/
@@ -554,14 +637,18 @@ public @interface RestResource {
/**
* Specifies the resolver class to use for resolving child resources by class name.
+ *
* <p>
* The default implementation simply instantiates the class using one of the following constructors:
* <ul>
* <li><code><jk>public</jk> T(RestConfig)</code>
* <li><code><jk>public</jk> T()</code>
* </ul>
+ *
+ * <p>
* The former constructor can be used to get access to the {@link RestConfig} object to get access to the config
* file and initialization information or make programmatic modifications to the resource before full initialization.
+ *
* <p>
* Non-<code>RestServlet</code> classes can also add the following two methods to get access to the
* {@link RestConfig} and {@link RestContext} objects:
@@ -569,8 +656,10 @@ public @interface RestResource {
* <li><code><jk>public void</jk> init(RestConfig);</code>
* <li><code><jk>public void</jk> init(RestContext);</code>
* </ul>
+ *
* <p>
* Subclasses can be used to provide customized resolution of REST resource class instances.
+ *
* <p>
* The programmatic equivalent to this annotation are the {@link RestConfig#setResourceResolver(Class)}/
* {@link RestConfig#setResourceResolver(RestResourceResolver)} methods.
@@ -579,9 +668,11 @@ public @interface RestResource {
/**
* Specifies the logger class to use for logging.
+ *
* <p>
* The default logger performs basic error logging to the Java logger.
* Subclasses can be used to customize logging behavior on the resource.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setLogger(Class)}/{@link RestConfig#setLogger(RestLogger)} methods.
@@ -590,9 +681,11 @@ public @interface RestResource {
/**
* Specifies the REST call handler class.
+ *
* <p>
* This class handles the basic lifecycle of an HTTP REST call.
* Subclasses can be used to customize how these HTTP calls are handled.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setCallHandler(Class)}/{@link RestConfig#setCallHandler(RestCallHandler)} methods.
@@ -601,8 +694,10 @@ public @interface RestResource {
/**
* Specifies the class used to retrieve title/description/swagger information about a resource.
+ *
* <p>
* Subclasses can be used to customize the documentation on a resource.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setInfoProvider(Class)}/{@link RestConfig#setInfoProvider(RestInfoProvider)} methods.
@@ -622,8 +717,10 @@ public @interface RestResource {
/**
* Defines widgets that can be used in conjunction with string variables of the form <js>"$W{name}"</js>to quickly
* generate arbitrary replacement text.
+ *
* <p>
* Widgets are inherited from parent to child, but can be overridden by reusing the widget name.
+ *
* <p>
* See {@link #htmldoc()} for an example of usage.
*/
@@ -631,6 +728,7 @@ public @interface RestResource {
/**
* Provides swagger-specific metadata on this resource.
+ *
* <p>
* Used to populate the auto-generated OPTIONS swagger documentation.
*
@@ -655,6 +753,7 @@ public @interface RestResource {
/**
* Provides HTML-doc-specific metadata on this method.
+ *
* <p>
* Used to customize the output from the HTML Doc serializer.
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java
index e6d10f9..b7f0dd1 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Introspectable.java
@@ -22,12 +22,15 @@ import org.apache.juneau.utils.*;
/**
* Converter for enablement of {@link PojoIntrospector} support on response objects returned by a
* <code>@RestMethod</code> method.
+ *
* <p>
* When enabled, public methods can be called on objects returned through the {@link RestResponse#setOutput(Object)}
* method.
+ *
* <p>
* Note that opening up public methods for calling through a REST interface can be dangerous, and should be done with
* caution.
+ *
* <p>
* Java methods are invoked by passing in the following URL parameters:
* <ul class='spaced-list'>
@@ -37,6 +40,7 @@ import org.apache.juneau.utils.*;
* <li>
* <code>&invokeArgs</code> - The arguments as a JSON array.
* </ul>
+ *
* <p>
* See {@link PojoIntrospector} for additional information on introspection of POJO methods.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java
index 2f4cd95..ed447c2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Queryable.java
@@ -18,9 +18,11 @@ import org.apache.juneau.utils.*;
/**
* Converter for enabling of {@link PojoQuery} support on response objects returned by a <code>@RestMethod</code> method.
+ *
* <p>
* When enabled, objects in a POJO tree can be filtered using the functionality described in the {@link PojoQuery}
* class.
+ *
* <p>
* The following HTTP request parameters are available for tabular data (e.g. {@code Collections} of {@code Maps},
* arrays of beans, etc...):
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java
index c8ff5be..efcd579 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/converters/Traversable.java
@@ -21,6 +21,7 @@ import org.apache.juneau.utils.*;
/**
* Converter for enabling of {@link PojoRest} support on response objects returned by a <code>@RestMethod</code> method.
+ *
* <p>
* When enabled, objects in a POJO tree returned by the REST method can be addressed through additional URL path
* information.
@@ -39,6 +40,7 @@ import org.apache.juneau.utils.*;
* <jk>int</jk> zip = r.getResponse(Integer.<jk>class</jk>);
* }
* </p>
+ *
* <p>
* See {@link PojoRest} for additional information on addressing elements in a POJO tree using URL notation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
index cd10aa0..01a47d1 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
@@ -30,9 +30,10 @@ import org.apache.juneau.xml.*;
/**
* Subclass of {@link RestServlet} with default sets of serializers and parsers that include RDF support.
+ *
* <p>
* Extends the {@link org.apache.juneau.rest.RestServletDefault} class with additional RDF support.
- * <p>
+ *
* <p>
* Supports the following request <code>Accept</code> header values with the resulting response <code>Content-Type</code>:
* </p>
@@ -200,6 +201,7 @@ import org.apache.juneau.xml.*;
* <td>{@link org.apache.juneau.jena.RdfParser.Turtle}</td>
* </tr>
* </table>
+ *
* <p>
* Note that the list of serializers and parsers can be appended to using the
* {@link RestResource#serializers() @RestResource.serializers()} and
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java
index 130ab25..cbe3d4f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaGroupDefault.java
@@ -18,9 +18,11 @@ import org.apache.juneau.rest.labels.*;
/**
* Specialized subclass of {@link RestServletJenaDefault} for showing "group" pages.
+ *
* <p>
* Group pages consist of simple lists of child resource URLs and their labels.
* They're meant to be used as jumping-off points for child resources.
+ *
* <p>
* Child resources are specified using the {@link RestResource#children()} annotation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java
index fd48db5..96c7904 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/BeanDescription.java
@@ -17,9 +17,11 @@ import org.apache.juneau.annotation.*;
/**
* Simple serializable bean description.
+ *
* <p>
* Given a particular class type, this serializes the class into the fully-qualified class name and the properties
* associated with the class.
+ *
* <p>
* Useful for rendering simple information about a bean during REST OPTIONS requests.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java
index 97b2eac..809203f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ChildResourceDescriptions.java
@@ -18,6 +18,7 @@ import org.apache.juneau.rest.*;
/**
* A POJO structure that describes the list of child resources associated with a resource.
+ *
* <p>
* Typically used in top-level GET methods of router resources to render a list of available child resources.
*/
@@ -40,8 +41,9 @@ public class ChildResourceDescriptions extends LinkedList<ResourceDescription> {
*
* @param context The servlet context that this bean describes.
* @param req The HTTP servlet request.
- * @param sort If <jk>true</jk>, list will be ordered by name alphabetically.
- * Default is to maintain the order as specified in the annotation.
+ * @param sort
+ * If <jk>true</jk>, list will be ordered by name alphabetically.
+ * Default is to maintain the order as specified in the annotation.
*/
public ChildResourceDescriptions(RestContext context, RestRequest req, boolean sort) {
for (Map.Entry<String,RestContext> e : context.getChildResources().entrySet())
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java
index 48d9378..e7ff1cd 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/NameDescription.java
@@ -16,6 +16,7 @@ import org.apache.juneau.annotation.*;
/**
* Simple bean with {@code name} and {@code description} properties.
+ *
* <p>
* Primarily used for constructing tables with name/description columns on REST OPTIONS requests.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java
index 8c92777..c82fed2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java
@@ -18,11 +18,14 @@ import org.apache.juneau.rest.annotation.*;
/**
* Configurable properties for the {@link RemoteableServlet} class.
+ *
* <p>
* Properties can be set on the {@link RestServlet} class using the {@link RestResource#properties} or
* {@link RestMethod#properties} annotations.
+ *
* <p>
* These properties can also be passed in as servlet init parameters.
+ *
* <p>
* These properties are only valid at the class level, not the method level.
* Setting them on {@link RestMethod#properties()} has no effect.
@@ -32,6 +35,7 @@ public final class RemoteableServiceProperties {
/**
* Only expose interfaces and methods annotated with {@link Remoteable @Remoteable} ({@link Boolean},
* default=<jk>false</jk>).
+ *
* <p>
* When enabled, the {@link RemoteableServlet} class will only work with annotated remoteable interfaces and methods.
* Otherwise, all public methods can be executed through the service.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java
index 5df35db..8cb8f96 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java
@@ -25,8 +25,10 @@ import org.apache.juneau.rest.annotation.*;
/**
* Abstract class for defining Remoteable services.
+ *
* <p>
* Remoteable services are POJOs whose methods can be invoked remotely through proxy interfaces.
+ *
* <p>
* To implement a remoteable service, developers must simply subclass from this class and implement the
* {@link #getServiceMap()} method that maps java interfaces to POJO instances.
@@ -44,6 +46,7 @@ public abstract class RemoteableServlet extends RestServletDefault {
/**
* Returns the list of interfaces to their implementation objects.
+ *
* <p>
* This class is called often and not cached, so any caching should occur in the subclass if necessary.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
index 57ecc18..d5362e7 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
@@ -25,10 +25,13 @@ import org.apache.juneau.serializer.*;
/**
* Response handler for POJOs not handled by other handlers.
+ *
* <p>
* This uses the serializers defined on the response to serialize the POJO.
+ *
* <p>
* The {@link Serializer} used is based on the <code>Accept</code> header on the request.
+ *
* <p>
* The <code>Content-Type</code> header is set to the mime-type defined on the selected serializer based on the
* {@link Produces#contentType() @Produces.contentType} annotation.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java
index 96ae45f..a2c91b2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/InputStreamHandler.java
@@ -19,11 +19,12 @@ import org.apache.juneau.utils.*;
/**
* Response handler for {@link InputStream} objects.
+ *
* <p>
* Simply pipes the contents of the {@link InputStream} to {@link RestResponse#getNegotiatedOutputStream()}.
+ *
* <p>
- * Sets the <code>Content-Type</code> response header to whatever was set via
- * {@link RestResponse#setContentType(String)}.
+ * Sets the <code>Content-Type</code> response header to whatever was set via {@link RestResponse#setContentType(String)}.
*/
public final class InputStreamHandler implements ResponseHandler {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java
index d34f280..e231b2c 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ReaderHandler.java
@@ -19,6 +19,7 @@ import org.apache.juneau.utils.*;
/**
* Response handler for {@link Reader} objects.
+ *
* <p>
* Simply pipes the contents of the {@link Reader} to {@link RestResponse#getNegotiatedWriter()}.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java
index f454fa6..1bcc153 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/StreamableHandler.java
@@ -21,6 +21,7 @@ import org.apache.juneau.rest.*;
/**
* Response handler for {@link Writable} and {@link ReaderResource} objects.
+ *
* <p>
* Uses the {@link Writable#writeTo(Writer)} method to send the contents to the
* {@link RestResponse#getNegotiatedWriter()} writer.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java
index 4f1e9e7..46e4a79 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/WritableHandler.java
@@ -21,9 +21,9 @@ import org.apache.juneau.rest.*;
/**
* Response handler for {@link Writable} and {@link ReaderResource} objects.
+ *
* <p>
- * Uses the {@link Writable#writeTo(Writer)} method to send the contents to the
- * {@link RestResponse#getNegotiatedWriter()} writer.
+ * Uses the {@link Writable#writeTo(Writer)} method to send the contents to the {@link RestResponse#getNegotiatedWriter()} writer.
*/
public final class WritableHandler implements ResponseHandler {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java
index bdbf32e..5f895a4 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/response/ZipFileListResponseHandler.java
@@ -22,8 +22,10 @@ import org.apache.juneau.utils.ZipFileList.*;
/**
* Response handler for ZipFileList objects.
+ *
* <p>
* Can be associated with a REST resource using the {@link RestResource#responseHandlers} annotation.
+ *
* <p>
* Sets the following headers:
* <ul class='spaced-list'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java
index c7ecad1..c518793 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/LocalizationVar.java
@@ -19,14 +19,18 @@ import org.apache.juneau.svl.*;
/**
* Localized string variable resolver.
+ *
* <p>
* The format for this var is <js>"$L{key}"</js> or <js>"$L{key,args...}"</js>.
+ *
* <p>
* This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a
* session object on the resolver session.
+ *
* <p>
* Values are pulled from the {@link RestRequest#getMessage(String,Object[])} method.
* These in turn are pulled from the resource bundle associated with the servlet class where the request was made.
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
index c6e8e22..e1a7060 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/RequestVar.java
@@ -19,6 +19,7 @@ import org.apache.juneau.svl.*;
/**
* Request attribute variable resolver.
+ *
* <p>
* The format for this var is <js>"$R{key}"</js>.
* The possible values are:
@@ -35,9 +36,11 @@ import org.apache.juneau.svl.*;
* <li><code>$R{servletPath}</code> - Value returned by {@link RestRequest#getServletPath()}.
* <li><code>$R{servletURI}</code> - Value returned by {@link UriContext#getRootRelativeServletPath()}.
* </ul>
+ *
* <p>
* This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a
* session object on the resolver session.
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java
index da6f78f..a4a297f 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/SerializedRequestAttrVar.java
@@ -22,11 +22,14 @@ import org.apache.juneau.svl.*;
/**
* Serialized request attribute variable resolver.
+ *
* <p>
* The format for this var is <js>"$SA{contentType,key}"</js> or <js>"$SA{contentType,key,defaultValue}"</js>.
+ *
* <p>
* This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a
- * session object on the resolver session.
+ * session object on the resolver session.
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java
index 017d69a..c1b8c8e 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/ServletInitParamVar.java
@@ -17,13 +17,17 @@ import org.apache.juneau.svl.*;
/**
* Servlet init parameter variable resolver.
+ *
* <p>
* The format for this var is <js>"$I{key}"</js> or <js>"$I{key,defaultValue}"</js>.
+ *
* <p>
* This variable resolver requires that a {@link RestRequest} object be set as a context object on the resolver or a
* session object on the resolver session.
+ *
* <p>
* Values are pulled from the {@link RestServlet#getInitParameter(String)} method.
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java
index 13cc05b..698a955 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java
@@ -19,11 +19,14 @@ import org.apache.juneau.svl.*;
/**
* URL-encoding variable resolver.
+ *
* <p>
* The format for this var is <js>"$UE{innerValue}"</js>.
+ *
* <p>
* This variable takes the contents inside the variable and replaces it with a value returned by calling
* {@link StringUtils#urlEncode(String)}).
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java
index 5e3692d..843180d 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlVar.java
@@ -19,9 +19,11 @@ import org.apache.juneau.svl.*;
/**
* Resolver for resolving URL variables <js>"$U{name}"</js>.
+ *
* <p>
* The advantage of using this variable is that you can resolve URLs with special protocols such as
* <js>"servlet:/xxx"</js>.
+ *
* <p>
* See {@link UriResolver} for the kinds of URIs that can be resolved.
* <ul>
@@ -29,6 +31,7 @@ import org.apache.juneau.svl.*;
* <li>{@link RestMethod#widgets() @RestMethod.widgets()}
* <li>{@link RestConfig#addWidget(Class)}
* </ul>
+ *
* <p>
* Uses the URI resolver returned by {@link RestRequest#getUriResolver(UriResolution, UriRelativity)} with resolution
* {@link UriResolution#ROOT_RELATIVE} and relativity {@link UriRelativity#RESOURCE}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java
index 96b16d8..670811a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/WidgetVar.java
@@ -19,8 +19,10 @@ import org.apache.juneau.svl.*;
/**
* Resolver for resolving widget variables <js>"$W{name}"</js>.
+ *
* <p>
* Widgets are simple class that produce some sort of string based on a passed-in HTTP request.
+ *
* <p>
* They're registered via the following mechanisms:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java
index 1440d80..7ef4982 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksColumnWidget.java
@@ -24,6 +24,7 @@ import org.apache.juneau.rest.*;
/**
* Widget that returns back a list of hyperlinks for rendering the contents of a page in a variety of content types.
+ *
* <p>
* The variable it resolves is <js>"$W{contentTypeLinksColumn}"</js>.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java
index d6cbde9..d395028 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/ContentTypeLinksRowWidget.java
@@ -24,6 +24,7 @@ import org.apache.juneau.rest.*;
/**
* Widget that returns back a list of hyperlinks for rendering the contents of a page in a variety of content types.
+ *
* <p>
* The variable it resolves is <js>"$W{contentTypeLinksRow}"</js>.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java
index 205dae3..e322439 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByApacheWidget.java
@@ -16,6 +16,7 @@ import org.apache.juneau.rest.*;
/**
* Widget that places a powered-by-Apache message on the page.
+ *
* <p>
* The variable it resolves is <js>"$W{poweredByApache}"</js>.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java
index 4ae2898..f42f0c5 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/PoweredByJuneauWidget.java
@@ -16,6 +16,7 @@ import org.apache.juneau.rest.*;
/**
* Widget that places a powered-by-Juneau message on the page.
+ *
* <p>
* The variable it resolves is <js>"$W{poweredByJuneau}"</js>.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java
index fcfba72..c0efeb2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/QueryWidget.java
@@ -18,6 +18,7 @@ import org.apache.juneau.rest.converters.*;
/**
* Adds a <code>QUERY</code> link to the page that allows you to perform search/view/sort/paging on the page data.
+ *
* <p>
* A typical usage of the query widget is to include it as a navigation link as shown in the example below
* pulled from the <code>PetStoreResource</code> example:
@@ -31,20 +32,23 @@ import org.apache.juneau.rest.converters.*;
* )
* )
* </p>
+ *
* <p>
* In the above example, this adds a <code>QUERY</code> that displays a search popup that can be used for filtering the
* page results...
- * <p>
* <img class='bordered' src='doc-files/PetStore_Query.png'>
+ *
* <p>
* Tooltips are provided by hovering over the field names.
- * <p>
* <img class='bordered' src='doc-files/PetStore_Query_tooltip.png'>
+ *
* <p>
* When submitted, the form submits a GET request against the current URI with special GET search API query parameters.
* (e.g. <js>"?s=column1=Foo*&v=column1,column2&o=column1,column2-&p=100&l=100"</js>).
+ *
* <p>
* The search arguments can be retrieved programmatically using {@link RequestQuery#getSearchArgs()}.
+ *
* <p>
* Typically, the search functionality is implemented by applying the predefined {@link Queryable} converter on the
* method that's returning a 2-dimensional table of POJOs that you wish to filter:
@@ -56,6 +60,7 @@ import org.apache.juneau.rest.converters.*;
* )
* <jk>public</jk> Collection<Pet> getPets() {
* </p>
+ *
* <p>
* The following shows various search arguments and their results on the page:
* <table style='width:auto'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java
index 281636a..9ef5fb6 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/widget/Widget.java
@@ -17,6 +17,7 @@ import org.apache.juneau.rest.annotation.*;
/**
* Defines an interface for defining resolvers for <js>"$W{...}"</js> string variables.
+ *
* <p>
* Widgets are associated with resources through the following
* <ul>
@@ -30,8 +31,9 @@ public abstract class Widget {
/**
* The widget key (i.e. The contents of the <js>"$W{...}"</js> variable).
*
- * @return The widget key.
- * Must not be <jk>null</jk>.
+ * @return
+ * The widget key.
+ * Must not be <jk>null</jk>.
*/
public abstract String getName();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8206b49..e5f9e96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -177,7 +177,7 @@
<overview>${basedir}/juneau-core/src/main/javadoc/overview.html</overview>
<stylesheetfile>${basedir}/juneau-core/src/main/javadoc/javadoc.css</stylesheetfile>
<use>false</use>
- <additionalparam>-sourcetab 3 -notimestamp -Xdoclint:none</additionalparam>
+ <additionalparam>-sourcetab 3 -notimestamp -Xdoclint:none --allow-script-in-comments</additionalparam>
<verbose>false</verbose>
<excludePackageNames>*proto*:*samples*:*examples*:*test*</excludePackageNames>
<linksource>true</linksource>
[11/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
Clean up javadocs
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/f400b0c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/f400b0c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/f400b0c0
Branch: refs/heads/master
Commit: f400b0c0f0b7b050c793f428101f55d2b29eac2c
Parents: 19c566d
Author: JamesBognar <ja...@apache.org>
Authored: Wed Jun 28 19:37:00 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Wed Jun 28 19:37:00 2017 -0400
----------------------------------------------------------------------
.../java/org/apache/juneau/jena/Constants.java | 6 +
.../apache/juneau/jena/RdfBeanPropertyMeta.java | 1 +
.../org/apache/juneau/jena/RdfClassMeta.java | 1 +
.../apache/juneau/jena/RdfCollectionFormat.java | 2 +
.../apache/juneau/jena/RdfCommonContext.java | 101 ++-
.../java/org/apache/juneau/jena/RdfParser.java | 6 +-
.../apache/juneau/jena/RdfParserBuilder.java | 29 +-
.../apache/juneau/jena/RdfParserContext.java | 6 +-
.../apache/juneau/jena/RdfParserSession.java | 41 +-
.../org/apache/juneau/jena/RdfSerializer.java | 6 +-
.../juneau/jena/RdfSerializerBuilder.java | 31 +-
.../juneau/jena/RdfSerializerContext.java | 25 +-
.../juneau/jena/RdfSerializerSession.java | 30 +-
.../java/org/apache/juneau/jena/RdfUtils.java | 2 +
.../org/apache/juneau/jena/annotation/Rdf.java | 14 +-
.../apache/juneau/jena/annotation/RdfNs.java | 1 +
.../juneau/jena/annotation/RdfSchema.java | 21 +-
.../java/org/apache/juneau/BeanContext.java | 39 -
.../main/java/org/apache/juneau/BeanMap.java | 6 +-
.../main/java/org/apache/juneau/BeanMeta.java | 4 +-
.../org/apache/juneau/CoreObjectBuilder.java | 32 -
.../java/org/apache/juneau/PropertyStore.java | 8 +-
.../org/apache/juneau/annotation/Consumes.java | 4 +-
.../org/apache/juneau/annotation/Produces.java | 4 +-
.../org/apache/juneau/dto/cognos/DataSet.java | 2 +-
.../org/apache/juneau/encoders/Encoder.java | 1 -
.../apache/juneau/encoders/EncoderGroup.java | 3 +-
.../apache/juneau/html/HtmlDocSerializer.java | 8 +-
.../juneau/html/HtmlDocSerializerContext.java | 13 -
.../java/org/apache/juneau/html/HtmlParser.java | 6 +-
.../juneau/html/HtmlSchemaDocSerializer.java | 4 +-
.../org/apache/juneau/html/HtmlSerializer.java | 8 +-
.../juneau/html/HtmlSerializerBuilder.java | 5 -
.../juneau/html/HtmlSerializerContext.java | 6 -
.../juneau/html/HtmlStrippedDocSerializer.java | 4 +-
.../java/org/apache/juneau/http/MediaType.java | 1 -
.../java/org/apache/juneau/ini/ConfigFile.java | 227 +++--
.../apache/juneau/ini/ConfigFileBuilder.java | 13 +-
.../org/apache/juneau/ini/ConfigFileImpl.java | 36 +-
.../apache/juneau/ini/ConfigFileListener.java | 1 +
.../apache/juneau/ini/ConfigFileWrapped.java | 6 +-
.../org/apache/juneau/ini/EntryListener.java | 1 +
.../org/apache/juneau/ini/SectionListener.java | 1 +
.../java/org/apache/juneau/ini/XorEncoder.java | 1 +
.../org/apache/juneau/internal/ArrayUtils.java | 46 +-
.../apache/juneau/internal/ByteArrayCache.java | 12 +-
.../java/org/apache/juneau/internal/Cache.java | 6 +-
.../org/apache/juneau/internal/ClassUtils.java | 49 +-
.../apache/juneau/internal/CollectionUtils.java | 2 +
.../org/apache/juneau/internal/DateUtils.java | 39 +-
.../apache/juneau/internal/DelegateBeanMap.java | 2 +
.../org/apache/juneau/internal/DelegateMap.java | 1 +
.../org/apache/juneau/internal/FileUtils.java | 9 +
.../org/apache/juneau/internal/HashCode.java | 11 +-
.../org/apache/juneau/internal/IOUtils.java | 41 +-
.../apache/juneau/internal/IdentityList.java | 2 +
.../apache/juneau/internal/JuneauLogger.java | 33 +-
.../org/apache/juneau/internal/KeywordSet.java | 1 +
.../apache/juneau/internal/MultiIterable.java | 1 +
.../org/apache/juneau/internal/ObjectUtils.java | 2 +
.../apache/juneau/internal/ReflectionUtils.java | 9 +-
.../org/apache/juneau/internal/SimpleMap.java | 3 +
.../juneau/internal/StringBuilderWriter.java | 7 +-
.../org/apache/juneau/internal/StringUtils.java | 96 ++-
.../apache/juneau/internal/TeeOutputStream.java | 4 +-
.../org/apache/juneau/internal/TeeWriter.java | 4 +-
.../java/org/apache/juneau/internal/Utils.java | 7 +-
.../org/apache/juneau/internal/Version.java | 23 +-
.../apache/juneau/internal/VersionRange.java | 1 +
.../java/org/apache/juneau/jso/JsoParser.java | 2 +-
.../org/apache/juneau/jso/JsoSerializer.java | 3 +-
.../java/org/apache/juneau/json/JsonParser.java | 12 +-
.../apache/juneau/json/JsonParserContext.java | 3 +
.../apache/juneau/json/JsonParserSession.java | 40 +-
.../juneau/json/JsonSchemaSerializer.java | 4 +-
.../org/apache/juneau/json/JsonSerializer.java | 27 +-
.../juneau/json/JsonSerializerBuilder.java | 6 +-
.../juneau/json/JsonSerializerContext.java | 17 +-
.../juneau/json/JsonSerializerSession.java | 30 +-
.../org/apache/juneau/json/annotation/Json.java | 8 +-
.../juneau/msgpack/MsgPackInputStream.java | 4 +
.../apache/juneau/msgpack/MsgPackParser.java | 4 +-
.../juneau/msgpack/MsgPackParserContext.java | 3 +
.../juneau/msgpack/MsgPackParserSession.java | 39 +-
.../juneau/msgpack/MsgPackSerializer.java | 10 +-
.../msgpack/MsgPackSerializerContext.java | 7 +-
.../msgpack/MsgPackSerializerSession.java | 30 +-
.../apache/juneau/parser/InputStreamParser.java | 5 +-
.../apache/juneau/parser/ParseException.java | 2 +
.../java/org/apache/juneau/parser/Parser.java | 192 +++--
.../org/apache/juneau/parser/ParserBuilder.java | 21 +-
.../org/apache/juneau/parser/ParserContext.java | 21 +-
.../org/apache/juneau/parser/ParserGroup.java | 21 +-
.../juneau/parser/ParserGroupBuilder.java | 8 +-
.../apache/juneau/parser/ParserListener.java | 20 +-
.../org/apache/juneau/parser/ParserReader.java | 31 +-
.../org/apache/juneau/parser/ParserSession.java | 80 +-
.../org/apache/juneau/parser/PartParser.java | 9 +-
.../org/apache/juneau/parser/ReaderParser.java | 5 +-
.../juneau/plaintext/PlainTextParser.java | 12 +-
.../juneau/plaintext/PlainTextSerializer.java | 8 +-
.../java/org/apache/juneau/remoteable/Body.java | 5 +-
.../org/apache/juneau/remoteable/FormData.java | 13 +-
.../apache/juneau/remoteable/FormDataIfNE.java | 2 +
.../org/apache/juneau/remoteable/Header.java | 10 +-
.../apache/juneau/remoteable/HeaderIfNE.java | 2 +
.../java/org/apache/juneau/remoteable/Path.java | 9 +-
.../org/apache/juneau/remoteable/Query.java | 9 +
.../org/apache/juneau/remoteable/QueryIfNE.java | 2 +
.../apache/juneau/remoteable/RemoteMethod.java | 5 +
.../juneau/remoteable/RemoteMethodArg.java | 6 +-
.../apache/juneau/remoteable/Remoteable.java | 4 +
.../juneau/remoteable/RemoteableMeta.java | 5 +-
.../juneau/remoteable/RemoteableMethodMeta.java | 1 +
.../apache/juneau/remoteable/RequestBean.java | 2 +
.../serializer/OutputStreamSerializer.java | 5 +-
.../juneau/serializer/PartSerializer.java | 3 +
.../apache/juneau/serializer/Serializer.java | 148 ++--
.../juneau/serializer/SerializerBuilder.java | 71 +-
.../juneau/serializer/SerializerContext.java | 82 +-
.../juneau/serializer/SerializerGroup.java | 23 +-
.../serializer/SerializerGroupBuilder.java | 4 +
.../juneau/serializer/SerializerSession.java | 112 ++-
.../juneau/serializer/SerializerWriter.java | 10 +-
.../juneau/serializer/WriterSerializer.java | 10 +-
.../apache/juneau/soap/SoapXmlSerializer.java | 7 +-
.../juneau/soap/SoapXmlSerializerBuilder.java | 2 +-
.../juneau/soap/SoapXmlSerializerContext.java | 2 +-
.../org/apache/juneau/svl/DefaultingVar.java | 4 +-
.../org/apache/juneau/svl/MultipartVar.java | 1 +
.../java/org/apache/juneau/svl/SimpleVar.java | 2 +
.../java/org/apache/juneau/svl/StreamedVar.java | 2 +
.../main/java/org/apache/juneau/svl/Var.java | 15 +-
.../java/org/apache/juneau/svl/VarResolver.java | 24 +-
.../apache/juneau/svl/VarResolverBuilder.java | 8 +-
.../apache/juneau/svl/VarResolverContext.java | 1 +
.../apache/juneau/svl/VarResolverSession.java | 20 +-
.../org/apache/juneau/svl/vars/ArgsVar.java | 3 +
.../apache/juneau/svl/vars/ConfigFileVar.java | 3 +
.../apache/juneau/svl/vars/EnvVariablesVar.java | 2 +
.../java/org/apache/juneau/svl/vars/IfVar.java | 3 +
.../apache/juneau/svl/vars/ManifestFileVar.java | 3 +
.../org/apache/juneau/svl/vars/SwitchVar.java | 3 +
.../juneau/svl/vars/SystemPropertiesVar.java | 2 +
.../transform/AnnotationBeanFilterBuilder.java | 5 +-
.../org/apache/juneau/transform/BeanFilter.java | 8 +-
.../juneau/transform/BeanFilterBuilder.java | 9 +
.../transform/InterfaceBeanFilterBuilder.java | 1 +
.../org/apache/juneau/transform/PojoSwap.java | 53 +-
.../apache/juneau/transform/SurrogateSwap.java | 8 +
.../juneau/transforms/BeanStringSwap.java | 2 +
.../apache/juneau/transforms/CalendarSwap.java | 38 +-
.../org/apache/juneau/transforms/DateSwap.java | 32 +-
.../juneau/transforms/EnumerationSwap.java | 1 +
.../apache/juneau/transforms/IteratorSwap.java | 1 +
.../apache/juneau/transforms/ReaderSwap.java | 6 +-
.../transforms/XMLGregorianCalendarSwap.java | 2 +
.../java/org/apache/juneau/uon/UonParser.java | 13 +-
.../org/apache/juneau/uon/UonParserBuilder.java | 3 +-
.../org/apache/juneau/uon/UonParserContext.java | 6 +-
.../org/apache/juneau/uon/UonParserSession.java | 58 +-
.../java/org/apache/juneau/uon/UonReader.java | 2 +
.../org/apache/juneau/uon/UonSerializer.java | 19 +-
.../apache/juneau/uon/UonSerializerBuilder.java | 4 +-
.../apache/juneau/uon/UonSerializerContext.java | 15 +-
.../apache/juneau/uon/UonSerializerSession.java | 26 +-
.../java/org/apache/juneau/uon/UonUtils.java | 1 +
.../juneau/urlencoding/UrlEncodingContext.java | 6 +-
.../juneau/urlencoding/UrlEncodingParser.java | 9 +-
.../urlencoding/UrlEncodingParserBuilder.java | 5 +-
.../urlencoding/UrlEncodingParserContext.java | 3 +
.../urlencoding/UrlEncodingParserSession.java | 25 +-
.../urlencoding/UrlEncodingSerializer.java | 39 +-
.../UrlEncodingSerializerBuilder.java | 9 +-
.../UrlEncodingSerializerContext.java | 3 +
.../UrlEncodingSerializerSession.java | 19 +-
.../urlencoding/annotation/UrlEncoding.java | 1 +
.../java/org/apache/juneau/utils/AList.java | 1 +
.../main/java/org/apache/juneau/utils/AMap.java | 1 +
.../main/java/org/apache/juneau/utils/ASet.java | 1 +
.../main/java/org/apache/juneau/utils/Args.java | 9 +
.../java/org/apache/juneau/utils/IOPipe.java | 4 +
.../org/apache/juneau/utils/ManifestFile.java | 1 +
.../org/apache/juneau/utils/MessageBundle.java | 42 +-
.../org/apache/juneau/utils/MetadataMap.java | 2 +
.../org/apache/juneau/utils/ObjectUtils.java | 8 +-
.../apache/juneau/utils/PojoIntrospector.java | 74 +-
.../java/org/apache/juneau/utils/PojoQuery.java | 37 +-
.../java/org/apache/juneau/utils/PojoRest.java | 122 ++-
.../apache/juneau/utils/PojoRestException.java | 3 +
.../org/apache/juneau/utils/ProcBuilder.java | 23 +
.../org/apache/juneau/utils/SearchArgs.java | 59 +-
.../org/apache/juneau/utils/StringMessage.java | 1 +
.../org/apache/juneau/utils/StringObject.java | 2 +
.../org/apache/juneau/utils/ZipFileList.java | 1 +
.../java/org/apache/juneau/xml/Namespace.java | 6 +-
.../org/apache/juneau/xml/NamespaceFactory.java | 3 +
.../java/org/apache/juneau/xml/XmlBeanMeta.java | 8 +-
.../apache/juneau/xml/XmlBeanPropertyMeta.java | 1 +
.../org/apache/juneau/xml/XmlClassMeta.java | 5 +-
.../org/apache/juneau/xml/XmlDocSerializer.java | 5 +-
.../java/org/apache/juneau/xml/XmlParser.java | 6 +-
.../org/apache/juneau/xml/XmlParserBuilder.java | 23 +-
.../org/apache/juneau/xml/XmlParserContext.java | 19 +-
.../org/apache/juneau/xml/XmlParserSession.java | 57 +-
.../juneau/xml/XmlSchemaDocSerializer.java | 5 +-
.../apache/juneau/xml/XmlSchemaSerializer.java | 14 +-
.../org/apache/juneau/xml/XmlSerializer.java | 18 +-
.../apache/juneau/xml/XmlSerializerBuilder.java | 22 +-
.../apache/juneau/xml/XmlSerializerContext.java | 29 +-
.../apache/juneau/xml/XmlSerializerSession.java | 27 +-
.../java/org/apache/juneau/xml/XmlUtils.java | 13 +-
.../java/org/apache/juneau/xml/XmlWriter.java | 8 +-
.../org/apache/juneau/xml/annotation/Xml.java | 14 +-
.../apache/juneau/xml/annotation/XmlFormat.java | 35 +-
.../org/apache/juneau/xml/annotation/XmlNs.java | 1 +
.../apache/juneau/xml/annotation/XmlSchema.java | 5 +
.../juneau/microservice/Microservice.java | 43 +-
.../apache/juneau/microservice/Resource.java | 1 +
.../juneau/microservice/ResourceGroup.java | 1 +
.../juneau/microservice/RestMicroservice.java | 31 +-
.../resources/DirectoryResource.java | 31 +-
.../resources/LogEntryFormatter.java | 43 +-
.../microservice/resources/LogParser.java | 8 +-
.../eclipse-preferences/user-dictionary.txt | 828 +++++++++----------
.../apache/juneau/rest/client/DateHeader.java | 1 +
.../juneau/rest/client/NameValuePairs.java | 3 +
.../juneau/rest/client/ResponsePattern.java | 3 +-
.../rest/client/SerializedNameValuePair.java | 4 +-
.../apache/juneau/rest/jaxrs/BaseProvider.java | 4 +-
.../juneau/rest/jaxrs/JuneauProvider.java | 14 +-
.../java/org/apache/juneau/rest/CallRouter.java | 2 +
.../juneau/rest/ClientVersionMatcher.java | 6 +-
.../org/apache/juneau/rest/ReaderResource.java | 65 +-
.../java/org/apache/juneau/rest/Redirect.java | 56 +-
.../org/apache/juneau/rest/RequestBody.java | 45 +-
.../org/apache/juneau/rest/RequestFormData.java | 36 +-
.../org/apache/juneau/rest/RequestHeaders.java | 53 +-
.../apache/juneau/rest/RequestPathMatch.java | 22 +-
.../org/apache/juneau/rest/RequestQuery.java | 89 +-
.../org/apache/juneau/rest/ResponseHandler.java | 15 +-
.../org/apache/juneau/rest/RestCallHandler.java | 17 +
.../java/org/apache/juneau/rest/RestConfig.java | 199 ++++-
.../org/apache/juneau/rest/RestContext.java | 130 ++-
.../org/apache/juneau/rest/RestConverter.java | 13 +-
.../org/apache/juneau/rest/RestException.java | 15 +-
.../java/org/apache/juneau/rest/RestGuard.java | 15 +-
.../apache/juneau/rest/RestInfoProvider.java | 55 +-
.../java/org/apache/juneau/rest/RestLogger.java | 20 +-
.../org/apache/juneau/rest/RestMatcher.java | 4 +
.../juneau/rest/RestMatcherReflecting.java | 1 +
.../java/org/apache/juneau/rest/RestParam.java | 7 +-
.../org/apache/juneau/rest/RestRequest.java | 47 +-
.../juneau/rest/RestResourceResolver.java | 8 +
.../org/apache/juneau/rest/RestResponse.java | 207 +++--
.../org/apache/juneau/rest/RestServlet.java | 17 +
.../apache/juneau/rest/RestServletDefault.java | 10 +-
.../juneau/rest/RestServletGroupDefault.java | 2 +
.../java/org/apache/juneau/rest/RestUtils.java | 1 +
.../org/apache/juneau/rest/StreamResource.java | 66 +-
.../org/apache/juneau/rest/UrlPathPattern.java | 10 +-
.../org/apache/juneau/rest/annotation/Body.java | 4 +-
.../apache/juneau/rest/annotation/FormData.java | 20 +-
.../juneau/rest/annotation/HasFormData.java | 8 +-
.../apache/juneau/rest/annotation/HasQuery.java | 4 +-
.../apache/juneau/rest/annotation/Header.java | 3 +-
.../apache/juneau/rest/annotation/HtmlDoc.java | 66 +-
.../apache/juneau/rest/annotation/Messages.java | 3 +-
.../apache/juneau/rest/annotation/Method.java | 3 +-
.../juneau/rest/annotation/MethodSwagger.java | 27 +
.../juneau/rest/annotation/Parameter.java | 17 +-
.../org/apache/juneau/rest/annotation/Path.java | 9 +-
.../juneau/rest/annotation/PathRemainder.java | 2 +-
.../juneau/rest/annotation/Properties.java | 3 +
.../apache/juneau/rest/annotation/Property.java | 3 +
.../apache/juneau/rest/annotation/Query.java | 8 +-
.../juneau/rest/annotation/ResourceSwagger.java | 29 +
.../apache/juneau/rest/annotation/Response.java | 5 +
.../juneau/rest/annotation/RestMethod.java | 87 +-
.../juneau/rest/annotation/RestResource.java | 103 ++-
.../juneau/rest/converters/Introspectable.java | 4 +
.../juneau/rest/converters/Queryable.java | 2 +
.../juneau/rest/converters/Traversable.java | 2 +
.../rest/jena/RestServletJenaDefault.java | 4 +-
.../rest/jena/RestServletJenaGroupDefault.java | 2 +
.../juneau/rest/labels/BeanDescription.java | 2 +
.../rest/labels/ChildResourceDescriptions.java | 6 +-
.../juneau/rest/labels/NameDescription.java | 1 +
.../remoteable/RemoteableServiceProperties.java | 4 +
.../rest/remoteable/RemoteableServlet.java | 3 +
.../juneau/rest/response/DefaultHandler.java | 3 +
.../rest/response/InputStreamHandler.java | 5 +-
.../juneau/rest/response/ReaderHandler.java | 1 +
.../juneau/rest/response/StreamableHandler.java | 1 +
.../juneau/rest/response/WritableHandler.java | 4 +-
.../response/ZipFileListResponseHandler.java | 2 +
.../juneau/rest/vars/LocalizationVar.java | 4 +
.../org/apache/juneau/rest/vars/RequestVar.java | 3 +
.../rest/vars/SerializedRequestAttrVar.java | 5 +-
.../juneau/rest/vars/ServletInitParamVar.java | 4 +
.../apache/juneau/rest/vars/UrlEncodeVar.java | 3 +
.../org/apache/juneau/rest/vars/UrlVar.java | 3 +
.../org/apache/juneau/rest/vars/WidgetVar.java | 2 +
.../widget/ContentTypeLinksColumnWidget.java | 1 +
.../rest/widget/ContentTypeLinksRowWidget.java | 1 +
.../rest/widget/PoweredByApacheWidget.java | 1 +
.../rest/widget/PoweredByJuneauWidget.java | 1 +
.../apache/juneau/rest/widget/QueryWidget.java | 9 +-
.../org/apache/juneau/rest/widget/Widget.java | 6 +-
pom.xml | 2 +-
310 files changed, 4252 insertions(+), 2150 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java
index 47fcb73..2920b5d 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/Constants.java
@@ -45,6 +45,7 @@ public final class Constants {
/**
* RDF property identifier <js>"items"</js>.
+ *
* <p>
* For resources that are collections, this property identifies the RDF Sequence container for the items in the
* collection.
@@ -53,8 +54,10 @@ public final class Constants {
/**
* RDF property identifier <js>"root"</js>.
+ *
* <p>
* Property added to root nodes to help identify them as root elements during parsing.
+ *
* <p>
* Added if {@link RdfSerializerContext#RDF_addRootProperty} setting is enabled.
*/
@@ -62,8 +65,10 @@ public final class Constants {
/**
* RDF property identifier <js>"class"</js>.
+ *
* <p>
* Property added to bean resources to identify the class type.
+ *
* <p>
* Added if {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting is enabled.
*/
@@ -71,6 +76,7 @@ public final class Constants {
/**
* RDF property identifier <js>"value"</js>.
+ *
* <p>
* Property added to nodes to identify a simple value.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
index 1bee6bd..b226607 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
@@ -63,6 +63,7 @@ public class RdfBeanPropertyMeta extends BeanPropertyMetaExtended {
/**
* Returns the RDF namespace associated with this bean property.
+ *
* <p>
* Namespace is determined in the following order:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java
index e8c2773..76d1e35 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfClassMeta.java
@@ -69,6 +69,7 @@ public class RdfClassMeta extends ClassMetaExtended {
/**
* Returns the RDF namespace associated with this class.
+ *
* <p>
* Namespace is determined in the following order:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java
index e1f64a9..2ff1370 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCollectionFormat.java
@@ -22,6 +22,7 @@ public enum RdfCollectionFormat {
/**
* Default formatting (default).
+ *
* <p>
* Inherit formatting from parent class or parent package.
* If no formatting specified at any level, default is {@link #SEQ}.
@@ -45,6 +46,7 @@ public enum RdfCollectionFormat {
/**
* Causes collections and arrays to be rendered as multi-valued RDF properties instead of sequences.
+ *
* <p>
* Note that enabling this setting will cause order of elements in the collection to be lost.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java
index eeadd03..ae65e23 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfCommonContext.java
@@ -39,12 +39,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF language.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.language"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"RDF/XML-ABBREV"</js>
* </ul>
+ *
* <p>
* Can be any of the following:
* <ul class='spaced-list'>
@@ -79,7 +80,7 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> XML namespace for Juneau properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -90,7 +91,7 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> Default XML namespace for bean properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauBpNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -101,12 +102,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> Reuse XML namespaces when RDF namespaces not specified.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.useXmlNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When specified, namespaces defined using {@link XmlNs} and {@link Xml} will be inherited by the RDF serializers.
* Otherwise, namespaces will be defined using {@link RdfNs} and {@link Rdf}.
@@ -115,14 +117,16 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>iri_rules</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.iri-rules"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"lax"</js>
* </ul>
+ *
* <p>
* Set the engine for checking and resolving.
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -142,14 +146,16 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML ARP property: <code>error-mode</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.error-mode"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"lax"</js>
* </ul>
+ *
* <p>
* This allows a coarse-grained approach to control of error handling.
+ *
* <p>
* Possible values:
* <ul>
@@ -161,6 +167,7 @@ public interface RdfCommonContext {
* <li><js>"strict-error"</js>
* <li><js>"strict-fatal"</js>
* </ul>
+ *
* <p>
* See also:
* <ul class='spaced-list'>
@@ -178,14 +185,16 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML ARP property: <code>embedding</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.embedding"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* Sets ARP to look for RDF embedded within an enclosing XML document.
+ *
* <p>
* See also:
* <ul class='spaced-list'>
@@ -197,13 +206,15 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML ARP property: <code>ERR_xxx</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.ERR_"</js>
* <li><b>Data type:</b> <code>String</code>
* </ul>
+ *
* <p>
* Provides fine-grained control over detected error conditions.
+ *
* <p>
* Possible values:
* <ul>
@@ -212,6 +223,7 @@ public interface RdfCommonContext {
* <li><js>"EM_ERROR"</js>
* <li><js>"EM_FATAL"</js>
* </ul>
+ *
* <p>
* See also:
* <ul class='spaced-list'>
@@ -225,11 +237,12 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML ARP property: <code>WARN_xxx</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.WARN_"</js>
* <li><b>Data type:</b> <code>String</code>
* </ul>
+ *
* <p>
* See {@link #RDF_arp_err_} for details.
*/
@@ -237,11 +250,12 @@ public interface RdfCommonContext {
/**
* RDF/XML ARP property: <code>IGN_xxx</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.IGN_"</js>
* <li><b>Data type:</b> <code>String</code>
* </ul>
+ *
* <p>
* See {@link #RDF_arp_err_} for details.
*/
@@ -249,12 +263,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>xmlbase</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.xmlbase"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <jk>null</jk>
* </ul>
+ *
* <p>
* The value to be included for an <xa>xml:base</xa> attribute on the root element in the file.
*/
@@ -262,12 +277,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>longId</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.longId"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* Whether to use long ID's for anon resources.
* Short ID's are easier to read, but can run out of memory on very large models.
@@ -276,12 +292,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>allowBadURIs</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.allowBadURIs"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* URIs in the graph are, by default, checked prior to serialization.
*/
@@ -289,14 +306,16 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>relativeURIs</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.relativeURIs"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"same-document, absolute, relative, parent"</js>
* </ul>
+ *
* <p>
* What sort of relative URIs should be used.
+ *
* <p>
* A comma separate list of options:
* <ul class='spaced-list'>
@@ -313,6 +332,7 @@ public interface RdfCommonContext {
* <li>
* <js>"grandparent"</js> - Relative path beginning in <js>"../../"</js>
* </ul>
+ *
* <p>
* The default value is <js>"same-document, absolute, relative, parent"</js>.
* To switch off relative URIs use the value <js>""</js>.
@@ -322,12 +342,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>showXmlDeclaration</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.showXmlDeclaration"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"default"</js>
* </ul>
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -345,12 +366,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>showDoctypeDeclaration</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.showDoctypeDeclaration"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If true, an XML doctype declaration is included in the output.
* This declaration includes a <code>!ENTITY</code> declaration for each prefix mapping in the model, and any
@@ -361,12 +383,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>tab</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.tab"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>2</code>
* </ul>
+ *
* <p>
* The number of spaces with which to indent XML child elements.
*/
@@ -374,12 +397,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>attributeQuoteChar</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.attributeQuoteChar"</js>
* <li><b>Data type:</b> <code>Character</code>
* <li><b>Default:</b> <js>'"'</js>
* </ul>
+ *
* <p>
* The XML attribute quote character.
*/
@@ -387,12 +411,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF/XML property: <code>blockRules</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.rdfXml.blockRules"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>""</js>
* </ul>
+ *
* <p>
* A list of <code>Resource</code> or a <code>String</code> being a comma separated list of fragment IDs from
* <a class="doclink" href="http://www.w3.org/TR/rdf-syntax-grammar">RDF Syntax Grammar</a> indicating grammar
@@ -402,12 +427,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>minGap</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.minGap"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>1</code>
* </ul>
+ *
* <p>
* Minimum gap between items on a line.
*/
@@ -415,12 +441,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>objectLists</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.objectLists"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Print object lists as comma separated lists.
*/
@@ -428,12 +455,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>subjectColumn</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.subjectColumn"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> indentProperty
* </ul>
+ *
* <p>
* If the subject is shorter than this value, the first property may go on the same line.
*/
@@ -441,12 +469,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>propertyColumn</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.propertyColumn"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>8</code>
* </ul>
+ *
* <p>
* Width of the property column.
*/
@@ -454,12 +483,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>indentProperty</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.indentProperty"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>6</code>
* </ul>
+ *
* <p>
* Width to indent properties.
*/
@@ -467,12 +497,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>widePropertyLen</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.widePropertyLen"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>20</code>
* </ul>
+ *
* <p>
* Width of the property column.
* Must be longer than <code>propertyColumn</code>.
@@ -481,12 +512,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>abbrevBaseURI</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.abbrevBaseURI"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Control whether to use abbreviations <code><></code> or <code><#></code>.
*/
@@ -494,12 +526,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>usePropertySymbols</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.usePropertySymbols"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Control whether to use <code>a</code>, <code>=</code> and <code>=></code> in output
*/
@@ -507,12 +540,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>useTripleQuotedStrings</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.useTripleQuotedStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Allow the use of <code>"""</code> to delimit long strings.
*/
@@ -520,12 +554,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> N3/Turtle property: <code>useDoubles</code>.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.jena.n3.useDoubles"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Allow the use doubles as <code>123.456</code>.
*/
@@ -533,12 +568,13 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> RDF format for representing collections and arrays.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.collectionFormat"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"DEFAULT"</js>
* </ul>
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -564,19 +600,22 @@ public interface RdfCommonContext {
/**
* <b>Configuration property:</b> Collections should be serialized and parsed as loose collections.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.looseCollections"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* When specified, collections of resources are handled as loose collections of resources in RDF instead of
* resources that are children of an RDF collection (e.g. Sequence, Bag).
+ *
* <p>
* Note that this setting is specialized for RDF syntax, and is incompatible with the concept of
* losslessly representing POJO models, since the tree structure of these POJO models are lost
* when serialized as loose collections.
+ *
* <p>
* This setting is typically only useful if the beans being parsed into do not have a bean property
* annotated with {@link Rdf#beanUri @Rdf(beanUri=true)}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
index fe4f0ab..e2b58d5 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
@@ -32,12 +32,12 @@ import com.hp.hpl.jena.util.iterator.*;
* Parses RDF into POJOs.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* Refer to <a class="doclink" href="package-summary.html#ParserConfigurableProperties">Configurable Properties</a>
* for the entire list of configurable properties.
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for language-specific parsers:
* <ul class='spaced-list'>
* <li>
@@ -51,7 +51,7 @@ import com.hp.hpl.jena.util.iterator.*;
* </ul>
*
* <h5 class='section'>Additional information:</h5>
- * <p>
+ *
* See <a class="doclink" href="package-summary.html#TOC">RDF Overview</a> for an overview of RDF support in Juneau.
*/
@Consumes(value="text/xml+rdf")
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java
index 252fbd0..61b60ca 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserBuilder.java
@@ -57,13 +57,14 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Trim whitespace from text elements.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfParser.trimWhitespace"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, whitespace in text elements will be automatically trimmed.
*
@@ -82,12 +83,13 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> RDF language.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.language"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"RDF/XML-ABBREV"</js>
* </ul>
+ *
* <p>
* Can be any of the following:
* <ul class='spaced-list'>
@@ -178,7 +180,7 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> XML namespace for Juneau properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -200,7 +202,7 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Default XML namespace for bean properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauBpNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -222,12 +224,13 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Reuse XML namespaces when RDF namespaces not specified.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.useXmlNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When specified, namespaces defined using {@link XmlNs} and {@link Xml} will be inherited by the RDF parsers.
* Otherwise, namespaces will be defined using {@link RdfNs} and {@link Rdf}.
@@ -247,12 +250,13 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> RDF format for representing collections and arrays.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.collectionFormat"</js>
* <li><b>Data type:</b> <code>RdfCollectionFormat</code>
* <li><b>Default:</b> <js>"DEFAULT"</js>
* </ul>
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -290,19 +294,22 @@ public class RdfParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Collections should be serialized and parsed as loose collections.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.looseCollections"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* When specified, collections of resources are handled as loose collections of resources in RDF instead of
* resources that are children of an RDF collection (e.g. Sequence, Bag).
+ *
* <p>
* Note that this setting is specialized for RDF syntax, and is incompatible with the concept of
* losslessly representing POJO models, since the tree structure of these POJO models are lost
* when serialized as loose collections.
+ *
* <p>
* This setting is typically only useful if the beans being parsed into do not have a bean property
* annotated with {@link Rdf#beanUri @Rdf(beanUri=true)}.
@@ -316,16 +323,16 @@ public class RdfParserBuilder extends ParserBuilder {
*
* <jc>// Serialize to RDF/XML as loose resources</jc>
* String rdfXml = s.serialize(l);
- *
- * <jc>// Parse back into a Java collection</jc>
+ *
+ * <jc>// Parse back into a Java collection</jc>
* l = p.parse(rdfXml, LinkedList.<jk>class</jk>, MyBean.<jk>class</jk>);
*
* MyBean[] b = createArrayOfMyBeans();
*
* <jc>// Serialize to RDF/XML as loose resources</jc>
* String rdfXml = s.serialize(b);
- *
- * <jc>// Parse back into a bean array</jc>
+ *
+ * <jc>// Parse back into a bean array</jc>
* b = p.parse(rdfXml, MyBean[].<jk>class</jk>);
* </p>
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java
index cadfa62..42833c4 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserContext.java
@@ -20,9 +20,11 @@ import org.apache.juneau.xml.*;
/**
* Configurable properties on the {@link RdfParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -49,13 +51,14 @@ public final class RdfParserContext extends ParserContext implements RdfCommonCo
/**
* <b>Configuration property:</b> Trim whitespace from text elements.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfParser.trimWhitespace"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, whitespace in text elements will be automatically trimmed.
*/
@@ -69,6 +72,7 @@ public final class RdfParserContext extends ParserContext implements RdfCommonCo
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
index 5bed276..63a5eca 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
@@ -28,6 +28,7 @@ import com.hp.hpl.jena.rdf.model.*;
/**
* Session object that lives for the duration of a single use of {@link RdfParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -45,24 +46,30 @@ public class RdfParserSession extends ParserSession {
/**
* 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.
- * @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>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @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>
+ * @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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
protected RdfParserSession(RdfParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
@@ -213,8 +220,10 @@ public class RdfParserSession extends ParserSession {
/**
* Decodes the specified string.
+ *
* <p>
* If {@link RdfParserContext#RDF_trimWhitespace} is <jk>true</jk>, the resulting string is trimmed before decoding.
+ *
* <p>
* If {@link #isTrimStrings()} is <jk>true</jk>, the resulting string is trimmed after decoding.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
index fbaf525..82cd176 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
@@ -32,12 +32,12 @@ import com.hp.hpl.jena.rdf.model.*;
* Serializes POJOs to RDF.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* Refer to <a class="doclink" href="package-summary.html#SerializerConfigurableProperties">Configurable Properties</a>
* for the entire list of configurable properties.
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for language-specific serializers:
* <ul>
* <li>{@link RdfSerializer.Xml} - RDF/XML.
@@ -48,7 +48,7 @@ import com.hp.hpl.jena.rdf.model.*;
* </ul>
*
* <h5 class='section'>Additional information:</h5>
- * <p>
+ *
* See <a class="doclink" href="package-summary.html#TOC">RDF Overview</a> for an overview of RDF support in Juneau.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java
index 879466b..196bdfa 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerBuilder.java
@@ -57,12 +57,13 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> RDF language.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.language"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"RDF/XML-ABBREV"</js>
* </ul>
+ *
* <p>
* Can be any of the following:
* <ul class='spaced-list'>
@@ -154,7 +155,7 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> XML namespace for Juneau properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -177,7 +178,7 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Default XML namespace for bean properties.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.juneauBpNs"</js>
* <li><b>Data type:</b> {@link Namespace}
@@ -200,12 +201,13 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Reuse XML namespaces when RDF namespaces not specified.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.useXmlNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When specified, namespaces defined using {@link XmlNs} and {@link Xml} will be inherited by the RDF serializers.
* Otherwise, namespaces will be defined using {@link RdfNs} and {@link Rdf}.
@@ -226,7 +228,7 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Add XSI data types to non-<code>String</code> literals.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.addLiteralTypes"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -250,17 +252,19 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Add RDF root identifier property to root node.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.addRootProperty"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When enabled an RDF property <code>http://www.apache.org/juneau/root</code> is added with a value of
* <js>"true"</js> to identify the root node in the graph.
* This helps locate the root node during parsing.
+ *
* <p>
* If disabled, the parser has to search through the model to find any resources without incoming predicates to
* identify root notes, which can introduce a considerable performance degradation.
@@ -281,15 +285,17 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Auto-detect namespace usage.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.autoDetectNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Detect namespace usage before serialization.
+ *
* <p>
* If enabled, then the data structure will first be crawled looking for namespaces that will be encountered before
* the root element is serialized.
@@ -310,13 +316,14 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Default namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.namespaces.list"</js>
* <li><b>Data type:</b> <code>List<{@link Namespace}></code>
* <li><b>Default:</b> empty list
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The default list of namespaces associated with this serializer.
*
@@ -336,12 +343,13 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> RDF format for representing collections and arrays.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.collectionFormat"</js>
* <li><b>Data type:</b> <code>RdfCollectionFormat</code>
* <li><b>Default:</b> <js>"DEFAULT"</js>
* </ul>
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -379,19 +387,22 @@ public class RdfSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Collections should be serialized and parsed as loose collections.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Rdf.looseCollections"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* When specified, collections of resources are handled as loose collections of resources in RDF instead of
* resources that are children of an RDF collection (e.g. Sequence, Bag).
+ *
* <p>
* Note that this setting is specialized for RDF syntax, and is incompatible with the concept of
* losslessly representing POJO models, since the tree structure of these POJO models are lost
* when serialized as loose collections.
+ *
* <p>
* This setting is typically only useful if the beans being parsed into do not have a bean property
* annotated with {@link Rdf#beanUri @Rdf(beanUri=true)}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
index fb47c8f..2d5d6aa 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
@@ -20,9 +20,11 @@ import org.apache.juneau.xml.*;
/**
* Configurable properties on the {@link RdfSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -49,7 +51,7 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
/**
* <b>Configuration property:</b> Add XSI data types to non-<code>String</code> literals.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.addLiteralTypes"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -61,17 +63,19 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
/**
* <b>Configuration property:</b> Add RDF root identifier property to root node.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.addRootProperty"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When enabled an RDF property <code>http://www.apache.org/juneau/root</code> is added with a value of <js>"true"</js>
* to identify the root node in the graph.
* This helps locate the root node during parsing.
+ *
* <p>
* If disabled, the parser has to search through the model to find any resources without incoming predicates to
* identify root notes, which can introduce a considerable performance degradation.
@@ -80,31 +84,33 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
/**
* <b>Configuration property:</b> Auto-detect namespace usage.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.autoDetectNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Detect namespace usage before serialization.
+ *
* <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.
*/
public static final String RDF_autoDetectNamespaces = "RdfSerializer.autoDetectNamespaces";
/**
* <b>Configuration property:</b> Default namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.namespaces.list"</js>
* <li><b>Data type:</b> <code>List<{@link Namespace}></code>
* <li><b>Default:</b> empty list
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The default list of namespaces associated with this serializer.
*/
@@ -112,19 +118,21 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RdfSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
* 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.
+ *
* <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}.
@@ -148,6 +156,7 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
index 4b055b7..bf229c9 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
@@ -30,6 +30,7 @@ import com.hp.hpl.jena.rdf.model.*;
/**
* Session object that lives for the duration of a single use of {@link RdfSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -53,19 +54,26 @@ public final class RdfSerializerSession 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.
- * @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.
+ * @param ctx
+ * The context creating this session 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.
* @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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
protected RdfSerializerSession(RdfSerializerContext ctx, ObjectMap op, Object output, Method javaMethod,
Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java
index 518df2b..0432efb 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfUtils.java
@@ -25,6 +25,8 @@ public class RdfUtils {
/**
* Find the namespace given a list of <ja>@Rdf</ja> and <ja>@RdfSchema</ja> annotations.
+ *
+ * <p>
* The annotations should be a child-to-parent ordering of annotations found on a class or method.
*
* @param rdfs The <code>@Rdf</code> annotations to search.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
index f4821a5..2812d71 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
@@ -21,8 +21,10 @@ import org.apache.juneau.jena.*;
/**
* Annotation for specifying options for RDF serializers.
+ *
* <p>
* Can be applied to Java packages, types, fields, and methods.
+ *
* <p>
* Can be used for the following:
* <ul>
@@ -37,28 +39,32 @@ public @interface Rdf {
/**
* Sets the XML prefix of this property or class.
+ *
* <p>
- * Must either be matched to a {@link #namespace()} annotation on the same object, parent object, or a {@link RdfNs} with the same name
- * through the {@link RdfSchema#rdfNs()} annotation on the package.
+ * Must either be matched to a {@link #namespace()} annotation on the same object, parent object, or a {@link RdfNs}
+ * with the same name through the {@link RdfSchema#rdfNs()} 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 RdfNs} with the same name
- * through the {@link RdfSchema#rdfNs()} annotation on the package.
+ * Must be matched with a {@link #prefix()} annotation on this object, a parent object, or a {@link RdfNs} with the
+ * same name through the {@link RdfSchema#rdfNs()} annotation on the package.
*/
String namespace() default "";
/**
* The format for how collections (e.g. lists and arrays) are serialized in RDF.
+ *
* @see RdfCollectionFormat
*/
RdfCollectionFormat collectionFormat() default RdfCollectionFormat.DEFAULT;
/**
* Marks a bean property as a resource URI identifier for the bean.
+ *
* <p>
* Has the following effects on the following serializers:
* <ul class='spaced-list'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfNs.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfNs.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfNs.java
index b80fe5d..d8d9aff 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfNs.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfNs.java
@@ -18,6 +18,7 @@ import java.lang.annotation.*;
/**
* Namespace name/URL mapping pair.
+ *
* <p>
* Used to identify a namespace/URI pair on a {@link RdfSchema#rdfNs()} annotation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java
index 901ee8f..c840dcd 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfSchema.java
@@ -28,32 +28,35 @@ public @interface RdfSchema {
/**
* Sets the default RDF prefix for all classes in this and child packages.
+ *
* <p>
- * Must either be matched with a {@link #namespace()} annotation, or an {@link #rdfNs()} mapping with the
- * same {@link RdfNs#prefix} value.
+ * Must either be matched with a {@link #namespace()} annotation, or an {@link #rdfNs()} mapping with the same
+ * {@link RdfNs#prefix} value.
*/
public String prefix() default "";
/**
* Sets the default RDF namespace URL for all classes in this and child packages.
+ *
* <p>
- * Must either be matched with a {@link #prefix()} annotation, or an {@link #rdfNs()} mapping with the
- * same {@link RdfNs#namespaceURI} value.
+ * Must either be matched with a {@link #prefix()} annotation, or an {@link #rdfNs()} mapping with the same
+ * {@link RdfNs#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 Rdf#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 Rdf#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>@RdfSchema</ja>(prefix=<js>"ab"</js>,
@@ -67,9 +70,9 @@ public @interface RdfSchema {
* <jk>package</jk> org.apache.juneau.examples.addressbook;
* <jk>import</jk> org.apache.juneau.rdf.annotation.*;
* </p>
+ *
* <p>
* Class in package using defined namespaces...
- * </p>
* <p class='bcode'>
* <jk>package</jk> org.apache.juneau.examples.addressbook;
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
index 6a80dd7..1e705bd 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
@@ -51,7 +51,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>Bean Contexts</h5>
*
- * <p>
* Bean contexts are created through the {@link PropertyStore#getContext(Class)} method.
* These context objects are read-only, reusable, and thread-safe.
* The {@link PropertyStore} class will typically cache copies of <code>Context</code> objects based on
@@ -67,7 +66,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>Bean Sessions</h5>
*
- * <p>
* Whereas <code>BeanContext</code> objects are permanent, unchangeable, cached, and thread-safe,
* {@link BeanSession} objects are ephemeral and not thread-safe.
* They are meant to be used as quickly-constructed scratchpads for creating bean maps.
@@ -75,7 +73,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>BeanContext configuration properties</h5>
*
- * <p>
* <code>BeanContexts</code> have several configuration properties that can be used to tweak behavior on how beans are
* handled. These are denoted as the static <jsf>BEAN_*</jsf> fields on this class.
*
@@ -115,7 +112,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>Bean Maps</h5>
*
- * <p>
* {@link BeanMap BeanMaps} are wrappers around Java beans that allow properties to be retrieved and
* set using the common {@link Map#put(Object,Object)} and {@link Map#get(Object)} methods.
*
@@ -156,7 +152,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>Bean Annotations</h5>
*
- * <p>
* This package contains annotations that can be applied to class definitions to override what properties are detected
* on a bean.
*
@@ -178,7 +173,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>Beans with read-only properties</h5>
*
- * <p>
* Bean maps can also be defined on top of beans with read-only properties by adding a
* {@link BeanConstructor @BeanConstructor} annotation to one of the constructors on the
* bean class. This will allow read-only properties to be set through constructor arguments.
@@ -203,7 +197,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>BeanFilters and PojoSwaps</h5>
*
- * <p>
* {@link BeanFilter BeanFilters} and {@link PojoSwap PojoSwaps} are used to tailor how beans and POJOs are handled.
* <ol class='spaced-list'>
* <li>
@@ -222,7 +215,6 @@ import org.apache.juneau.transform.*;
*
* <h5 class='topic'>ClassMetas</h5>
*
- * <p>
* The {@link ClassMeta} class is a wrapper around {@link Class} object that provides cached information about that
* class (e.g. whether it's a {@link Map} or {@link Collection} or bean).
*
@@ -241,7 +233,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Beans require no-arg constructors.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireDefaultConstructor"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -260,7 +251,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Beans require {@link Serializable} interface.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSerializable"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -279,7 +269,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Beans require setters for getters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSettersForGetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -296,7 +285,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Beans require at least one property.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSomeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -316,7 +304,6 @@ public class BeanContext extends Context {
* <b>Configuration property:</b> {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property
* value.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanMapPutReturnsOldValue"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -336,7 +323,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Look for bean constructors with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanConstructorVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -349,7 +335,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Look for bean classes with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanClassVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -367,7 +352,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Look for bean fields with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanFieldVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -388,7 +372,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Look for bean methods with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.methodVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -406,7 +389,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Use Java {@link Introspector} for determining bean properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.useJavaBeanIntrospector"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -423,7 +405,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Use interface proxies.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.useInterfaceProxies"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -440,7 +421,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Ignore unknown properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreUnknownBeanProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -457,7 +437,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Ignore unknown properties with null values.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreUnknownNullBeanProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -474,7 +453,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Ignore properties without setters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignorePropertiesWithoutSetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -491,7 +469,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Ignore invocation errors on getters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnGetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -508,7 +485,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Ignore invocation errors on setters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnSetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -525,7 +501,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Sort bean properties in alphabetical order.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.sortProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -549,7 +524,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Packages whose classes should not be considered beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.notBeanPackages.set"</js>
* <li><b>Data type:</b> <code>Set<String></code>
@@ -591,7 +565,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Classes to be excluded from consideration as being beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.notBeanClasses.set"</js>
* <li><b>Data type:</b> <code>Set<Class></code>
@@ -618,7 +591,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Bean filters to apply to beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanFilters.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -659,7 +631,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> POJO swaps to apply to Java objects.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.pojoSwaps.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -689,7 +660,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Implementation classes for interfaces and abstract classes.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.implClasses.map"</js>
* <li><b>Data type:</b> <code>Map<Class,Class></code>
@@ -712,7 +682,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Explicitly specify visible bean properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.includeProperties"</js>
* <li><b>Data type:</b> <code>Map<String,String></code>
@@ -745,7 +714,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Exclude specified properties from beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.excludeProperties"</js>
* <li><b>Data type:</b> <code>Map<String,String></code>
@@ -778,7 +746,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Bean lookup dictionary.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanDictionary.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -811,7 +778,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Name to use for the bean type properties used to represent a bean type.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanTypePropertyName"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -824,7 +790,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Default parser to use when converting <code>Strings</code> to POJOs.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.defaultParser"</js>
* <li><b>Data type:</b> <code>Class</code>
@@ -840,7 +805,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Locale.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.locale"</js>
* <li><b>Data type:</b> <code>Locale</code>
@@ -856,7 +820,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> TimeZone.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.timeZone"</js>
* <li><b>Data type:</b> <code>TimeZone</code>
@@ -872,7 +835,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Media type.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.mediaType"</js>
* <li><b>Data type:</b> <code>MediaType</code>
@@ -888,7 +850,6 @@ public class BeanContext extends Context {
/**
* <b>Configuration property:</b> Debug mode.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.debug"</js>
* <li><b>Data type:</b> <code>Boolean</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanMap.java b/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
index fe97e09..c093c98 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
@@ -27,7 +27,7 @@ import org.apache.juneau.xml.annotation.*;
* Java bean wrapper class.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* A wrapper that wraps Java bean instances inside of a {@link Map} interface that allows properties on the wrapped
* object can be accessed using the {@link Map#get(Object) get()} and {@link Map#put(Object,Object) put()} methods.
*
@@ -35,7 +35,7 @@ import org.apache.juneau.xml.annotation.*;
* Use the {@link BeanContext} class to create instances of this class.
*
* <h6 class='topic'>Bean property order</h6>
- * <p>
+ *
* The order of the properties returned by the {@link Map#keySet() keySet()} and {@link Map#entrySet() entrySet()}
* methods are as follows:
* <ul class='spaced-list'>
@@ -51,7 +51,7 @@ import org.apache.juneau.xml.annotation.*;
* <br>The order can also be overridden through the use of a {@link BeanFilter}.
*
* <h6 class='topic'>POJO swaps</h6>
- * <p>
+ *
* If {@link PojoSwap PojoSwaps} are defined on the class types of the properties of this bean or the bean properties
* themselves, the {@link #get(Object)} and {@link #put(String, Object)} methods will automatically transform the
* property value to and from the serialized form.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java b/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
index 1f14abb..bd370ae 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
@@ -30,14 +30,14 @@ import org.apache.juneau.utils.*;
* Encapsulates all access to the properties of a bean class (like a souped-up {@link java.beans.BeanInfo}).
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Uses introspection to find all the properties associated with this class. If the {@link Bean @Bean} annotation
* is present on the class, or the class has a {@link BeanFilter} registered with it in the bean context,
* then that information is used to determine the properties on the class.
* Otherwise, the {@code BeanInfo} functionality in Java is used to determine the properties on the class.
*
* <h6 class='topic'>Bean property ordering</h6>
- * <p>
+ *
* The order of the properties are as follows:
* <ul class='spaced-list'>
* <li>
[10/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/CoreObjectBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/CoreObjectBuilder.java b/juneau-core/src/main/java/org/apache/juneau/CoreObjectBuilder.java
index 27120d1..0b59ca4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/CoreObjectBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/CoreObjectBuilder.java
@@ -210,7 +210,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Beans require no-arg constructors.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireDefaultConstructor"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -241,7 +240,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Beans require {@link Serializable} interface.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSerializable"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -272,7 +270,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Beans require setters for getters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSettersForGetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -300,7 +297,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Beans require at least one property.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beansRequireSomeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -332,7 +328,6 @@ public abstract class CoreObjectBuilder {
* <b>Configuration property:</b> {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property
* value.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanMapPutReturnsOldValue"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -364,7 +359,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Look for bean constructors with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanConstructorVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -393,7 +387,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Look for bean classes with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanClassVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -422,7 +415,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Look for bean fields with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanFieldVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -452,7 +444,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Look for bean methods with the specified minimum visibility.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.methodVisibility"</js>
* <li><b>Data type:</b> {@link Visibility}
@@ -482,7 +473,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Use Java {@link Introspector} for determining bean properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.useJavaBeanIntrospector"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -510,7 +500,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Use interface proxies.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.useInterfaceProxies"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -538,7 +527,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore unknown properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreUnknownBeanProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -566,7 +554,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore unknown properties with null values.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreUnknownNullBeanProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -594,7 +581,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore properties without setters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignorePropertiesWithoutSetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -622,7 +608,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore invocation errors on getters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnGetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -650,7 +635,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore invocation errors on setters.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnSetters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -678,7 +662,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Sort bean properties in alphabetical order.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.sortProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -713,7 +696,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Packages whose classes should not be considered beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.notBeanPackages.set"</js>
* <li><b>Data type:</b> <code>Set<String></code>
@@ -756,7 +738,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Packages whose classes should not be considered beans.
*
- * <p>
* Same as {@link #setNotBeanPackages(String...)} but using a <code>Collection</code>.
*
* @param values The new value for this property.
@@ -834,7 +815,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Classes to be excluded from consideration as being beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.notBeanClasses.set"</js>
* <li><b>Data type:</b> <code>Set<Class></code>
@@ -942,7 +922,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Bean filters to apply to beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanFilters.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -1064,7 +1043,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> POJO swaps to apply to Java objects.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.pojoSwaps.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -1175,7 +1153,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Implementation classes for interfaces and abstract classes.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.implClasses.map"</js>
* <li><b>Data type:</b> <code>Map<Class,Class></code>
@@ -1224,7 +1201,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Explicitly specify visible bean properties.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.includeProperties"</js>
* <li><b>Data type:</b> <code>Map<String,String></code>
@@ -1298,7 +1274,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Exclude specified properties from beans.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.excludeProperties"</js>
* <li><b>Data type:</b> <code>Map<String,String></code>
@@ -1372,7 +1347,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Bean lookup dictionary.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanDictionary.list"</js>
* <li><b>Data type:</b> <code>List<Class></code>
@@ -1486,7 +1460,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Name to use for the bean type properties used to represent a bean type.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.beanTypePropertyName"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -1510,7 +1483,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Default parser to use when converting <code>Strings</code> to POJOs.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.defaultParser"</js>
* <li><b>Data type:</b> <code>Class</code>
@@ -1537,7 +1509,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Locale.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.locale"</js>
* <li><b>Data type:</b> <code>Locale</code>
@@ -1561,7 +1532,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> TimeZone.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.timeZone"</js>
* <li><b>Data type:</b> <code>TimeZone</code>
@@ -1585,7 +1555,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Media type.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.mediaType"</js>
* <li><b>Data type:</b> <code>MediaType</code>
@@ -1612,7 +1581,6 @@ public abstract class CoreObjectBuilder {
/**
* <b>Configuration property:</b> Debug mode.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"BeanContext.debug"</js>
* <li><b>Data type:</b> <code>Boolean</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java b/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
index 26961d9..b03dfb4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
+++ b/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
@@ -44,7 +44,7 @@ import org.apache.juneau.parser.*;
* </ul>
*
* <h6 class='topic'>PropertyStore objects</h6>
- * <p>
+ *
* Property stores can be thought of as consisting of the following:
* <ul>
* <li>A <code>Map<String,Object></code> of context properties.
@@ -66,7 +66,7 @@ import org.apache.juneau.parser.*;
* etc... and can thus be used to retrieve context objects for those serializers.
*
* <h6 class='topic'>Context properties</h6>
- * <p>
+ *
* Context properties are 'settings' for serializers and parsers.
* <br>For example, the {@link BeanContext#BEAN_sortProperties} context property defines whether bean properties should be
* serialized in alphabetical order.
@@ -212,7 +212,7 @@ import org.apache.juneau.parser.*;
* As a general rule, only {@link Context} objects will use these read methods.
*
* <h6 class='topic'>Context objects</h6>
- * <p>
+ *
* A Context object can be thought of as unmodifiable snapshot of a store.
* <br>They should be 'fast' by avoiding synchronization by using final fields whenever possible.
* <br>However, they MUST be thread safe.
@@ -239,7 +239,7 @@ import org.apache.juneau.parser.*;
* </p>
*
* <h6 class='topic'>Session objects</h6>
- * <p>
+ *
* Session objects are created through {@link Context} objects, typically through a <code>createContext()</code> method.
* <br>Unlike context objects, they are NOT reusable and NOT thread safe.
* <br>They are meant to be used one time and then thrown away.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java
index e4051ef..835005d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java
@@ -23,7 +23,7 @@ import org.apache.juneau.parser.*;
* Annotation used on subclasses of {@link Parser} to identify the media types that it consumes.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Provides a way to define the contents of {@link Parser#getMediaTypes()} through an annotation.
*
* <p>
@@ -32,7 +32,7 @@ import org.apache.juneau.parser.*;
* overridden by subclasses to return the media types programmatically.
*
* <h5 class='section'>Example:</h5>
- * <p>
+ *
* Standard example:
* <p class='bcode'>
* <ja>@Consumes</ja>(<js>"application/json,text/json"</js>)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java
index cf705e7..1bbb37e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java
@@ -23,7 +23,7 @@ import org.apache.juneau.serializer.*;
* Annotation used on subclasses of {@link Serializer} to identify the media types that it produces.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Provides a way to define the contents of {@link Serializer#getMediaTypes()} through an annotation.
*
* <p>
@@ -32,7 +32,7 @@ import org.apache.juneau.serializer.*;
* be overridden by subclasses to return the media types programmatically.
*
* <h5 class='section'>Example:</h5>
- * <p>
+ *
* Standard example:
* <p class='bcode'>
* <ja>@Produces</ja>(<js>"application/json,text/json"</js>)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
index dd3f112..6be8583 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
@@ -51,7 +51,7 @@ import org.apache.juneau.xml.annotation.*;
* Only 2-dimensional POJOs (arrays or collections of maps or beans) can be serialized to Cognos.
*
* <h5 class='section'>Example:</h5>
- * <p>
+ *
* The construct shown above is a serialized <code>AddressBook</code> object which is a subclass of
* <code>LinkedList<Person></code>.
* The code for generating the XML is as follows...
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java
index 15e774b..35ca3d8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java
@@ -19,7 +19,6 @@ import java.io.*;
*
* <h5 class='section'>Description:</h5>
*
- * <p>
* Used to wrap input and output streams within compression/decompression streams.
*
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
index c75be25..ec3632a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
@@ -22,7 +22,6 @@ import org.apache.juneau.http.*;
*
* <h5 class='section'>Description:</h5>
*
- * <p>
* Maintains a set of encoders and the codings that they can handle.
*
* <p>
@@ -30,7 +29,7 @@ import org.apache.juneau.http.*;
* encoders for specific <code>Accept-Encoding</code> and <code>Content-Encoding</code> header values.
*
* <h6 class='topic'>Match ordering</h6>
- * <p>
+ *
* Encoders are matched against <code>Accept-Encoding</code> strings in the order they exist in this group.
*
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
index fc0c7d3..f1be67a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
@@ -24,18 +24,18 @@ import org.apache.juneau.serializer.*;
* Serializes POJOs to HTTP responses as HTML documents.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/html</code>
* <p>
* Produces <code>Content-Type</code> types: <code>text/html</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Same as {@link HtmlSerializer}, except wraps the response in <code><xt><html></code>,
- * <code><xt><head></code>, and <code><xt><body></code> tags so that it can be rendered in a browser.
+ * <code><xt><head></code>, and <code><xt><body></code> tags so that it can be rendered in a browser.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link HtmlDocSerializerContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
index 0668b7c..d8546c1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
@@ -79,7 +79,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Page title.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.title"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -139,7 +138,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Page description.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.description"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -203,7 +201,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Page branding.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.branding"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -223,7 +220,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Header section contents.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.header"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -256,7 +252,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Page links.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.links.map"</js>
* <li><b>Data type:</b> <code>Map<String,String></code>
@@ -322,7 +317,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Nav section contents.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.nav"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -354,7 +348,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Aside section contents.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.aside"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -387,7 +380,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Footer section contents.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.footer"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -418,7 +410,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> No-results message.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.noResultsMessage"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -446,7 +437,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Prevent word wrap on page.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.nowrap"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -462,7 +452,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> Stylesheet URL.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.cssUrl"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -485,7 +474,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> CSS code.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.css.list"</js>
* <li><b>Data type:</b> <code>List<String></code>
@@ -526,7 +514,6 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* <b>Configuration property:</b> HTML document template.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlDocSerializer.template"</js>
* <li><b>Data type:</b> <code>Class<? <jk>extends</jk> HtmlDocTemplate></code> or {@link HtmlDocTemplate}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
index 093c411..cbb3120 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
@@ -33,17 +33,17 @@ import org.apache.juneau.xml.*;
* Parses text generated by the {@link HtmlSerializer} class back into a POJO model.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>text/html</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* See the {@link HtmlSerializer} class for a description of the HTML generated.
* <p>
* This class is used primarily for automated testing of the {@link HtmlSerializer} class.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link HtmlSerializerContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
index d4fcdd6..0c50698 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
@@ -28,14 +28,14 @@ import org.apache.juneau.transform.*;
* Serializes POJO metamodels to HTML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/html+schema</code>
*
* <p>
* Produces <code>Content-Type</code> types: <code>text/html</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Essentially the same as {@link HtmlSerializer}, except serializes the POJO metamodel instead of the model itself.
*
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
index 22805bd..a6046bf 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
@@ -32,14 +32,14 @@ import org.apache.juneau.xml.annotation.*;
* Serializes POJO models to HTML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/html</code>
*
* <p>
* Produces <code>Content-Type</code> types: <code>text/html</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* The conversion is as follows...
* <ul class='spaced-list'>
* <li>
@@ -63,7 +63,7 @@ import org.apache.juneau.xml.annotation.*;
* The {@link HtmlLink} annotation can be used on beans to add hyperlinks to the output.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul class='spaced-list'>
* <li>
@@ -71,7 +71,7 @@ import org.apache.juneau.xml.annotation.*;
* </ul>
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience:
* <ul class='spaced-list'>
* <li>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
index 0633abd..66df425 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java
@@ -55,7 +55,6 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> Anchor text source.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.uriAnchorText"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -101,7 +100,6 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> Look for URLs in {@link String Strings}.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.detectLinksInStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -130,7 +128,6 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> Look for link labels in the <js>"label"</js> parameter of the URL.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.lookForLabelParameters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -161,7 +158,6 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> The parameter name to use when using {@link HtmlSerializerContext#HTML_lookForLabelParameters}.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -186,7 +182,6 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> Add key/value headers on bean/map tables.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.addKeyValueTableHeaders"</js>
* <li><b>Data type:</b> <code>Boolean</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
index cbead45..a9f34b5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
@@ -44,7 +44,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> Anchor text source.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.uriAnchorText"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -90,7 +89,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> Look for URLs in {@link String Strings}.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.detectLinksInStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -107,7 +105,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> Look for link labels in the <js>"label"</js> parameter of the URL.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.lookForLabelParameters"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -126,7 +123,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> The parameter name to use when using {@link #HTML_lookForLabelParameters}.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -139,7 +135,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> Add key/value headers on bean/map tables.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.addKeyValueTableHeaders"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -152,7 +147,6 @@ public class HtmlSerializerContext extends XmlSerializerContext {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
*
- * <p>
* <ul>
* <li><b>Name:</b> <js>"HtmlSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
index d73319c..83552c2 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
@@ -23,14 +23,14 @@ import org.apache.juneau.serializer.*;
* Serializes POJOs to HTTP responses as stripped HTML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/html+stripped</code>
*
* <p>
* Produces <code>Content-Type</code> types: <code>text/html</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Produces the same output as {@link HtmlDocSerializer}, but without the header and body tags and page title and
* description.
* Used primarily for JUnit testing the {@link HtmlDocSerializer} class.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java b/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java
index 8e8d47d..7c6531f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java
+++ b/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java
@@ -205,7 +205,6 @@ public class MediaType implements Comparable<MediaType> {
/**
* Returns a match metric against the specified media type where a larger number represents a better match.
*
- * <p>
* <ul>
* <li>Exact matches (e.g. <js>"text/json"<js>/</js>"text/json"</js>) should match
* better than meta-character matches (e.g. <js>"text/*"<js>/</js>"text/json"</js>)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java
index d6d5ad2..1421502 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java
@@ -33,6 +33,7 @@ import org.apache.juneau.svl.*;
/**
* Implements the API for accessing the contents of a config file.
+ *
* <p>
* Refer to <a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.ini</a> for usage information.
*/
@@ -57,7 +58,8 @@ public abstract class ConfigFile implements Map<String,Section> {
* @param sectionName The section name. Must not be <jk>null</jk>.
* @param sectionKey The section key. Must not be <jk>null</jk>.
* @param value The new value.
- * @param serializer The serializer to use for serializing the object.
+ * @param serializer
+ * The serializer to use for serializing the object.
* If <jk>null</jk>, then uses the predefined serializer on the config file.
* @param encoded If <jk>true</jk>, then encode the value using the encoder associated with this config file.
* @param newline If <jk>true</jk>, then put serialized output on a separate line from the key.
@@ -131,6 +133,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Adds arbitrary lines to the specified config file section.
+ *
* <p>
* The lines can be any of the following....
* <ul class='spaced-list'>
@@ -141,6 +144,7 @@ public abstract class ConfigFile implements Map<String,Section> {
* <li>
* <js>" foobar "</js> - Anything else (interpreted as a comment).
* </ul>
+ *
* <p>
* If the section does not exist, it will automatically be created.
*
@@ -153,10 +157,12 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Adds header comments to the specified section.
+ *
* <p>
* Header comments are defined as lines that start with <jk>"#"</jk> immediately preceding a section header
* <jk>"[section]"</jk>.
* These are handled as part of the section itself instead of being interpreted as comments in the previous section.
+ *
* <p>
* Header comments can be of the following formats...
* <ul class='spaced-list'>
@@ -165,6 +171,7 @@ public abstract class ConfigFile implements Map<String,Section> {
* <li>
* <js>"comment"</js> - Anything else (will automatically be prefixed with <js>"# "</js>).
* </ul>
+ *
* <p>
* If the section does not exist, it will automatically be created.
*
@@ -186,6 +193,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Returns the reusable bean session associated with this config file.
+ *
* <p>
* Used for performing simple datatype conversions.
*
@@ -195,6 +203,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Converts the specified object to a string.
+ *
* <p>
* The serialized output is identical to LAX JSON (JSON with unquoted attributes) except for the following
* exceptions:
@@ -203,7 +212,8 @@ public abstract class ConfigFile implements Map<String,Section> {
* </ul>
*
* @param o The object to serialize.
- * @param serializer The serializer to use for serializing the object.
+ * @param serializer
+ * The serializer to use for serializing the object.
* If <jk>null</jk>, then uses the predefined serializer on the config file.
* @param newline If <jk>true</jk>, add a newline at the beginning of the value.
* @return The serialized object.
@@ -215,7 +225,8 @@ public abstract class ConfigFile implements Map<String,Section> {
* Converts the specified string to an object of the specified type.
*
* @param s The string to parse.
- * @param parser The parser to use for parsing the object.
+ * @param parser
+ * The parser to use for parsing the object.
* If <jk>null</jk>, then uses the predefined parser on the config file.
* @param type The data type to create.
* @param args The generic type arguments if the type is a {@link Collection} or {@link Map}
@@ -266,6 +277,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key and converts it to the specified value.
+ *
* <p>
* The key can be in one of the following formats...
* <ul class='spaced-list'>
@@ -274,6 +286,7 @@ public abstract class ConfigFile implements Map<String,Section> {
* <li>
* <js>"section/key"</js> - A value from the specified section.
* </ul>
+ *
* <p>
* The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps).
*
@@ -299,11 +312,14 @@ public abstract class ConfigFile implements Map<String,Section> {
* Map m = cf.getObject(<js>"MySection/myMapOfListsOfBeans"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>,
* List.<jk>class</jk>, MyBean.<jk>class</jk>);
* </p>
+ *
* <p>
* <code>Collection</code> classes are assumed to be followed by zero or one objects indicating the element type.
+ *
* <p>
* <code>Map</code> classes are assumed to be followed by zero or two meta objects indicating the key and value
* types.
+ *
* <p>
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
*
@@ -313,14 +329,15 @@ public abstract class ConfigFile implements Map<String,Section> {
* </ul>
*
* @param key The key. See {@link #getString(String)} for a description of the key.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
- *
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -332,16 +349,18 @@ public abstract class ConfigFile implements Map<String,Section> {
* Same as {@link #getObject(String, Type, Type...)} but allows you to specify the parser to use to parse the value.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
- * @param parser The parser to use for parsing the object.
- * If <jk>null</jk>, then uses the predefined parser on the config file.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
- *
+ * @param parser
+ * The parser to use for parsing the object.
+ * If <jk>null</jk>, then uses the predefined parser on the config file.
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -353,6 +372,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Same as {@link #getObject(String, Type, Type...)} except optimized for a non-parameterized class.
+ *
* <p>
* This is the preferred parse method for simple types since you don't need to cast the results.
*
@@ -380,8 +400,8 @@ public abstract class ConfigFile implements Map<String,Section> {
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param type The object type to create.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
* @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T getObject(String key, Class<T> type) throws ParseException {
@@ -393,12 +413,13 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param <T> The class type of the object being created.
* @param key The key. See {@link #getString(String)} for a description of the key.
- * @param parser The parser to use for parsing the object.
- * If <jk>null</jk>, then uses the predefined parser on the config file.
+ * @param parser
+ * The parser to use for parsing the object.
+ * If <jk>null</jk>, then uses the predefined parser on the config file.
* @param type The object type to create.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
* @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T getObject(String key, Parser parser, Class<T> type) throws ParseException {
@@ -409,13 +430,13 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key and converts it to the specified value.
+ *
* <p>
* Same as {@link #getObject(String, Class)}, but with a default value.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param def The default value if section or key does not exist.
* @param type The class to convert the value to.
- *
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -428,11 +449,11 @@ public abstract class ConfigFile implements Map<String,Section> {
* the value.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
- * @param parser The parser to use for parsing the object.
- * If <jk>null</jk>, then uses the predefined parser on the config file.
+ * @param parser
+ * The parser to use for parsing the object.
+ * If <jk>null</jk>, then uses the predefined parser on the config file.
* @param def The default value if section or key does not exist.
* @param type The class to convert the value to.
- *
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -445,18 +466,21 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key and converts it to the specified value.
+ *
* <p>
* Same as {@link #getObject(String, Type, Type...)}, but with a default value.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param def The default value if section or key does not exist.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -469,17 +493,19 @@ public abstract class ConfigFile implements Map<String,Section> {
* to parse the value.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
- * @param parser The parser to use for parsing the object.
- * If <jk>null</jk>, then uses the predefined parser on the config file.
+ * @param parser
+ * The parser to use for parsing the object.
+ * If <jk>null</jk>, then uses the predefined parser on the config file.
* @param def The default value if section or key does not exist.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
- *
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -492,6 +518,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key and converts it to the specified value.
+ *
* <p>
* Same as {@link #getObject(String, Class)}, but used when key is already broken into section/key.
*
@@ -510,7 +537,8 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param sectionName The section name. Must not be <jk>null</jk>.
* @param sectionKey The section key. Must not be <jk>null</jk>.
- * @param parser The parser to use for parsing the object.
+ * @param parser
+ * The parser to use for parsing the object.
* If <jk>null</jk>, then uses the predefined parser on the config file.
* @param c The class to convert the value to.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
@@ -524,19 +552,21 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key and converts it to the specified value.
+ *
* <p>
* Same as {@link #getObject(String, Type, Type...)}, but used when key is already broken into section/key.
*
* @param sectionName The section name. Must not be <jk>null</jk>.
* @param sectionKey The section key. Must not be <jk>null</jk>.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
- *
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -550,15 +580,18 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param sectionName The section name. Must not be <jk>null</jk>.
* @param sectionKey The section key. Must not be <jk>null</jk>.
- * @param parser The parser to use for parsing the object.
- * If <jk>null</jk>, then uses the predefined parser on the config file.
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param parser
+ * The parser to use for parsing the object.
+ * If <jk>null</jk>, then uses the predefined parser on the config file.
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @throws ParseException If parser could not parse the value or if a parser is not registered with this config file.
* @return The value, or <jk>null</jk> if the section or key does not exist.
*/
@@ -571,6 +604,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Gets the entry with the specified key.
+ *
* <p>
* The key can be in one of the following formats...
* <ul class='spaced-list'>
@@ -624,6 +658,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Convenience method for getting int config values.
+ *
* <p>
* <js>"M"</js> and <js>"K"</js> can be used to identify millions and thousands.
*
@@ -671,14 +706,15 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Adds or replaces an entry with the specified key with a POJO serialized to a string using the registered
* serializer.
+ *
* <p>
* Equivalent to calling <code>put(key, value, isEncoded(key))</code>.
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param value The new value POJO.
* @return The previous value, or <jk>null</jk> if the section or key did not previously exist.
- * @throws SerializeException If serializer could not serialize the value or if a serializer is not registered with
- * this config file.
+ * @throws SerializeException
+ * If serializer could not serialize the value or if a serializer is not registered with this config file.
* @throws UnsupportedOperationException If config file is read only.
*/
public final String put(String key, Object value) throws SerializeException {
@@ -690,11 +726,12 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param value The new value POJO.
- * @param serializer The serializer to use for serializing the object.
- * If <jk>null</jk>, then uses the predefined serializer on the config file.
+ * @param serializer
+ * The serializer to use for serializing the object.
+ * If <jk>null</jk>, then uses the predefined serializer on the config file.
* @return The previous value, or <jk>null</jk> if the section or key did not previously exist.
- * @throws SerializeException If serializer could not serialize the value or if a serializer is not registered with
- * this config file.
+ * @throws SerializeException
+ * If serializer could not serialize the value or if a serializer is not registered with this config file.
* @throws UnsupportedOperationException If config file is read only.
*/
public final String put(String key, Object value, Serializer serializer) throws SerializeException {
@@ -703,6 +740,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Adds or replaces an entry with the specified key with the specified value.
+ *
* <p>
* The format of the entry depends on the data type of the value.
* <ul class='spaced-list'>
@@ -720,11 +758,11 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param value The new value.
- * @param encoded If <jk>true</jk>, value is encoded by the registered encoder when the config file is persisted to
- * disk.
+ * @param encoded
+ * If <jk>true</jk>, value is encoded by the registered encoder when the config file is persisted to disk.
* @return The previous value, or <jk>null</jk> if the section or key did not previously exist.
- * @throws SerializeException If serializer could not serialize the value or if a serializer is not registered with
- * this config file.
+ * @throws SerializeException
+ * If serializer could not serialize the value or if a serializer is not registered with this config file.
* @throws UnsupportedOperationException If config file is read only.
*/
public final String put(String key, Object value, boolean encoded) throws SerializeException {
@@ -737,14 +775,15 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param key The key. See {@link #getString(String)} for a description of the key.
* @param value The new value.
- * @param serializer The serializer to use for serializing the object.
- * If <jk>null</jk>, then uses the predefined serializer on the config file.
- * @param encoded If <jk>true</jk>, value is encoded by the registered encoder when the config file is persisted
- * to disk.
+ * @param serializer
+ * The serializer to use for serializing the object.
+ * If <jk>null</jk>, then uses the predefined serializer on the config file.
+ * @param encoded
+ * If <jk>true</jk>, value is encoded by the registered encoder when the config file is persisted to disk.
* @param newline If <jk>true</jk>, a newline is added to the beginning of the input.
* @return The previous value, or <jk>null</jk> if the section or key did not previously exist.
- * @throws SerializeException If serializer could not serialize the value or if a serializer is not registered
- * with this config file.
+ * @throws SerializeException
+ * If serializer could not serialize the value or if a serializer is not registered with this config file.
* @throws UnsupportedOperationException If config file is read only.
*/
public final String put(String key, Object value, Serializer serializer, boolean encoded, boolean newline)
@@ -779,10 +818,12 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param sectionName The section name to write from.
* @param bean The bean to set the properties on.
- * @param ignoreUnknownProperties If <jk>true</jk>, don't throw an {@link IllegalArgumentException} if this section
- * contains a key that doesn't correspond to a setter method.
- * @param permittedPropertyTypes If specified, only look for setters whose property types
- * are those listed. If not specified, use all setters.
+ * @param ignoreUnknownProperties
+ * If <jk>true</jk>, don't throw an {@link IllegalArgumentException} if this section contains a key that doesn't
+ * correspond to a setter method.
+ * @param permittedPropertyTypes
+ * If specified, only look for setters whose property types are those listed.
+ * If not specified, use all setters.
* @return An object map of the changes made to the bean.
* @throws ParseException If parser was not set on this config file or invalid properties were found in the section.
* @throws IllegalArgumentException
@@ -837,6 +878,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Converts this config file section to the specified bean instance.
+ *
* <p>
* Key/value pairs in the config file section get copied as bean property values to the specified bean class.
*
@@ -867,8 +909,9 @@ public abstract class ConfigFile implements Map<String,Section> {
*
* @param sectionName The section name to write from.
* @param c The bean class to create.
- * @param ignoreUnknownProperties If <jk>false</jk>, throws a {@link ParseException} if the section contains an
- * entry that isn't a bean property name.
+ * @param ignoreUnknownProperties
+ * If <jk>false</jk>, throws a {@link ParseException} if the section contains an entry that isn't a bean property
+ * name.
* @return A new bean instance.
* @throws ParseException
*/
@@ -999,13 +1042,14 @@ public abstract class ConfigFile implements Map<String,Section> {
* @param name The section name.
* @param create Create the section if it's not there.
* @return The section, or <jk>null</jk> if section does not exist.
- * @throws UnsupportedOperationException If config file is read only and section doesn't exist and
- * <code>create</code> is <jk>true</jk>.
+ * @throws UnsupportedOperationException
+ * If config file is read only and section doesn't exist and <code>create</code> is <jk>true</jk>.
*/
protected abstract Section getSection(String name, boolean create);
/**
* Appends a section to this config file if it does not already exist.
+ *
* <p>
* Returns the existing section if it already exists.
*
@@ -1053,6 +1097,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Saves this config file to the specified writer as an INI file.
+ *
* <p>
* The writer will automatically be closed.
*
@@ -1085,6 +1130,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Merges the contents of the specified config file into this config file.
+ *
* <p>
* Pretty much identical to just replacing this config file, but causes the
* {@link ConfigFileListener#onChange(ConfigFile, Set)} method to be invoked on differences between the file.
@@ -1097,6 +1143,7 @@ public abstract class ConfigFile implements Map<String,Section> {
/**
* Returns the config file contents as a string.
+ *
* <p>
* The contents of the string are the same as the contents that would be serialized to disk.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java
index 39baf64..0abbd52 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java
@@ -45,6 +45,7 @@ public class ConfigFileBuilder {
/**
* Specify the encoder to use for encoded config file entries (e.g. <js>"mySecret*={...}"</js>).
+ *
* <p>
* The default value for this setting is an instance of {@link XorEncoder}.
*
@@ -58,6 +59,7 @@ public class ConfigFileBuilder {
/**
* Specify the serializer to use for serializing POJOs when using {@link ConfigFile#put(String, Object)}.
+ *
* <p>
* The default value for this setting is {@link JsonSerializer#DEFAULT_LAX}.
*
@@ -71,6 +73,7 @@ public class ConfigFileBuilder {
/**
* Specify the parser to use for parsing POJOs when using {@link ConfigFile#getObject(String,Class)}.
+ *
* <p>
* The default value for this setting is {@link JsonParser#DEFAULT}
*
@@ -84,6 +87,7 @@ public class ConfigFileBuilder {
/**
* Specify the config file character encoding.
+ *
* <p>
* The default value for this setting is {@link Charset#defaultCharset()}.
*
@@ -97,8 +101,10 @@ public class ConfigFileBuilder {
/**
* Specify the search paths for config files.
+ *
* <p>
* Can contain relative or absolute paths.
+ *
* <p>
* The default value for this setting is <code>[<js>"."</js>]</code>.
*
@@ -114,6 +120,7 @@ public class ConfigFileBuilder {
/**
* Make {@link ConfigFile ConfigFiles} read-only.
+ *
* <p>
* The default value of this setting is <jk>false</jk>.
*
@@ -126,6 +133,7 @@ public class ConfigFileBuilder {
/**
* Create config files if they cannot be found on the file system.
+ *
* <p>
* The default value for this setting is <jk>false</jk>.
*
@@ -160,6 +168,7 @@ public class ConfigFileBuilder {
/**
* Create a new config file backed by the specified file.
+ *
* <p>
* This method is provided primarily for testing purposes.
*
@@ -215,12 +224,13 @@ public class ConfigFileBuilder {
/**
* Implements command-line features for working with INI configuration files.
+ *
* <p>
* Invoke as a normal Java program...
- * <p>
* <p class='bcode'>
* java org.apache.juneau.ini.ConfigFileBuilder [args]
* </p>
+ *
* <p>
* Arguments can be any of the following...
* <ul class='spaced-list'>
@@ -241,6 +251,7 @@ public class ConfigFileBuilder {
* <code>setVals -configFile <configFile> -vals [var1=val1 [var2=val2...]] [-verbose]</code>
* Sets values in config files.
* </ul>
+ *
* <p>
* For example, the following command will create the file <code>'MyConfig.bat'</code> from the contents of the
* file <code>'MyConfig.cfg'</code>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java
index 4235099..5986ebc 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java
@@ -56,23 +56,31 @@ public final class ConfigFileImpl extends ConfigFile {
/**
* Constructor.
+ *
* <p>
* Loads the contents of the specified file into this config file.
+ *
* <p>
* If file does not initially exist, this object will start off empty.
*
- * @param file The INI file on disk.
- * If <jk>null</jk>, create an in-memory config file.
- * @param readOnly Make this configuration file read-only.
- * Attempting to set any values on this config file will cause {@link UnsupportedOperationException} to be thrown.
- * @param encoder The encoder to use for encoding sensitive values in this configuration file.
- * If <jk>null</jk>, defaults to {@link XorEncoder#INSTANCE}.
- * @param serializer The serializer to use for serializing POJOs in the {@link #put(String, Object)} method.
- * If <jk>null</jk>, defaults to {@link JsonSerializer#DEFAULT}.
- * @param parser The parser to use for parsing POJOs in the {@link #getObject(String,Class)} method.
- * If <jk>null</jk>, defaults to {@link JsonParser#DEFAULT}.
- * @param charset The charset on the files.
- * If <jk>null</jk>, defaults to {@link Charset#defaultCharset()}.
+ * @param file
+ * The INI file on disk.
+ * If <jk>null</jk>, create an in-memory config file.
+ * @param readOnly
+ * Make this configuration file read-only.
+ * Attempting to set any values on this config file will cause {@link UnsupportedOperationException} to be thrown.
+ * @param encoder
+ * The encoder to use for encoding sensitive values in this configuration file.
+ * If <jk>null</jk>, defaults to {@link XorEncoder#INSTANCE}.
+ * @param serializer
+ * The serializer to use for serializing POJOs in the {@link #put(String, Object)} method.
+ * If <jk>null</jk>, defaults to {@link JsonSerializer#DEFAULT}.
+ * @param parser
+ * The parser to use for parsing POJOs in the {@link #getObject(String,Class)} method.
+ * If <jk>null</jk>, defaults to {@link JsonParser#DEFAULT}.
+ * @param charset
+ * The charset on the files.
+ * If <jk>null</jk>, defaults to {@link Charset#defaultCharset()}.
* @throws IOException
*/
public ConfigFileImpl(File file, boolean readOnly, Encoder encoder, WriterSerializer serializer, ReaderParser parser,
@@ -94,6 +102,8 @@ public final class ConfigFileImpl extends ConfigFile {
/**
* Constructor.
+ *
+ * <p>
* Shortcut for calling <code><jk>new</jk> ConfigFileImpl(file, <jk>false</jk>, <jk>null</jk>, <jk>null</jk>,
* <jk>null</jk>, <jk>null</jk>);</code>
*
@@ -106,6 +116,8 @@ public final class ConfigFileImpl extends ConfigFile {
/**
* Constructor.
+ *
+ * <p>
* Shortcut for calling <code><jk>new</jk> ConfigFileImpl(<jk>null</jk>, <jk>false</jk>, <jk>null</jk>,
* <jk>null</jk>, <jk>null</jk>, <jk>null</jk>);</code>
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileListener.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileListener.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileListener.java
index 132311d..cfed21a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileListener.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileListener.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* Listener that can be used to listen for change events in config files.
+ *
* <p>
* Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java
index a2a221b..a39f8e8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java
@@ -25,10 +25,12 @@ import org.apache.juneau.svl.*;
import org.apache.juneau.svl.vars.*;
/**
- * Wraps an instance of {@link ConfigFileImpl} in an interface that will
- * automatically replace {@link VarResolver} variables.
+ * Wraps an instance of {@link ConfigFileImpl} in an interface that will automatically replace {@link VarResolver}
+ * variables.
+ *
* <p>
* The {@link ConfigFile#getResolving(VarResolver)} returns an instance of this class.
+ *
* <p>
* This class overrides the {@link #getString(String, String)} to resolve string variables.
* All other method calls are passed through to the inner config file.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/EntryListener.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/EntryListener.java b/juneau-core/src/main/java/org/apache/juneau/ini/EntryListener.java
index 2090f6a..87526c1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/EntryListener.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/EntryListener.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* Listener that can be used to listen for change events for a specific entry in a config file.
+ *
* <p>
* Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/SectionListener.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/SectionListener.java b/juneau-core/src/main/java/org/apache/juneau/ini/SectionListener.java
index 4c6c1e4..aec28c1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/SectionListener.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/SectionListener.java
@@ -18,6 +18,7 @@ import java.util.*;
/**
* Listener that can be used to listen for change events for a specific section in a config file.
+ *
* <p>
* Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/ini/XorEncoder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/XorEncoder.java b/juneau-core/src/main/java/org/apache/juneau/ini/XorEncoder.java
index 0504004..bbd6b3d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ini/XorEncoder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ini/XorEncoder.java
@@ -17,6 +17,7 @@ import static org.apache.juneau.internal.IOUtils.*;
/**
* Simply XOR+Base64 encoder for obscuring passwords and other sensitive data in INI config files.
+ *
* <p>
* This is not intended to be used as strong encryption.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ArrayUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ArrayUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ArrayUtils.java
index 4609631..760353f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/ArrayUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/ArrayUtils.java
@@ -112,6 +112,7 @@ public final class ArrayUtils {
/**
* Converts the specified array to a <code>Set</code>.
+ *
* <p>
* The order of the entries in the set are the same as the array.
*
@@ -158,6 +159,8 @@ public final class ArrayUtils {
/**
* Returns an iterator against an array.
+ *
+ * <p>
* This works with any array type (e.g. <code>String[]</code>, <code>Object[]</code>,
* <code><jk>int</jk>[]</code>, etc...).
*
@@ -190,6 +193,8 @@ public final class ArrayUtils {
/**
* Converts the specified collection to an array.
+ *
+ * <p>
* Works on both object and primitive arrays.
*
* @param c The collection to convert to an array.
@@ -219,8 +224,9 @@ public final class ArrayUtils {
* Converts the specified array to an <code>ArrayList</code>
*
* @param array The array to convert.
- * @param componentType The type of objects in the array.
- * It must match the actual component type in the array.
+ * @param componentType
+ * The type of objects in the array.
+ * It must match the actual component type in the array.
* @return A new {@link ArrayList}
*/
@SuppressWarnings("unchecked")
@@ -250,6 +256,8 @@ public final class ArrayUtils {
/**
* Copies the specified array into the specified list.
+ *
+ * <p>
* Works on both object and primitive arrays.
*
* @param array The array to copy into a list.
@@ -267,12 +275,13 @@ public final class ArrayUtils {
}
/**
- * Returns <jk>true</jk> if the specified array contains the specified element using the
- * {@link Object#equals(Object)} method.
+ * Returns <jk>true</jk> if the specified array contains the specified element using the {@link Object#equals(Object)}
+ * method.
*
* @param element The element to check for.
* @param array The array to check.
- * @return <jk>true</jk> if the specified array contains the specified element,
+ * @return
+ * <jk>true</jk> if the specified array contains the specified element,
* <jk>false</jk> if the array or element is <jk>null</jk>.
*/
public static <T> boolean contains(T element, T[] array) {
@@ -284,8 +293,9 @@ public final class ArrayUtils {
*
* @param element The element to check for.
* @param array The array to check.
- * @return The index position of the element in the specified array, or
- * <code>-1</code> if the array doesn't contain the element, or the array or element is <jk>null</jk>.
+ * @return
+ * The index position of the element in the specified array, or <code>-1</code> if the array doesn't contain the
+ * element, or the array or element is <jk>null</jk>.
*/
public static <T> int indexOf(T element, T[] array) {
if (element == null)
@@ -299,13 +309,14 @@ public final class ArrayUtils {
}
/**
- * Returns <jk>true</jk> if the specified array contains the specified element using the
- * {@link String#equals(Object)} method.
+ * Returns <jk>true</jk> if the specified array contains the specified element using the {@link String#equals(Object)}
+ * method.
*
* @param element The element to check for.
* @param array The array to check.
- * @return <jk>true</jk> if the specified array contains the specified element,
- * <jk>false</jk> if the array or element is <jk>null</jk>.
+ * @return
+ * <jk>true</jk> if the specified array contains the specified element,
+ * <jk>false</jk> if the array or element is <jk>null</jk>.
*/
public static boolean contains(String element, String[] array) {
return indexOf(element, array) != -1;
@@ -316,8 +327,9 @@ public final class ArrayUtils {
*
* @param element The element to check for.
* @param array The array to check.
- * @return The index position of the element in the specified array, or
- * <code>-1</code> if the array doesn't contain the element, or the array or element is <jk>null</jk>.
+ * @return
+ * The index position of the element in the specified array, or
+ * <code>-1</code> if the array doesn't contain the element, or the array or element is <jk>null</jk>.
*/
public static int indexOf(String element, String[] array) {
if (element == null)
@@ -331,8 +343,7 @@ public final class ArrayUtils {
}
/**
- * Converts a primitive wrapper array (e.g. <code>Integer[]</code>) to a primitive array (e.g.
- * <code><jk>int</jk>[]</code>).
+ * Converts a primitive wrapper array (e.g. <code>Integer[]</code>) to a primitive array (e.g. <code><jk>int</jk>[]</code>).
*
* @param o The array to convert. Must be a primitive wrapper array.
* @return A new array.
@@ -370,8 +381,9 @@ public final class ArrayUtils {
* Returns the first object in the specified collection or array.
*
* @param val The collection or array object.
- * @return The first object, or <jk>null</jk> if the collection or array is empty or <jk>null</jk> or the value
- * isn't a collection or array.
+ * @return
+ * The first object, or <jk>null</jk> if the collection or array is empty or <jk>null</jk> or the value
+ * isn't a collection or array.
*/
public static Object getFirst(Object val) {
if (val != null) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ByteArrayCache.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ByteArrayCache.java b/juneau-core/src/main/java/org/apache/juneau/internal/ByteArrayCache.java
index 93b9b67..0dde655 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/ByteArrayCache.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/ByteArrayCache.java
@@ -23,6 +23,8 @@ public class ByteArrayCache {
/**
* Default global byte array cache.
+ *
+ * <p>
* Note that this can't ever get garbage collected so don't add really large arrays!
*/
public static final ByteArrayCache DEFAULT = new ByteArrayCache();
@@ -33,8 +35,9 @@ public class ByteArrayCache {
* Add the specified byte array to this cache.
*
* @param contents The byte array to add to this cache.
- * @return Either the same byte array or a previously cached byte array depending on whether the byte array
- * already exists in the cache.
+ * @return
+ * Either the same byte array or a previously cached byte array depending on whether the byte array already
+ * exists in the cache.
*/
public byte[] cache(byte[] contents) {
if (contents == null)
@@ -48,8 +51,9 @@ public class ByteArrayCache {
* Add the specified input stream to this cache.
*
* @param contents The input stream whose contents are to be added to this cache.
- * @return Either the same byte array or a previously cached byte array depending on whether the byte array
- * already exists in the cache.
+ * @return
+ * Either the same byte array or a previously cached byte array depending on whether the byte array already
+ * exists in the cache.
* @throws IOException
*/
public byte[] cache(InputStream contents) throws IOException {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/Cache.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/Cache.java b/juneau-core/src/main/java/org/apache/juneau/internal/Cache.java
index 2b31062..e811bf5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/Cache.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/Cache.java
@@ -16,6 +16,7 @@ import java.util.concurrent.*;
/**
* Simple in-memory cache of objects.
+ *
* <p>
* Essentially just a wrapper around a ConcurrentHashMap.
*
@@ -59,8 +60,9 @@ public class Cache<K,V> {
*
* @param key The key.
* @param value The value.
- * @return Either the value already in the cache if it already exists, or the same value passed in.
- * Always returns the same value if the cache is disabled.
+ * @return
+ * Either the value already in the cache if it already exists, or the same value passed in.
+ * Always returns the same value if the cache is disabled.
*/
public V put(K key, V value) {
if (nocache)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java
index 00b7994..ca39426 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java
@@ -111,6 +111,7 @@ public final class ClassUtils {
/**
* Converts the string generated by {@link #getReadableClassName(Class)} back into a {@link Class}.
+ *
* <p>
* Generics are stripped from the string since they cannot be converted to a class.
*
@@ -174,6 +175,8 @@ public final class ClassUtils {
/**
* Returns the signature of the specified method.
+ *
+ * <p>
* For no-arg methods, the signature will be a simple string such as <js>"toString"</js>.
* For methods with one or more args, the arguments will be fully-qualified class names (e.g.
* <js>"append(java.util.StringBuilder,boolean)"</js>)
@@ -346,9 +349,11 @@ public final class ClassUtils {
/**
* Returns the specified annotation on the specified method.
+ *
* <p>
* Similar to {@link Method#getAnnotation(Class)}, but searches up the parent hierarchy for the annotation
* defined on parent classes and interfaces.
+ *
* <p>
* Normally, annotations defined on methods of parent classes and interfaces are not inherited by the child methods.
* This utility method gets around that limitation by searching the class hierarchy for the "same" method
@@ -364,18 +369,21 @@ public final class ClassUtils {
/**
* Returns the specified annotation on the specified method.
+ *
* <p>
* Similar to {@link Method#getAnnotation(Class)}, but searches up the parent hierarchy for the annotation defined
* on parent classes and interfaces.
+ *
* <p>
* Normally, annotations defined on methods of parent classes and interfaces are not inherited by the child methods.
* This utility method gets around that limitation by searching the class hierarchy for the "same" method
* (i.e. the same name and arguments).
*
* @param a The annotation to search for.
- * @param c The child class to start searching from.
- * Note that it can be a descendant class of the actual declaring class of the method passed in.
- * This allows you to find annotations on methods overridden by the method passed in.
+ * @param c
+ * The child class to start searching from.
+ * Note that it can be a descendant class of the actual declaring class of the method passed in.
+ * This allows you to find annotations on methods overridden by the method passed in.
* @param method The method to search.
* @return The annotation, or <jk>null</jk> if it wasn't found.
*/
@@ -407,6 +415,8 @@ public final class ClassUtils {
/**
* Locates the no-arg constructor for the specified class.
+ *
+ * <p>
* Constructor must match the visibility requirements specified by parameter 'v'.
* If class is abstract, always returns <jk>null</jk>.
* Note that this also returns the 1-arg constructor for non-static member classes.
@@ -519,14 +529,16 @@ public final class ClassUtils {
*
* @param c The class to look for the method.
* @param name The method name.
- * @param returnType The return type of the method.
- * Can be a super type of the actual return type.
- * For example, if the actual return type is <code>CharSequence</code>, then <code>Object</code> will match but
- * <code>String</code> will not.
- * @param parameterTypes The parameter types of the method.
- * Can be subtypes of the actual parameter types.
- * For example, if the parameter type is <code>CharSequence</code>, then <code>String</code> will match but
- * <code>Object</code> will not.
+ * @param returnType
+ * The return type of the method.
+ * Can be a super type of the actual return type.
+ * For example, if the actual return type is <code>CharSequence</code>, then <code>Object</code> will match but
+ * <code>String</code> will not.
+ * @param parameterTypes
+ * The parameter types of the method.
+ * Can be subtypes of the actual parameter types.
+ * For example, if the parameter type is <code>CharSequence</code>, then <code>String</code> will match but
+ * <code>Object</code> will not.
* @return The matched method, or <jk>null</jk> if no match was found.
*/
public static Method findPublicMethod(Class<?> c, String name, Class<?> returnType, Class<?>...parameterTypes) {
@@ -556,8 +568,9 @@ public final class ClassUtils {
* Finds a public constructor with the specified parameters without throwing an exception.
*
* @param c The class to search for a constructor.
- * @param parameterTypes The parameter types in the constructor.
- * Can be subtypes of the actual constructor argument types.
+ * @param parameterTypes
+ * The parameter types in the constructor.
+ * Can be subtypes of the actual constructor argument types.
* @return The matching constructor, or <jk>null</jk> if constructor could not be found.
*/
@SuppressWarnings("unchecked")
@@ -586,8 +599,9 @@ public final class ClassUtils {
*
* @param c The class we're trying to construct.
* @param args The arguments we want to pass into the constructor.
- * @return The constructor, or <jk>null</jk> if a public constructor could not be found that takes
- * in the specified arguments.
+ * @return
+ * The constructor, or <jk>null</jk> if a public constructor could not be found that takes in the specified
+ * arguments.
*/
public static <T> Constructor<T> findPublicConstructor(Class<T> c, Object...args) {
return findPublicConstructor(c, getClasses(args));
@@ -762,8 +776,9 @@ public final class ClassUtils {
* Creates an instance of the specified class without throwing exceptions.
*
* @param c The class to cast to.
- * @param c2 The class to instantiate.
- * Can also be an instance of the class.
+ * @param c2
+ * The class to instantiate.
+ * Can also be an instance of the class.
* @param args The arguments to pass to the constructor.
* @return The new class instance, or <jk>null</jk> if the class was <jk>null</jk> or is abstract or an interface.
* @throws RuntimeException if constructor could not be found or called.
[06/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
index ce8df39..6a190a5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
@@ -17,10 +17,12 @@ import org.apache.juneau.transform.*;
/**
* Transforms beans into {@link String Strings} by simply calling the {@link Object#toString()} method.
+ *
* <p>
* Allows you to specify classes that should just be converted to {@code Strings} instead of potentially
* being turned into Maps by the {@link BeanContext} (or worse, throwing
* {@link BeanRuntimeException BeanRuntimeExceptions}).
+ *
* <p>
* This is usually a one-way transform.
* Beans serialized as strings cannot be reconstituted using a parser unless it is a
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
index 805fbd7..578e915 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
@@ -28,7 +28,7 @@ import org.apache.juneau.transform.*;
* Transforms {@link Calendar Calendars} to {@link String Strings}.
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience to the following formats:
* <ul>
* <li>{@link ToString} - To {@link String Strings} using the {@code Date.toString()} method.
@@ -65,19 +65,25 @@ public class CalendarSwap extends StringSwap<Calendar> {
/**
* Constructor.
+ *
* <p>
* Only one of the <code>pattern</code> or <code>style</code> parameters should
*
- * @param pattern The {@link SimpleDateFormat} pattern.
- * If <jk>null</jk>, <code>style</code> is used instead.
- * @param dateStyle The {@link DateFormat} date style (e.g. {@link DateFormat#SHORT}).
- * Ignored if <code>pattern</code> is not <jk>null</jk>.
- * Ignored if <code>-1</code>.
- * @param timeStyle The {@link DateFormat} time style (e.g. {@link DateFormat#SHORT}).
- * Ignored if <code>pattern</code> is not <jk>null</jk>.
- * Ignored if <code>-1</code>.
- * @param timeZone The timeZone to use for dates. If <jk>null</jk> then either the timezone specified on the
- * {@link Calendar} object or the timezone returned by {@link BeanSession#getTimeZone()} is used.
+ * @param pattern
+ * The {@link SimpleDateFormat} pattern.
+ * If <jk>null</jk>, <code>style</code> is used instead.
+ * @param dateStyle
+ * The {@link DateFormat} date style (e.g. {@link DateFormat#SHORT}).
+ * Ignored if <code>pattern</code> is not <jk>null</jk>.
+ * Ignored if <code>-1</code>.
+ * @param timeStyle
+ * The {@link DateFormat} time style (e.g. {@link DateFormat#SHORT}).
+ * Ignored if <code>pattern</code> is not <jk>null</jk>.
+ * Ignored if <code>-1</code>.
+ * @param timeZone
+ * The timeZone to use for dates.
+ * If <jk>null</jk> then either the timezone specified on the {@link Calendar} object or the timezone returned by
+ * {@link BeanSession#getTimeZone()} is used.
*/
protected CalendarSwap(String pattern, int dateStyle, int timeStyle, TimeZone timeZone) {
this.pattern = pattern;
@@ -523,10 +529,12 @@ public class CalendarSwap extends StringSwap<Calendar> {
* Returns the {@link DateFormat} object for this session for formatting dates.
*
* @param session The current bean session.
- * @param c Optional <code>Calendar</code> object to copy <code>TimeZone</code> from if not specified in session or
- * <code>timeZone</code> setting.
- * @return The {@link DateFormat} object. Multiple calls to this method on the same session will return a cached
- * copy of date format object.
+ * @param c
+ * Optional <code>Calendar</code> object to copy <code>TimeZone</code> from if not specified in session or
+ * <code>timeZone</code> setting.
+ * @return
+ * The {@link DateFormat} object.
+ * Multiple calls to this method on the same session will return a cached copy of date format object.
*/
protected DateFormat getDateFormat(BeanSession session, Calendar c) {
DateFormat df = session.getFromCache(DateFormat.class, this.getClass().getName());
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
index 1bb74bb..a2c20ea 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
@@ -28,7 +28,7 @@ import org.apache.juneau.transform.*;
* Transforms {@link Date Dates} to {@link String Strings}.
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience to the following formats:
* <ul>
* <li>{@link ToString} - To {@link String Strings} using the {@code Date.toString()} method.
@@ -65,19 +65,24 @@ public class DateSwap extends StringSwap<Date> {
/**
* Constructor.
+ *
* <p>
* Only one of the <code>pattern</code> or <code>style</code> parameters should
*
- * @param pattern The {@link SimpleDateFormat} pattern.
- * If <jk>null</jk>, <code>style</code> is used instead.
- * @param dateStyle The {@link DateFormat} date style (e.g. {@link DateFormat#SHORT}).
- * Ignored if <code>pattern</code> is not <jk>null</jk>.
- * Ignored if <code>-1</code>.
- * @param timeStyle The {@link DateFormat} time style (e.g. {@link DateFormat#SHORT}).
- * Ignored if <code>pattern</code> is not <jk>null</jk>.
- * Ignored if <code>-1</code>.
- * @param timeZone The timeZone to use for dates. If <jk>null</jk> then the timezone returned by
- * {@link BeanSession#getTimeZone()} is used.
+ * @param pattern
+ * The {@link SimpleDateFormat} pattern.
+ * If <jk>null</jk>, <code>style</code> is used instead.
+ * @param dateStyle
+ * The {@link DateFormat} date style (e.g. {@link DateFormat#SHORT}).
+ * Ignored if <code>pattern</code> is not <jk>null</jk>.
+ * Ignored if <code>-1</code>.
+ * @param timeStyle
+ * The {@link DateFormat} time style (e.g. {@link DateFormat#SHORT}).
+ * Ignored if <code>pattern</code> is not <jk>null</jk>.
+ * Ignored if <code>-1</code>.
+ * @param timeZone
+ * The timeZone to use for dates.
+ * If <jk>null</jk> then the timezone returned by {@link BeanSession#getTimeZone()} is used.
*/
protected DateSwap(String pattern, int dateStyle, int timeStyle, TimeZone timeZone) {
this.pattern = pattern;
@@ -531,8 +536,9 @@ public class DateSwap extends StringSwap<Date> {
* Returns the {@link DateFormat} object for this session for formatting dates.
*
* @param session The current bean session.
- * @return The {@link DateFormat} object. Multiple calls to this method on the same session will return a cached
- * copy of date format object.
+ * @return
+ * The {@link DateFormat} object.
+ * Multiple calls to this method on the same session will return a cached copy of date format object.
*/
protected DateFormat getDateFormat(BeanSession session) {
DateFormat df = session.getFromCache(DateFormat.class, this.getClass().getName());
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
index d1846c7..d90c75b 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
@@ -19,6 +19,7 @@ import org.apache.juneau.transform.*;
/**
* Transforms {@link Enumeration Enumerations} to {@code List<Object>} objects.
+ *
* <p>
* This is a one-way transform, since {@code Enumerations} cannot be reconstituted.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
index 37ccaff..219baec 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
@@ -19,6 +19,7 @@ import org.apache.juneau.transform.*;
/**
* Transforms {@link Iterator Iterators} to {@code List<Object>} objects.
+ *
* <p>
* This is a one-way transform, since {@code Iterators} cannot be reconstituted.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
index 73f31e4..9c8a0a1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
@@ -28,16 +28,18 @@ import org.apache.juneau.xml.*;
* Transforms the contents of a {@link Reader} into an {@code Object}.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* The {@code Reader} must contain JSON, Juneau-generated XML (output from {@link XmlSerializer}), or Juneau-generated
* HTML (output from {@link JsonSerializer}) in order to be parsed correctly.
+ *
* <p>
* Useful for serializing models that contain {@code Readers} created by {@code RestCall} instances.
+ *
* <p>
* This is a one-way transform, since {@code Readers} cannot be reconstituted.
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience:
* <ul>
* <li>{@link Json} - Parses JSON text.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
index 31f26d3..ec0d9dc 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
@@ -23,8 +23,10 @@ import org.apache.juneau.transform.*;
/**
* Transforms {@link XMLGregorianCalendar XMLGregorianCalendars} to ISO8601 date-time {@link String Strings}.
+ *
* <p>
* Objects are converted to strings using {@link XMLGregorianCalendar#toXMLFormat()}.
+ *
* <p>
* Strings are converted to objects using {@link DatatypeFactory#newXMLGregorianCalendar(String)}.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonParser.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonParser.java
index 7985742..cc8a19c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonParser.java
@@ -29,15 +29,15 @@ import org.apache.juneau.transform.*;
* Parses UON (a notation for URL-encoded query parameter values) text into POJO models.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>text/uon</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* This parser uses a state machine, which makes it very fast and efficient.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link UonParserContext}
@@ -104,8 +104,9 @@ public class UonParser extends ReaderParser {
* @param eType The class type being parsed, or <jk>null</jk> if unknown.
* @param r The reader being parsed.
* @param outer The outer object (for constructing nested inner classes).
- * @param isUrlParamValue If <jk>true</jk>, then we're parsing a top-level URL-encoded value which is treated a bit
- * different than the default case.
+ * @param isUrlParamValue
+ * If <jk>true</jk>, then we're parsing a top-level URL-encoded value which is treated a bit different than the
+ * default case.
* @param pMeta The current bean property being parsed.
* @return The parsed object.
* @throws Exception
@@ -676,7 +677,7 @@ public class UonParser extends ReaderParser {
private static final AsciiSet endCharsParam = new AsciiSet(""+AMP), endCharsNormal = new AsciiSet(",)"+AMP);
- /**
+ /*=
* Parses a string of the form "'foo'"
* All whitespace within parenthesis are preserved.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserBuilder.java
index b3ee739..168c539 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserBuilder.java
@@ -54,13 +54,14 @@ public class UonParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Decode <js>"%xx"</js> sequences.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UonParser.decodeChars"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk> for {@link UonParser}, <jk>true</jk> for {@link UrlEncodingParser}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specify <jk>true</jk> if URI encoded characters should be decoded, <jk>false</jk> if they've already been
* decoded before being passed to this parser.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserContext.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserContext.java
index 7cf666b..aa5a02a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserContext.java
@@ -18,9 +18,11 @@ import org.apache.juneau.urlencoding.*;
/**
* Configurable properties on the {@link UonParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -41,13 +43,14 @@ public class UonParserContext extends ParserContext {
/**
* <b>Configuration property:</b> Decode <js>"%xx"</js> sequences.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UonParser.decodeChars"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk> for {@link UonParser}, <jk>true</jk> for {@link UrlEncodingParser}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specify <jk>true</jk> if URI encoded characters should be decoded, <jk>false</jk> if they've already been decoded
* before being passed to this parser.
@@ -59,6 +62,7 @@ public class UonParserContext extends ParserContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserSession.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserSession.java
index 95f685a..6fe5ef6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonParserSession.java
@@ -24,6 +24,7 @@ import org.apache.juneau.parser.*;
/**
* Session object that lives for the duration of a single use of {@link UonParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -35,24 +36,30 @@ public class UonParserSession extends ParserSession {
/**
* 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.
- * @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>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @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>
+ * @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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public UonParserSession(UonParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
@@ -67,19 +74,22 @@ public class UonParserSession extends ParserSession {
/**
* Create a specialized parser session for parsing URL parameters.
+ *
* <p>
* The main difference is that characters are never decoded, and the {@link UonParserContext#UON_decodeChars}
* property is always ignored.
*
* @param ctx The context to copy setting from.
- * @param input The input. Can be any of the following types:
- * <ul>
- * <li><jk>null</jk>
- * <li>{@link Reader}
- * <li>{@link CharSequence} (e.g. {@link String})
- * <li>{@link InputStream} - Read as UTF-8 encoded character stream.
- * <li>{@link File} - Read as system-default encoded stream.
- * </ul>
+ * @param input
+ * The input.
+ * Can be any of the following types:
+ * <ul>
+ * <li><jk>null</jk>
+ * <li>{@link Reader}
+ * <li>{@link CharSequence} (e.g. {@link String})
+ * <li>{@link InputStream} - Read as UTF-8 encoded character stream.
+ * <li>{@link File} - Read as system-default encoded stream.
+ * </ul>
*/
public UonParserSession(UonParserContext ctx, Object input) {
super(ctx, null, input, null, null, null, null, null);
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonReader.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonReader.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonReader.java
index 169896e..2f932bb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonReader.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonReader.java
@@ -18,8 +18,10 @@ import org.apache.juneau.parser.*;
/**
* Same functionality as {@link ParserReader} except automatically decoded <code>%xx</code> escape sequences.
+ *
* <p>
* Escape sequences are assumed to be encoded UTF-8. Extended Unicode (>\u10000) is supported.
+ *
* <p>
* If decoding is enabled, the following character replacements occur so that boundaries are not lost:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializer.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializer.java
index 346645e..c910bab 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializer.java
@@ -28,27 +28,28 @@ import org.apache.juneau.transform.*;
* Serializes POJO models to UON (a notation for URL-encoded query parameter values).
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/uon</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/uon</code>
*
* <h5 class='section'>Description:</h5>
- * <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'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link UonSerializerContext}
* <li>{@link BeanContext}
* </ul>
+ *
* <p>
* The following shows a sample object defined in Javascript:
- * </p>
* <p class='bcode'>
* {
* id: 1,
@@ -71,10 +72,9 @@ import org.apache.juneau.transform.*;
* ]
* }
* </p>
+ *
* <p>
- * Using the "strict" syntax defined in this document, the equivalent
- * UON notation would be as follows:
- * </p>
+ * Using the "strict" syntax defined in this document, the equivalent UON notation would be as follows:
* <p class='bcode'>
* (
* <ua>id</ua>=<un>1</un>,
@@ -208,8 +208,9 @@ public class UonSerializer extends WriterSerializer {
* @param out The writer to serialize to.
* @param o The object being serialized.
* @param eType The expected type of the object if this is a bean property.
- * @param attrName The bean property name if this is a bean property.
- * <jk>null</jk> if this isn't a bean property being serialized.
+ * @param attrName
+ * The bean property name if this is a bean property.
+ * <jk>null</jk> if this isn't a bean property being serialized.
* @param pMeta The bean property metadata.
* @return The same writer passed in.
* @throws Exception
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerBuilder.java
index c516626..42ce35f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerBuilder.java
@@ -54,15 +54,17 @@ public class UonSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Encode non-valid URI characters.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UonSerializer.encodeChars"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk> for {@link UonSerializer}, <jk>true</jk> for {@link UrlEncodingSerializer}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Encode non-valid URI characters with <js>"%xx"</js> constructs.
+ *
* <p>
* If <jk>true</jk>, non-valid URI characters will be converted to <js>"%xx"</js> sequences.
* Set to <jk>false</jk> if parameter value is being passed to some other code that will already perform
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerContext.java
index 15ca313..f20dba1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerContext.java
@@ -18,9 +18,11 @@ import org.apache.juneau.urlencoding.*;
/**
* Configurable properties on the {@link UonSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -41,15 +43,17 @@ public class UonSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Encode non-valid URI characters.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UonSerializer.encodeChars"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk> for {@link UonSerializer}, <jk>true</jk> for {@link UrlEncodingSerializer}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Encode non-valid URI characters with <js>"%xx"</js> constructs.
+ *
* <p>
* If <jk>true</jk>, non-valid URI characters will be converted to <js>"%xx"</js> sequences.
* Set to <jk>false</jk> if parameter value is being passed to some other code that will already perform
@@ -59,19 +63,21 @@ public class UonSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UonSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
* 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.
+ *
* <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}.
@@ -80,15 +86,17 @@ public class UonSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Format to use for query/form-data/header values.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UrlEncodingSerializer.paramFormat"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"UON"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the format to use for URL GET parameter keys and values.
+ *
* <p>
* The possible values are:
* <ul class='spaced-list'>
@@ -116,6 +124,7 @@ public class UonSerializerContext extends SerializerContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerSession.java
index 82c2e42..df88809 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonSerializerSession.java
@@ -25,6 +25,7 @@ import org.apache.juneau.serializer.*;
/**
* Session object that lives for the duration of a single use of {@link UonSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -38,20 +39,25 @@ public class UonSerializerSession 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.
+ * @param ctx
+ * The context creating this session object.
+ * The context contains all the configuration settings for this object.
* @param encode Override the {@link UonSerializerContext#UON_encodeChars} setting.
* @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.
+ * @param op
+ * The override properties.
+ * 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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
protected UonSerializerSession(UonSerializerContext ctx, Boolean encode, ObjectMap op, Object output,
Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/uon/UonUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/uon/UonUtils.java b/juneau-core/src/main/java/org/apache/juneau/uon/UonUtils.java
index 811b716..50290da 100644
--- a/juneau-core/src/main/java/org/apache/juneau/uon/UonUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/uon/UonUtils.java
@@ -26,6 +26,7 @@ public final class UonUtils {
/**
* Returns <jk>true</jk> if the specified string needs to be quoted per UON notation.
+ *
* <p>
* For example, strings that start with '(' or '@' or look like boolean or numeric values need to be quoted.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
index a419e48..3c71a4a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingContext.java
@@ -14,17 +14,20 @@ package org.apache.juneau.urlencoding;
/**
* Configurable properties on the {@link UrlEncodingSerializer} and {@link UrlEncodingParser} classes.
+ *
* <p>
* Use the {@link UrlEncodingSerializerBuilder#property(String, Object)} and
- * {@link UrlEncodingParserBuilder#property(String, Object)} methods to set property values.
+ * {@link UrlEncodingParserBuilder#property(String, Object)} methods to set property values.
*/
public final class UrlEncodingContext implements Cloneable {
/**
* Serialize bean property collections/arrays as separate key/value pairs ({@link Boolean}, default=<jk>false</jk>).
+ *
* <p>
* If <jk>false</jk>, serializing the array <code>[1,2,3]</code> results in <code>?key=$a(1,2,3)</code>.
* If <jk>true</jk>, serializing the same array results in <code>?key=1&key=2&key=3</code>.
+ *
* <p>
* Example:
* <p class='bcode'>
@@ -39,6 +42,7 @@ public final class UrlEncodingContext implements Cloneable {
* String ss1 = s1.serialize(<jk>new</jk> A()); <jc>// Produces "f1=(a,b)&f2=(c,d)"</jc>
* String ss2 = s2.serialize(<jk>new</jk> A()); <jc>// Produces "f1=a&f1=b&f2=c&f2=d"</jc>
* </p>
+ *
* <p>
* This option only applies to beans.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
index de01c47..d07d778 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
@@ -30,19 +30,21 @@ import org.apache.juneau.uon.*;
* Parses URL-encoded text into POJO models.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>application/x-www-form-urlencoded</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Parses URL-Encoded text (e.g. <js>"foo=bar&baz=bing"</js>) into POJOs.
+ *
* <p>
* Expects parameter values to be in UON notation.
+ *
* <p>
* This parser uses a state machine, which makes it very fast and efficient.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link UonParserContext}
@@ -61,6 +63,7 @@ public class UrlEncodingParser extends UonParser implements PartParser {
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public UrlEncodingParser(PropertyStore propertyStore) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
index 4e96bb4..71b6383 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserBuilder.java
@@ -35,6 +35,7 @@ public class UrlEncodingParserBuilder extends UonParserBuilder {
/**
* Constructor.
+ *
* @param propertyStore The initial configuration settings for this builder.
*/
public UrlEncodingParserBuilder(PropertyStore propertyStore) {
@@ -53,13 +54,14 @@ public class UrlEncodingParserBuilder extends UonParserBuilder {
/**
* <b>Configuration property:</b> Serialize bean property collections/arrays as separate key/value pairs.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UrlEncoding.expandedParams"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>false</jk>, serializing the array <code>[1,2,3]</code> results in <code>?key=$a(1,2,3)</code>.
* If <jk>true</jk>, serializing the same array results in <code>?key=1&key=2&key=3</code>.
@@ -77,6 +79,7 @@ public class UrlEncodingParserBuilder extends UonParserBuilder {
* String ss1 = p1.serialize(<jk>new</jk> A()); <jc>// Produces "f1=(a,b)&f2=(c,d)"</jc>
* String ss2 = p2.serialize(<jk>new</jk> A()); <jc>// Produces "f1=a&f1=b&f2=c&f2=d"</jc>
* </p>
+ *
* <p>
* This option only applies to beans.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
index c26779a..fbcb41b 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.uon.*;
/**
* Configurable properties on the {@link UrlEncodingParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*/
@@ -30,6 +32,7 @@ public class UrlEncodingParserContext extends UonParserContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserSession.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserSession.java
index a31768c..5c1ff7e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserSession.java
@@ -22,6 +22,7 @@ import org.apache.juneau.uon.*;
/**
* Session object that lives for the duration of a single use of {@link UrlEncodingParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -32,9 +33,12 @@ public class UrlEncodingParserSession extends UonParserSession {
/**
* 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.
- * @param input The input. Can be any of the following types:
+ * @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}
@@ -42,14 +46,17 @@ public class UrlEncodingParserSession extends UonParserSession {
* <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 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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public UrlEncodingParserSession(UrlEncodingParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
index 4db9313..e5c40c4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
@@ -33,26 +33,26 @@ import org.apache.juneau.uon.*;
* Serializes POJO models to URL-encoded notation with UON-encoded values (a notation for URL-encoded query paramter values).
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>application/x-www-form-urlencoded</code>
* <p>
* Produces <code>Content-Type</code> types: <code>application/x-www-form-urlencoded</code>
*
* <h5 class='section'>Description:</h5>
- * <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'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link UonSerializerContext}
* <li>{@link BeanContext}
* </ul>
+ *
* <p>
* The following shows a sample object defined in Javascript:
- * </p>
* <p class='bcode'>
* {
* id: 1,
@@ -75,10 +75,9 @@ import org.apache.juneau.uon.*;
* ]
* }
* </p>
+ *
* <p>
- * Using the "strict" syntax defined in this document, the equivalent
- * URL-encoded notation would be as follows:
- * </p>
+ * Using the "strict" syntax defined in this document, the equivalent URL-encoded notation would be as follows:
* <p class='bcode'>
* <ua>id</ua>=<un>1</un>
* &<ua>name</ua>=<us>'John+Smith'</us>,
@@ -155,6 +154,7 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public Expanded(PropertyStore propertyStore) {
@@ -174,6 +174,7 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public Readable(PropertyStore propertyStore) {
@@ -193,6 +194,7 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public PlainText(PropertyStore propertyStore) {
@@ -209,6 +211,7 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
/**
* Constructor.
+ *
* @param propertyStore The property store containing all the settings for this object.
*/
public UrlEncodingSerializer(PropertyStore propertyStore) {
@@ -227,8 +230,7 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
}
/**
- * Workhorse method. Determines the type of object, and then calls the
- * appropriate type-specific serialization method.
+ * Workhorse method. Determines the type of object, and then calls the appropriate type-specific serialization method.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private SerializerWriter serializeAnything(UrlEncodingSerializerSession session, UonWriter out, Object o) throws Exception {
@@ -405,15 +407,19 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
//--------------------------------------------------------------------------------
/**
- * Converts the specified object to a string using this serializers {@link BeanSession#convertToType(Object, Class)} method
- * and runs {@link URLEncoder#encode(String,String)} against the results.
+ * Converts the specified object to a string using this serializers {@link BeanSession#convertToType(Object, Class)}
+ * method and runs {@link URLEncoder#encode(String,String)} against the results.
+ *
+ * <p>
* Useful for constructing URL parts.
*
* @param o The object to serialize.
- * @param urlEncode URL-encode the string if necessary.
- * If <jk>null</jk>, then uses the value of the {@link UonSerializerContext#UON_encodeChars} setting.
- * @param plainTextParams Whether we're using plain-text params.
- * If <jk>null</jk>, then uses the value from the {@link UrlEncodingSerializerContext#URLENC_paramFormat} setting.
+ * @param urlEncode
+ * URL-encode the string if necessary.
+ * If <jk>null</jk>, then uses the value of the {@link UonSerializerContext#UON_encodeChars} setting.
+ * @param plainTextParams
+ * Whether we're using plain-text params.
+ * If <jk>null</jk>, then uses the value from the {@link UrlEncodingSerializerContext#URLENC_paramFormat} setting.
* @return The serialized object.
*/
private String serializePart(Object o, Boolean urlEncode, Boolean plainTextParams) {
@@ -446,7 +452,8 @@ public class UrlEncodingSerializer extends UonSerializer implements PartSerializ
//--------------------------------------------------------------------------------
@Override /* Serializer */
- public UrlEncodingSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
+ public UrlEncodingSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale,
+ TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
return new UrlEncodingSerializerSession(ctx, null, op, output, javaMethod, locale, timeZone, mediaType, uriContext);
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
index abaf23f..16e8f51 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerBuilder.java
@@ -33,6 +33,7 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
/**
* Constructor.
+ *
* @param propertyStore The initial configuration settings for this builder.
*/
public UrlEncodingSerializerBuilder(PropertyStore propertyStore) {
@@ -51,13 +52,14 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
/**
* <b>Configuration property:</b> Serialize bean property collections/arrays as separate key/value pairs.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UrlEncoding.expandedParams"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>false</jk>, serializing the array <code>[1,2,3]</code> results in <code>?key=$a(1,2,3)</code>.
* If <jk>true</jk>, serializing the same array results in <code>?key=1&key=2&key=3</code>.
@@ -75,6 +77,7 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
* String ss1 = s1.serialize(<jk>new</jk> A()); <jc>// Produces "f1=(a,b)&f2=(c,d)"</jc>
* String ss2 = s2.serialize(<jk>new</jk> A()); <jc>// Produces "f1=a&f1=b&f2=c&f2=d"</jc>
* </p>
+ *
* <p>
* This option only applies to beans.
*
@@ -101,15 +104,17 @@ public class UrlEncodingSerializerBuilder extends UonSerializerBuilder {
/**
* <b>Configuration property:</b> Format to use for top-level query names and simple parameters.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"UrlEncodingSerializer.paramFormat"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"UON"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the format to use for URL GET parameter keys and values.
+ *
* <p>
* The possible values are:
* <ul class='spaced-list'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
index d7ff160..87531c4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.uon.*;
/**
* Configurable properties on the {@link UrlEncodingSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*/
@@ -31,6 +33,7 @@ public class UrlEncodingSerializerContext extends UonSerializerContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerSession.java
index d9c39d9..e2dd42a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerSession.java
@@ -22,6 +22,7 @@ import org.apache.juneau.uon.*;
/**
* Session object that lives for the duration of a single use of {@link UrlEncodingSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -32,22 +33,28 @@ public class UrlEncodingSerializerSession extends UonSerializerSession {
/**
* Create a new session using properties specified in the context.
*
- * @param ctx The context creating this session object.
+ * @param ctx
+ * The context creating this session object.
* The context contains all the configuration settings for this object.
* @param encode Overrides the {@link UonSerializerContext#UON_encodeChars} setting.
* @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types.
- * @param op The override properties.
+ * @param op
+ * The override properties.
* 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.
+ * @param locale
+ * The session locale.
* If <jk>null</jk>, then the locale defined on the context is used.
- * @param timeZone The session timezone.
+ * @param timeZone
+ * The session timezone.
* 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.
+ * @param uriContext
+ * The URI context.
* Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
- public UrlEncodingSerializerSession(UrlEncodingSerializerContext ctx, Boolean encode, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
+ public UrlEncodingSerializerSession(UrlEncodingSerializerContext ctx, Boolean encode, ObjectMap op, Object output,
+ Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
super(ctx, encode, op, output, javaMethod, locale, timeZone, mediaType, uriContext);
if (op == null || op.isEmpty()) {
expandedParams = ctx.expandedParams;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/urlencoding/annotation/UrlEncoding.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/annotation/UrlEncoding.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/annotation/UrlEncoding.java
index fd7bd75..2576e58 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/annotation/UrlEncoding.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/annotation/UrlEncoding.java
@@ -31,6 +31,7 @@ public @interface UrlEncoding {
/**
* When true, bean properties of type array or Collection will be expanded into multiple key/value pairings.
+ *
* <p>
* This annotation is identical in behavior to using the {@link UrlEncodingContext#URLENC_expandedParams}
* property, but applies to only instances of this bean.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/AList.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/AList.java b/juneau-core/src/main/java/org/apache/juneau/utils/AList.java
index 7d5dc64..6a0fc9c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/AList.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/AList.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* An extension of {@link LinkedList} with a convenience {@link #append(Object)} method.
+ *
* <p>
* Primarily used for testing purposes for quickly creating populated lists.
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/AMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/AMap.java b/juneau-core/src/main/java/org/apache/juneau/utils/AMap.java
index 8fe5d92..e6a8420 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/AMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/AMap.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* An extension of {@link LinkedHashMap} with a convenience {@link #append(Object,Object)} method.
+ *
* <p>
* Primarily used for testing purposes for quickly creating populated maps.
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/ASet.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ASet.java b/juneau-core/src/main/java/org/apache/juneau/utils/ASet.java
index 86dc8ca..65320cc 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ASet.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ASet.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* An extension of {@link LinkedHashSet} with a convenience {@link #append(Object)} method.
+ *
* <p>
* Primarily used for testing purposes for quickly creating populated sets.
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/Args.java b/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
index 240d609..fd8c8ad 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/Args.java
@@ -21,11 +21,14 @@ import org.apache.juneau.*;
/**
* Utility class to make it easier to work with command-line arguments pass in through a
* <code>main(String[] args)</code> method.
+ *
* <p>
* Used to parse command-line arguments of the form
* <js>"[zero or more main arguments] [zero or more optional arguments]"</js>.
+ *
* <p>
* The format of a main argument is a token that does not start with <js>'-'</js>.
+ *
* <p>
* The format of an optional argument is <js>"-argName [zero or more tokens]"</js>.
*
@@ -83,6 +86,7 @@ import org.apache.juneau.*;
* List<String> a2 = a.getArgs(<js>"a2"</js>); <jc>// Contains ["v2a","v2b"]</jc>
* }
* </p>
+ *
* <p>
* Main arguments are available through numeric string keys (e.g. <js>"0"</js>, <js>"1"</js>, ...).
* So you could use the {@link ObjectMap} API to convert main arguments directly to POJOs, such as an <code>Enum</code>
@@ -93,6 +97,7 @@ import org.apache.juneau.*;
* <jc>// Get 1st main argument as an integer</jc>
* int i = a.get(<jk>int</jk>.<jk>class</jk>, <js>"0"</js>);
* </p>
+ *
* <p>
* Equivalent operations are available on optional arguments through the {@link #getArg(Class, String)} method.
*/
@@ -136,6 +141,7 @@ public final class Args extends ObjectMap {
/**
* Returns main argument at the specified index, or <jk>null</jk> if the index is out of range.
+ *
* <p>
* Can be used in conjunction with {@link #hasArg(int)} to check for existence of arg.
* <p class='bcode'>
@@ -146,6 +152,7 @@ public final class Args extends ObjectMap {
* <jc>// Get the first argument</jc>
* String firstArg = args.getArg(0);
* </p>
+ *
* <p>
* Since main arguments are stored as numeric keys, this method is essentially equivalent to...
* <p class='bcode'>
@@ -176,6 +183,7 @@ public final class Args extends ObjectMap {
/**
* Returns the optional argument value, or blank if the optional argument was not specified.
+ *
* <p>
* If the optional arg has multiple values, returns values as a comma-delimited list.
*
@@ -193,6 +201,7 @@ public final class Args extends ObjectMap {
/**
* Returns the optional argument value converted to the specified object type.
+ *
* <p>
* If the optional arg has multiple values, returns only the first converted value.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/IOPipe.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/IOPipe.java b/juneau-core/src/main/java/org/apache/juneau/utils/IOPipe.java
index e4f94af..8637929 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/IOPipe.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/IOPipe.java
@@ -23,6 +23,7 @@ import org.apache.juneau.internal.*;
/**
* A utility class for piping input streams and readers to output streams and writers.
+ *
* <p>
* A typical usage is as follows...
* <p class='bcode'>
@@ -30,6 +31,7 @@ import org.apache.juneau.internal.*;
* Writer out = getWriter();
* IOPipe.create(in, out).closeOut().run();
* </p>
+ *
* <p>
* By default, the input stream is closed and the output stream is not.
* This can be changed by calling {@link #closeOut()} and {@link #close(boolean, boolean)}.
@@ -108,6 +110,8 @@ public class IOPipe {
/**
* Specifies whether the content should be piped line-by-line.
+ *
+ * <p>
* This can be useful if you're trying to pipe console-based input.
*
* @param byLines Pipe content line-by-line. Default is <jk>false</jk>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/ManifestFile.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ManifestFile.java b/juneau-core/src/main/java/org/apache/juneau/utils/ManifestFile.java
index fb024ba..1690a19 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ManifestFile.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ManifestFile.java
@@ -23,6 +23,7 @@ import org.apache.juneau.*;
/**
* Utility class for working with Jar manifest files.
+ *
* <p>
* Copies the contents of a {@link Manifest} into an {@link ObjectMap} so that the various convenience methods on that
* class can be used to retrieve values.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java b/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
index 0df8d33..2a10f00 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/MessageBundle.java
@@ -24,6 +24,7 @@ import org.apache.juneau.annotation.*;
/**
* Wraps a {@link ResourceBundle} to provide some useful additional functionality.
+ *
* <ul class='spaced-list'>
* <li>
* Instead of throwing {@link MissingResourceException}, the {@link #getString(String)} method
@@ -72,8 +73,8 @@ public class MessageBundle extends ResourceBundle {
private final ConcurrentHashMap<Locale,MessageBundle> localizedBundles = new ConcurrentHashMap<Locale,MessageBundle>();
/**
- * Sets the locale for this thread so that calls to {@link #getClientString(String, Object...)} return
- * messages in that locale.
+ * Sets the locale for this thread so that calls to {@link #getClientString(String, Object...)} return messages in
+ * that locale.
*
* @param locale The new client locale.
*/
@@ -85,10 +86,10 @@ public class MessageBundle extends ResourceBundle {
* Constructor.
*
* @param forClass The class using this resource bundle.
- * @param bundlePath The path of the resource bundle to wrap.
- * This can be an absolute path (e.g. <js>"com.foo.MyMessages"</js>) or a path
- * relative to the package of the <l>forClass</l> (e.g. <js>"MyMessages"</js> if <l>forClass</l> is
- * <js>"com.foo.MyClass"</js>).
+ * @param bundlePath
+ * The path of the resource bundle to wrap.
+ * This can be an absolute path (e.g. <js>"com.foo.MyMessages"</js>) or a path relative to the package of the
+ * <l>forClass</l> (e.g. <js>"MyMessages"</js> if <l>forClass</l> is <js>"com.foo.MyClass"</js>).
*/
public MessageBundle(Class<?> forClass, String bundlePath) {
this(forClass, bundlePath, Locale.getDefault());
@@ -136,7 +137,10 @@ public class MessageBundle extends ResourceBundle {
/**
* Add another bundle path to this resource bundle.
+ *
+ * <p>
* Order of property lookup is first-to-last.
+ *
* <p>
* This method must be called from the same thread as the call to the constructor.
* This eliminates the need for synchronization.
@@ -166,9 +170,10 @@ public class MessageBundle extends ResourceBundle {
*
* @param key The resource bundle key.
* @param args Optional {@link MessageFormat}-style arguments.
- * @return The resolved value. Never <jk>null</jk>.
- * <js>"{!!key}"</js> if the bundle is missing.
- * <js>"{!key}"</js> if the key is missing.
+ * @return
+ * The resolved value. Never <jk>null</jk>.
+ * <js>"{!!key}"</js> if the bundle is missing.
+ * <js>"{!key}"</js> if the key is missing.
*/
public String getString(String key, Object...args) {
String s = getString(key);
@@ -183,9 +188,10 @@ public class MessageBundle extends ResourceBundle {
* @param locale The locale of the resource bundle to retrieve message from.
* @param key The resource bundle key.
* @param args Optional {@link MessageFormat}-style arguments.
- * @return The resolved value. Never <jk>null</jk>.
- * <js>"{!!key}"</js> if the bundle is missing.
- * <js>"{!key}"</js> if the key is missing.
+ * @return
+ * The resolved value. Never <jk>null</jk>.
+ * <js>"{!!key}"</js> if the bundle is missing.
+ * <js>"{!key}"</js> if the key is missing.
*/
public String getString(Locale locale, String key, Object...args) {
if (locale == null)
@@ -194,14 +200,14 @@ public class MessageBundle extends ResourceBundle {
}
/**
- * Same as {@link #getString(String, Object...)} but uses the locale specified on the call to
- * {@link #setClientLocale(Locale)}.
+ * Same as {@link #getString(String, Object...)} but uses the locale specified on the call to {@link #setClientLocale(Locale)}.
*
* @param key The resource bundle key.
* @param args Optional {@link MessageFormat}-style arguments.
- * @return The resolved value. Never <jk>null</jk>.
- * <js>"{!!key}"</js> if the bundle is missing.
- * <js>"{!key}"</js> if the key is missing.
+ * @return
+ * The resolved value. Never <jk>null</jk>.
+ * <js>"{!!key}"</js> if the bundle is missing.
+ * <js>"{!key}"</js> if the key is missing.
*/
public String getClientString(String key, Object...args) {
return getString(clientLocale.get(), key, args);
@@ -283,10 +289,12 @@ public class MessageBundle extends ResourceBundle {
/**
* Returns this resource bundle as an {@link ObjectMap}.
+ *
* <p>
* Useful for debugging purposes.
* Note that any class that implements a <code>toObjectMap()</code> method will automatically be serialized by
* calling this method and serializing the result.
+ *
* <p>
* This method always constructs a new {@link ObjectMap} on each call.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/MetadataMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/MetadataMap.java b/juneau-core/src/main/java/org/apache/juneau/utils/MetadataMap.java
index 127536b..459f200 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/MetadataMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/MetadataMap.java
@@ -20,8 +20,10 @@ import org.apache.juneau.*;
/**
* Utility class for quick lookup of class metadata instances.
+ *
* <p>
* Class instances are created once and then cached.
+ *
* <p>
* Classes must have a constructor that takes in a single argument.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java b/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
index 26879ca..c1350a0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/ObjectUtils.java
@@ -17,8 +17,10 @@ import org.apache.juneau.transform.*;
/**
* Utility class for efficiently converting objects between types.
+ *
* <p>
* If the value isn't an instance of the specified type, then converts the value if possible.
+ *
* <p>
* The following conversions are valid:
* <table class='styled'>
@@ -165,8 +167,9 @@ public class ObjectUtils {
* Converts the specified object to the specified type.
*
* @param <T> The class type to convert the value to.
- * @param outer If class is a member class, this is the instance of the containing class.
- * Should be <jk>null</jk> if not a member class.
+ * @param outer
+ * If class is a member class, this is the instance of the containing class.
+ * Should be <jk>null</jk> if not a member class.
* @param value The value to convert.
* @param type The class type to convert the value to.
* @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
@@ -175,5 +178,4 @@ public class ObjectUtils {
public static <T> T convertToType(Object outer, Object value, Class<T> type) {
return session.convertToType(outer, value, type);
}
-
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
index 3c4a32c..1ee714e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoIntrospector.java
@@ -61,24 +61,27 @@ public final class PojoIntrospector {
* Primary method. Invokes the specified method on this bean.
*
* @param method The method being invoked.
- * @param args The arguments to pass as parameters to the method.
- * These will automatically be converted to the appropriate object type if possible.
- * Can be <jk>null</jk> if method has no arguments.
+ * @param args
+ * The arguments to pass as parameters to the method.
+ * These will automatically be converted to the appropriate object type if possible.
+ * Can be <jk>null</jk> if method has no arguments.
* @return The object returned by the call to the method, or <jk>null</jk> if target object is <jk>null</jk>.
- * @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>
+ * @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>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
* @throws IOException
@@ -95,25 +98,28 @@ public final class PojoIntrospector {
* Convenience method for invoking argument from method signature (@see {@link ClassUtils#getMethodSignature(Method)}.
*
* @param method The method being invoked.
- * @param args The arguments to pass as parameters to the method.
- * These will automatically be converted to the appropriate object type if possible.
- * Can be <jk>null</jk> if method has no arguments.
+ * @param args
+ * The arguments to pass as parameters to the method.
+ * These will automatically be converted to the appropriate object type if possible.
+ * Can be <jk>null</jk> if method has no arguments.
* @return The object returned by the call to the method, or <jk>null</jk> if target object is <jk>null</jk>.
* @throws NoSuchMethodException If method does not exist.
- * @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>
+ * @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>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
* @throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java b/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
index 9b83677..d448a7c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/PojoQuery.java
@@ -25,8 +25,10 @@ import org.apache.juneau.internal.*;
/**
* Designed to provide search/view/sort/paging filtering on tabular in-memory POJO models.
+ *
* <p>
* It can also perform just view filtering on beans/maps.
+ *
* <p>
* Examples of tabular POJO models:
* <ul>
@@ -35,6 +37,7 @@ import org.apache.juneau.internal.*;
* <li><tt>Map[]</tt>
* <li><tt>Bean[]</tt>
* </ul>
+ *
* <p>
* Tabular POJO models can be thought of as tables of data. For example, a list of the following beans...
* <p class='bcode'>
@@ -46,11 +49,12 @@ import org.apache.juneau.internal.*;
* <p>
* ... can be thought of a table containing the following columns...
* <p>
- * <table class='styled code'>
- * <tr><th>myInt</th><th>myString</th><th>myDate</th></tr>
- * <tr><td>123</td><td>'foobar'</td><td>yyyy/MM/dd HH:mm:ss</td></tr>
- * <tr><td colspan=3>...</td></tr>
- * </table>
+ * <table class='styled code'>
+ * <tr><th>myInt</th><th>myString</th><th>myDate</th></tr>
+ * <tr><td>123</td><td>'foobar'</td><td>yyyy/MM/dd HH:mm:ss</td></tr>
+ * <tr><td colspan=3>...</td></tr>
+ * </table>
+ *
* <p>
* From this table, you can perform the following functions:
* <ul class='spaced-list'>
@@ -65,7 +69,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>Search</h5>
- * <p>
+ *
* The search capabilities allow you to filter based on query patterns against strings, dates, and numbers.
* Queries take the form of a Map with column names as keys, and search patterns as values.
* <br>Multiple search patterns are ANDed (i.e. all patterns must match for the row to be returned).
@@ -81,7 +85,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>String Patterns</h5>
- * <p>
+ *
* Any objects can be queried against using string patterns.
* If the objects being searched are not strings, then the patterns are matched against whatever is return by the
* {@code Object#toString()} method.
@@ -107,7 +111,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>Numeric Patterns</h5>
- * <p>
+ *
* Any object of type {@link Number} (or numeric primitives) can be searched using numeric patterns.
*
* <h6 class='topic'>Example numeric query patterns:</h6>
@@ -131,11 +135,12 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>Date Patterns</h5>
- * <p>
+ *
* Any object of type {@link Date} or {@link Calendar} can be searched using date patterns.
+ *
* <p>
- * The default valid input timestamp formats (which can be overridden via the
- * {@link #setValidTimestampFormats(String...)} method are...
+ * The default valid input timestamp formats (which can be overridden via the {@link #setValidTimestampFormats(String...)}
+ * method are...
*
* <ul>
* <li><tt>yyyy.MM.dd.HH.mm.ss</tt>
@@ -162,7 +167,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>View</h5>
- * <p>
+ *
* The view capability allows you to return only the specified subset of columns in the specified order.
* <br>The view parameter is a list of either <tt>Strings</tt> or <tt>Maps</tt>.
*
@@ -173,7 +178,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>Sort</h5>
- * <p>
+ *
* The sort capability allows you to sort values by the specified rows.
* <br>The sort parameter is a list of strings with an optional <js>'+'</js> or <js>'-'</js> suffix representing
* ascending and descending order accordingly.
@@ -187,7 +192,7 @@ import org.apache.juneau.internal.*;
* </ul>
*
* <h5 class='topic'>Paging</h5>
- * <p>
+ *
* Use the <tt>position</tt> and <tt>limit</tt> parameters to specify a subset of rows to return.
*/
@SuppressWarnings({"unchecked","rawtypes"})
@@ -672,6 +677,8 @@ public final class PojoQuery {
/**
* Returns <jk>true</jk> if the specified date matches the pattern passed in through the constructor.
+ *
+ * <p>
* <br>The Object can be of type {@link Date} or {@link Calendar}.
* <br>Always returns <jk>false</jk> on <jk>null</jk> input.
*/
@@ -1124,6 +1131,8 @@ public final class PojoQuery {
/**
* Replaces tokens in a string with a different token.
+ *
+ * <p>
* replace("A and B and C", "and", "or") -> "A or B or C"
* replace("andandand", "and", "or") -> "ororor"
* replace(null, "and", "or") -> null
[03/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/ResponseHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/ResponseHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/ResponseHandler.java
index 43dbc4f..710f81c 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/ResponseHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/ResponseHandler.java
@@ -22,9 +22,11 @@ import org.apache.juneau.rest.response.*;
/**
* Defines the interface for handlers that convert POJOs to appropriate HTTP responses.
+ *
* <p>
* The {@link RestServlet} API uses the concept of registered response handlers for converting objects returned by REST
* methods or set through {@link RestResponse#setOutput(Object)} into appropriate HTTP responses.
+ *
* <p>
* Response handlers can be associated with {@link RestServlet RestServlets} through the following ways:
* <ul class='spaced-list'>
@@ -34,6 +36,7 @@ import org.apache.juneau.rest.response.*;
* By calling the {@link RestConfig#addResponseHandlers(Class...)} and augmenting or creating your
* own list of handlers.
* </ul>
+ *
* <p>
* By default, {@link RestServlet RestServlets} are registered with the following response handlers:
* <ul class='spaced-list'>
@@ -52,9 +55,11 @@ import org.apache.juneau.rest.response.*;
* <li>
* {@link StreamableHandler} - Handles {@link Streamable} objects.
* </ul>
+ *
* <p>
* Response handlers can be used to process POJOs that cannot normally be handled through Juneau serializers, or
* because it's simply easier to define response handlers for special cases.
+ *
* <p>
* The following example shows how to create a response handler to handle special <code>Foo</code> objects outside the
* normal Juneau architecture.
@@ -96,10 +101,12 @@ public interface ResponseHandler {
* @param res The HTTP servlet response;
* @param output The POJO returned by the REST method that now needs to be sent to the response.
* @return true If this handler handled the response.
- * @throws IOException If low-level exception occurred on output stream.
- * Results in a {@link HttpServletResponse#SC_INTERNAL_SERVER_ERROR} error.
- * @throws RestException If some other exception occurred.
- * Can be used to provide an appropriate HTTP response code and message.
+ * @throws IOException
+ * If low-level exception occurred on output stream.
+ * Results in a {@link HttpServletResponse#SC_INTERNAL_SERVER_ERROR} error.
+ * @throws RestException
+ * If some other exception occurred.
+ * Can be used to provide an appropriate HTTP response code and message.
*/
boolean handle(RestRequest req, RestResponse res, Object output) throws IOException, RestException;
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestCallHandler.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestCallHandler.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestCallHandler.java
index 663b184..3e8b6da 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestCallHandler.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestCallHandler.java
@@ -28,9 +28,11 @@ import org.apache.juneau.rest.vars.*;
/**
* Class that handles the basic lifecycle of an HTTP REST call.
+ *
* <p>
* Subclasses can override these methods to tailor how HTTP REST calls are handled.
* Subclasses MUST implement a public constructor that takes in a {@link RestContext} object.
+ *
* <p>
* RestCallHandlers are associated with servlets/resources in one of the following ways:
* <ul>
@@ -59,6 +61,7 @@ public class RestCallHandler {
/**
* Creates a {@link RestRequest} object based on the specified incoming {@link HttpServletRequest} object.
+ *
* <p>
* Subclasses may choose to override this method to provide a specialized request object.
*
@@ -73,6 +76,7 @@ public class RestCallHandler {
/**
* Creates a {@link RestResponse} object based on the specified incoming {@link HttpServletResponse} object
* and the request returned by {@link #createRequest(HttpServletRequest)}.
+ *
* <p>
* Subclasses may choose to override this method to provide a specialized response object.
*
@@ -87,6 +91,7 @@ public class RestCallHandler {
/**
* The main service method.
+ *
* <p>
* Subclasses can optionally override this method if they want to tailor the behavior of requests.
*
@@ -191,9 +196,11 @@ public class RestCallHandler {
/**
* The main method for serializing POJOs passed in through the {@link RestResponse#setOutput(Object)} method or
* returned by the Java method.
+ *
* <p>
* Subclasses may override this method if they wish to modify the way the output is rendered or support other output
* formats.
+ *
* <p>
* The default implementation simply iterates through the response handlers on this resource
* looking for the first one whose {@link ResponseHandler#handle(RestRequest, RestResponse, Object)} method returns
@@ -215,6 +222,7 @@ public class RestCallHandler {
/**
* Handle the case where a matching method was not found.
+ *
* <p>
* Subclasses can override this method to provide a 2nd-chance for specifying a response.
* The default implementation will simply throw an exception with an appropriate message.
@@ -240,9 +248,11 @@ public class RestCallHandler {
/**
* Method for handling response errors.
+ *
* <p>
* The default implementation logs the error and calls
* {@link #renderError(HttpServletRequest,HttpServletResponse,RestException)}.
+ *
* <p>
* Subclasses can override this method to provide their own custom error response handling.
*
@@ -259,9 +269,11 @@ public class RestCallHandler {
/**
* Method for rendering response errors.
+ *
* <p>
* The default implementation renders a plain text English message, optionally with a stack trace if
* {@link RestContext#REST_renderResponseStackTraces} is enabled.
+ *
* <p>
* Subclasses can override this method to provide their own custom error response handling.
*
@@ -302,8 +314,10 @@ public class RestCallHandler {
/**
* Callback method for listening for successful completion of requests.
+ *
* <p>
* Subclasses can override this method for gathering performance statistics.
+ *
* <p>
* The default implementation does nothing.
*
@@ -318,6 +332,7 @@ public class RestCallHandler {
/**
* Callback method that gets invoked right before the REST Java method is invoked.
+ *
* <p>
* Subclasses can override this method to override request headers or set request-duration properties before the
* Java method is invoked.
@@ -333,6 +348,7 @@ public class RestCallHandler {
/**
* Callback method that gets invoked right after the REST Java method is invoked, but before the serializer is
* invoked.
+ *
* <p>
* Subclasses can override this method to override request and response headers, or set/override properties used by
* the serializer.
@@ -348,6 +364,7 @@ public class RestCallHandler {
/**
* Returns the session objects for the specified request.
+ *
* <p>
* The default implementation simply returns a single map containing <code>{'req':req}</code>.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
index 0e99c03..dee6d29 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java
@@ -41,8 +41,10 @@ import org.apache.juneau.svl.vars.*;
/**
* Defines the initial configuration of a <code>RestServlet</code> or <code>@RestResource</code> annotated object.
+ *
* <p>
* An extension of the {@link ServletConfig} object used during servlet initialization.
+ *
* <p>
* Provides access to the following initialized resources:
* <ul>
@@ -50,10 +52,12 @@ import org.apache.juneau.svl.vars.*;
* <li>{@link #getProperties()} - The modifiable configuration properties for this resource.
* <li>{@link #getVarResolverBuilder()} - The variable resolver for this resource.
* </ul>
+ *
* <p>
* Methods are provided for overriding or augmenting the information provided by the <ja>@RestResource</ja> annotation.
* In general, most information provided in the <ja>@RestResource</ja> annotation can be specified programmatically
* through calls on this object.
+ *
* <p>
* To interact with this object, simply implement the following init method in your resource class:
* <p class='bcode'>
@@ -63,9 +67,11 @@ import org.apache.juneau.svl.vars.*;
* <jk>super</jk>.init(config); <jc>// Make sure this is the last line! (or just leave it out entirely)</jc>
* }
* </p>
+ *
* <p>
* Note that this method is identical to {@link HttpServlet#init(ServletConfig)} except you get access to
* this object instead. Also, this method can throw any exception, not just a {@link ServletException}.
+ *
* <p>
* The parent <code>init(RestServletConfig)</code> method will construct a read-only {@link RestContext} object
* that contains a snapshot of these settings. If you call <code><jk>super</jk>.init(RestServletConfig)</code> before
@@ -124,6 +130,7 @@ public class RestConfig implements ServletConfig {
/**
* Constructor.
+ *
* @param config The servlet config passed into the servlet by the servlet container.
* @param resource The class annotated with <ja>@RestResource</ja>.
* @throws ServletException Something bad happened.
@@ -273,9 +280,11 @@ public class RestConfig implements ServletConfig {
/**
* Adds the specified {@link Var} classes to this config.
+ *
* <p>
* These variables affect the variable resolver returned by {@link RestRequest#getVarResolverSession()} which is
* used to resolve string variables of the form <js>"$X{...}"</js>.
+ *
* <p>
* By default, this config includes the following variables:
* <ul>
@@ -285,6 +294,7 @@ public class RestConfig implements ServletConfig {
* <li>{@link IfVar}
* <li>{@link SwitchVar}
* </ul>
+ *
* <p>
* Later during the construction of {@link RestContext}, we add the following variables:
* <ul>
@@ -307,9 +317,11 @@ public class RestConfig implements ServletConfig {
/**
* Adds a var context object to this config.
+ *
* <p>
* Var context objects are read-only objects associated with the variable resolver for vars that require external
* information.
+ *
* <p>
* For example, the {@link ConfigFileVar} needs access to this resource's {@link ConfigFile} through the
* {@link ConfigFileVar#SESSION_config} object that can be specified as either a session object (temporary) or
@@ -330,6 +342,7 @@ public class RestConfig implements ServletConfig {
/**
* Overwrites the default config file with a custom config file.
+ *
* <p>
* By default, the config file is determined using the {@link RestResource#config() @RestResource.config()}
* annotation.
@@ -345,6 +358,7 @@ public class RestConfig implements ServletConfig {
/**
* Sets a property on this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#properties()} annotation.
*
@@ -359,8 +373,10 @@ public class RestConfig implements ServletConfig {
/**
* Sets multiple properties on this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#properties() @RestResource.properties()} annotation.
+ *
* <p>
* Values in the map are added to the existing properties and are overwritten if duplicates are found.
*
@@ -374,9 +390,11 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level bean filters to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#beanFilters() @RestResource.beanFilters()}
* annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -391,8 +409,10 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level pojo swaps to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#pojoSwaps() @RestResource.pojoSwaps()} annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -407,6 +427,7 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the serializer listener class to use for listening to non-fatal serialization errors.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#serializerListener() @RestResource.serializerListener()} annotation.
@@ -422,6 +443,7 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the parser listener class to use for listening to non-fatal parse errors.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#parserListener() @RestResource.parserListener()} annotation.
@@ -437,6 +459,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level parameter resolvers to this resource.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#paramResolvers() @RestResource.paramResolvers()} annotation.
@@ -451,9 +474,11 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level serializers to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#serializers() @RestResource.serializers()}
* annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -468,6 +493,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level serializers to this resource.
+ *
* <p>
* Same as {@link #addSerializers(Class...)} except allows you to pass in serializer instances.
* The actual serializer ends up being the result of this operation using the bean filters, pojo swaps, and
@@ -475,6 +501,7 @@ public class RestConfig implements ServletConfig {
* <p class='bcode'>
* serializer = serializer.builder().beanFilters(beanFilters).pojoSwaps(pojoSwaps).properties(properties).build();
* </p>
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -489,8 +516,10 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level parsers to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#parsers() @RestResource.parsers()} annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -505,6 +534,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level parsers to this resource.
+ *
* <p>
* Same as {@link #addParsers(Class...)} except allows you to pass in parser instances.
* The actual parser ends up being the result of this operation using the bean filters, pojo swaps, and properties
@@ -512,6 +542,7 @@ public class RestConfig implements ServletConfig {
* <p class='bcode'>
* parser = parser.builder().beanFilters(beanFilters).pojoSwaps(pojoSwaps).properties(properties).build();
* </p>
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -526,11 +557,14 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level encoders to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#encoders() @RestResource.encoders()} annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
+ *
* <p>
* By default, only the {@link IdentityEncoder} is included in this list.
*
@@ -544,6 +578,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level encoders to this resource.
+ *
* <p>
* Same as {@link #addEncoders(Class...)} except allows you to pass in encoder instances.
*
@@ -557,12 +592,15 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level converters to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#converters() @RestResource.converters()}
* annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
+ *
* <p>
* By default, this config includes the following converters:
* <ul>
@@ -584,6 +622,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level encoders to this resource.
+ *
* <p>
* Same as {@link #addConverters(Class...)} except allows you to pass in converter instances.
*
@@ -597,8 +636,10 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level guards to this resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#guards() @RestResource.guards()} annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -613,6 +654,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level guards to this resource.
+ *
* <p>
* Same as {@link #addGuards(Class...)} except allows you to pass in guard instances.
*
@@ -626,14 +668,17 @@ public class RestConfig implements ServletConfig {
/**
* Adds MIME-type definitions.
+ *
* <p>
* These definitions are used in the following locations for setting the media type on responses:
* <ul>
* <li>{@link RestRequest#getReaderResource(String)}
* <li>Static files resolved through {@link RestResource#staticFiles()}
* </ul>
+ *
* <p>
* Refer to {@link MimetypesFileTypeMap#addMimeTypes(String)} for an explanation of the format.
+ *
* <p>
* By default, this config includes the following mime-type definitions:
* <ul>
@@ -658,10 +703,12 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level default HTTP request headers to this resource.
+ *
* <p>
* Default request headers are default values for when HTTP requests do not specify a header value.
* For example, you can specify a default value for <code>Accept</code> if a request does not specify that header
* value.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#defaultRequestHeaders() @RestResource.defaultRequestHeaders()} annotation.
@@ -677,10 +724,12 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level default HTTP request headers to this resource.
+ *
* <p>
* Default request headers are default values for when HTTP requests do not specify a header value.
* For example, you can specify a default value for <code>Accept</code> if a request does not specify that header
* value.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#defaultRequestHeaders() @RestResource.defaultRequestHeaders()} annotation.
@@ -701,12 +750,15 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level default HTTP response headers to this resource.
+ *
* <p>
* Default response headers are headers that will be appended to all responses if those headers have not already been
* set on the response object.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#defaultResponseHeaders() @RestResource.defaultResponseHeaders()} annotation.
+ *
* <p>
* Values are added AFTER those found in the annotation and therefore take precedence over those defined via the
* annotation.
@@ -722,9 +774,11 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level default HTTP response headers to this resource.
+ *
* <p>
* Default response headers are headers that will be appended to all responses if those headers have not already been
* set on the response object.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#defaultResponseHeaders() @RestResource.defaultResponseHeaders()} annotation.
@@ -745,8 +799,10 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level response handler classes to this resource.
+ *
* <p>
* Response handlers are responsible for converting various POJOs returned by REST methods into actual HTTP responses.
+ *
* <p>
* By default, this config includes the following response handlers:
* <ul>
@@ -757,6 +813,7 @@ public class RestConfig implements ServletConfig {
* <li>{@link RedirectHandler}
* <li>{@link DefaultHandler}
* </ul>
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#responseHandlers() @RestResource.responseHandlers()} annotation.
@@ -771,6 +828,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds class-level response handlers to this resource.
+ *
* <p>
* Same as {@link #addResponseHandlers(Class...)} except allows you to pass in response handler instances.
*
@@ -784,8 +842,10 @@ public class RestConfig implements ServletConfig {
/**
* Adds a child resource to this resource.
+ *
* <p>
* Child resources are resources that are accessed under the path of the parent resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#children() @RestResource.children()} annotation.
*
@@ -800,8 +860,10 @@ public class RestConfig implements ServletConfig {
/**
* Add child resources to this resource.
+ *
* <p>
* Child resources are resources that are accessed under the path of the parent resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#children() @RestResource.children()} annotation.
*
@@ -816,8 +878,10 @@ public class RestConfig implements ServletConfig {
/**
* Add child resources to this resource.
+ *
* <p>
* Child resources are resources that are accessed under the path of the parent resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#children() @RestResource.children()} annotation.
*
@@ -832,8 +896,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the list of supported <code>Accept</code> media types for this resource.
+ *
* <p>
* This overrides the media types inferred from the parsers on this resource.
+ *
* <p>
* There is no annotation equivalent to this method call.
*
@@ -849,8 +915,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the list of supported <code>Accept</code> media types for this resource.
+ *
* <p>
* This overrides the media types inferred from the parsers on this resource.
+ *
* <p>
* There is no annotation equivalent to this method call.
*
@@ -864,8 +932,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the list of supported <code>Content-Type</code> media types for this resource.
+ *
* <p>
* This overrides the media types inferred from the serializers on this resource.
+ *
* <p>
* There is no annotation equivalent to this method call.
*
@@ -881,8 +951,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the list of supported <code>Content-Type</code> media types for this resource.
+ *
* <p>
* This overrides the media types inferred from the serializers on this resource.
+ *
* <p>
* There is no annotation equivalent to this method call.
*
@@ -896,8 +968,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the stylesheets that make up the contents of the page <js>"/resource-path/styles.css"</js>.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#stylesheet() @RestResource.stylesheet()} annotation.
+ *
* <p>
* The object types can be any of the following:
* <ul>
@@ -907,6 +981,8 @@ public class RestConfig implements ServletConfig {
* <li>{@link CharSequence}
* <li><code><jk>byte</jk>[]</code>
* </ul>
+ *
+ * <p>
* The contents of all these stylesheets will be aggregated into a single page in the order they are specified in
* this list.
*
@@ -920,15 +996,18 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the stylesheet that make up the contents of the page <js>"/resource-path/styles.css"</js>.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#stylesheet() @RestResource.stylesheet()} annotation.
+ *
* <p>
* Use this method to specify a resource located in the classpath.
* This call uses the {@link Class#getResourceAsStream(String)} method to retrieve the stylesheet contents.
*
* @param resourceClass The resource class used to resolve the resource stream.
- * @param resourcePath The path passed to the {@link Class#getResourceAsStream(String)} method.
- * Can also be a path starting with <js>"file://"</js> denoting a location to pull from the file system.
+ * @param resourcePath
+ * The path passed to the {@link Class#getResourceAsStream(String)} method.
+ * Can also be a path starting with <js>"file://"</js> denoting a location to pull from the file system.
* @return This object (for method chaining).
*/
public RestConfig setStyleSheet(Class<?> resourceClass, String resourcePath) {
@@ -939,6 +1018,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds to the stylesheet that make up the contents of the page <js>"/resource-path/styles.css"</js>.
+ *
* <p>
* Same as {@link #setStyleSheet(Object...)} except appends to the existing list instead of replacing.
*
@@ -954,6 +1034,7 @@ public class RestConfig implements ServletConfig {
/**
* Adds to the stylesheet that make up the contents of the page <js>"/resource-path/styles.css"</js>.
+ *
* <p>
* Same as {@link #setStyleSheet(Class,String)} except appends to the existing list instead of replacing.
*
@@ -970,8 +1051,10 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the icon contents that make up the contents of the page <js>"/resource-path/favicon.ico"</js>.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#favicon() @RestResource.favicon()} annotation.
+ *
* <p>
* The object type can be any of the following:
* <ul>
@@ -990,15 +1073,18 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the icon contents that make up the contents of the page <js>"/resource-path/favicon.ico"</js>.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#favicon() @RestResource.favicon()} annotation.
+ *
* <p>
* Use this method to specify a resource located in the classpath.
* This call uses the {@link Class#getResourceAsStream(String)} method to retrieve the stylesheet contents.
*
* @param resourceClass The resource class used to resolve the resource stream.
- * @param resourcePath The path passed to the {@link Class#getResourceAsStream(String)} method.
- * Can also be a path starting with <js>"file://"</js> denoting a location to pull from the file system.
+ * @param resourcePath
+ * The path passed to the {@link Class#getResourceAsStream(String)} method.
+ * Can also be a path starting with <js>"file://"</js> denoting a location to pull from the file system.
* @return This object (for method chaining).
*/
public RestConfig setFavIcon(Class<?> resourceClass, String resourcePath) {
@@ -1008,17 +1094,20 @@ public class RestConfig implements ServletConfig {
/**
* Appends to the static files resource map.
+ *
* <p>
* Use this method to specify resources located in the classpath to be served up as static files.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#staticFiles() @RestResource.staticFiles()}
* annotation.
*
* @param resourceClass The resource class used to resolve the resource streams.
- * @param staticFilesString A JSON string denoting a map of child URLs to classpath subdirectories.
- * For example, if this string is <js>"{htdocs:'docs'}"</js> with class <code>com.foo.MyResource</code>,
- * then URLs of the form <js>"/resource-path/htdocs/..."</js> will resolve to files located in the
- * <code>com.foo.docs</code> package.
+ * @param staticFilesString
+ * A JSON string denoting a map of child URLs to classpath subdirectories.
+ * For example, if this string is <js>"{htdocs:'docs'}"</js> with class <code>com.foo.MyResource</code>,
+ * then URLs of the form <js>"/resource-path/htdocs/..."</js> will resolve to files located in the
+ * <code>com.foo.docs</code> package.
* @return This object (for method chaining).
*/
public RestConfig addStaticFiles(Class<?> resourceClass, String staticFilesString) {
@@ -1030,10 +1119,12 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the default REST resource resolver.
+ *
* <p>
* The resource resolver is used to resolve instances from {@link Class} objects defined in the
* {@link RestResource#children()} annotation.
* The default value is the base class {@link RestResourceResolver}.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#resourceResolver() @RestResource.resourceResolver()} annotation.
@@ -1048,6 +1139,7 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the default REST resource resolver.
+ *
* <p>
* Same as {@link #setResourceResolver(Class)} except allows you to specify an instance instead of a class.
*
@@ -1061,6 +1153,7 @@ public class RestConfig implements ServletConfig {
/**
* Sets the URL path of the resource <js>"/foobar"</js>.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#path() @RestResource.path()} annotation.
*
@@ -1076,6 +1169,7 @@ public class RestConfig implements ServletConfig {
/**
* Sets name of the header used to denote the client version on HTTP requests.
+ *
* <p>
* This is the programmatic equivalent to the
* {@link RestResource#clientVersionHeader() @RestResource.clientVersionHeader()} annotation.
@@ -1090,11 +1184,14 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML page title.
+ *
* <p>
* The format of this value is plain text.
+ *
* <p>
* It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added
* to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -1104,11 +1201,13 @@ public class RestConfig implements ServletConfig {
* <li><code>{servletClass}.title</code> resource bundle value.
* <li><code>info/title</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(title)</code> annotation to specify the
@@ -1116,6 +1215,7 @@ public class RestConfig implements ServletConfig {
* However, this annotation is provided in cases where you want the page title to be different that the one
* shown in the swagger document.
* </ul>
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#title() @HtmlDoc.title()} annotation.
*
@@ -1129,11 +1229,14 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML page description.
+ *
* <p>
* The format of this value is plain text.
+ *
* <p>
* It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then
* added to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -1145,11 +1248,13 @@ public class RestConfig implements ServletConfig {
* <li><code>{servletClass}.description</code> resource bundle value.
* <li><code>info/description</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(description)</code> or
@@ -1157,6 +1262,7 @@ public class RestConfig implements ServletConfig {
* However, this annotation is provided in cases where you want the text to be different that the values shown
* in the swagger document.
* </ul>
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#description() @HtmlDoc.description()} annotation.
*
@@ -1170,14 +1276,19 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML page branding in the header section of the page generated by the default HTML doc template.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* This is arbitrary HTML that can be added to the header section to provide basic custom branding on the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#branding() @HtmlDoc.branding()} annotation.
*
@@ -1191,18 +1302,24 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML header section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The page header normally contains the title and description, but this value can be used to override the contents
* to be whatever you want.
+ *
* <p>
* When a value is specified, the {@link #setHtmlTitle(String)} and {@link #setHtmlDescription(String)} values will
* be ignored.
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no header.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#header() @HtmlDoc.header()} annotation.
*
@@ -1216,17 +1333,23 @@ public class RestConfig implements ServletConfig {
/**
* Sets the links in the HTML nav section.
+ *
* <p>
* The format of this value is a lax-JSON map of key/value pairs where the keys are the link text and the values are
* relative (to the servlet) or absolute URLs.
+ *
* <p>
* The page links are positioned immediately under the title and text.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This field can also use URIs of any support type in {@link UriResolver}.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#links() @HtmlDoc.links()} annotation.
*
@@ -1240,18 +1363,25 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML nav section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The nav section of the page contains the links.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* When a value is specified, the {@link #setHtmlLinks(String)} value will be ignored.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#nav() @HtmlDoc.nav()} annotation.
*
@@ -1265,14 +1395,19 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML aside section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The aside section typically floats on the right side of the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#aside() @HtmlDoc.aside()} annotation.
*
@@ -1286,14 +1421,19 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML footer section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The footer section typically floats on the bottom of the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#footer() @HtmlDoc.footer()} annotation.
*
@@ -1307,12 +1447,16 @@ public class RestConfig implements ServletConfig {
/**
* Sets the HTML CSS style section contents.
+ *
* <p>
* The format of this value is CSS.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#css() @HtmlDoc.css()} annotation.
*
@@ -1326,15 +1470,20 @@ public class RestConfig implements ServletConfig {
/**
* Sets the CSS URL in the HTML CSS style section.
+ *
* <p>
* The format of this value is a URL.
+ *
* <p>
* Specifies the URL to the stylesheet to add as a link in the style tag in the header.
+ *
* <p>
* The format of this value is CSS.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols defined
* by {@link UriResolver}.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#cssUrl() @HtmlDoc.cssUrl()} annotation.
*
@@ -1348,6 +1497,7 @@ public class RestConfig implements ServletConfig {
/**
* Shorthand method for forcing the rendered HTML content to be no-wrap.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#nowrap() @HtmlDoc.nowrap()} annotation.
*
@@ -1361,6 +1511,7 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the text to display when serializing an empty array or collection.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#noResultsMessage() @HtmlDoc.noResultsMessage()}
* annotation.
@@ -1375,10 +1526,11 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the template class to use for rendering the HTML page.
+ *
* <p>
- * By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide
- * your own custom renderer or subclasses from the basic class to have full control over how the page is
- * rendered.
+ * By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom
+ * renderer or subclasses from the basic class to have full control over how the page is rendered.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#template() @HtmlDoc.template()} annotation.
*
@@ -1392,9 +1544,11 @@ public class RestConfig implements ServletConfig {
/**
* Specifies the template class to use for rendering the HTML page.
+ *
* <p>
* By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom
* renderer or subclasses from the basic class to have full control over how the page is rendered.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#template() @HtmlDoc.template()} annotation.
*
@@ -1409,6 +1563,7 @@ public class RestConfig implements ServletConfig {
/**
* Defines widgets that can be used in conjunction with string variables of the form <js>"$W{name}"</js>to quickly
* generate arbitrary replacement text.
+ *
* <p>
* Widgets are inherited from parent to child, but can be overridden by reusing the widget name.
*
@@ -1423,6 +1578,7 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the logger for the resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#logger() @RestResource.logger()} annotation.
*
@@ -1436,6 +1592,7 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the logger for the resource.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#logger() @RestResource.logger()} annotation.
*
@@ -1449,9 +1606,11 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the call handler for the resource.
+ *
* <p>
* The call handler is the object that handles execution of REST HTTP calls.
* Subclasses can be created that customize the behavior of how REST calls are handled.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#callHandler() @RestResource.callHandler()}
* annotation.
@@ -1466,9 +1625,11 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the call handler for the resource.
+ *
* <p>
* The call handler is the object that handles execution of REST HTTP calls.
* Subclasses can be created that customize the behavior of how REST calls are handled.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#callHandler() @RestResource.callHandler()}
* annotation.
@@ -1483,9 +1644,11 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the info provider for the resource.
+ *
* <p>
* The info provider provides all the various information about a resource such as the Swagger documentation.
* Subclasses can be created that customize the information.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#infoProvider() @RestResource.infoProvider()}
* annotation.
@@ -1500,9 +1663,11 @@ public class RestConfig implements ServletConfig {
/**
* Overrides the info provider for the resource.
+ *
* <p>
* The info provider provides all the various information about a resource such as the Swagger documentation.
* Subclasses can be created that customize the information.
+ *
* <p>
* This is the programmatic equivalent to the {@link RestResource#infoProvider() @RestResource.infoProvider()}
* annotation.
@@ -1531,14 +1696,17 @@ public class RestConfig implements ServletConfig {
/**
* Returns the external configuration file for this resource.
+ *
* <p>
* The configuration file location is determined via the {@link RestResource#config() @RestResource.config()}
* annotation on the resource.
+ *
* <p>
* The config file can be programmatically overridden by adding the following method to your resource:
* <p class='bcode'>
* <jk>public</jk> ConfigFile createConfigFile(ServletConfig servletConfig) <jk>throws</jk> ServletException;
* </p>
+ *
* <p>
* If a config file is not set up, then an empty config file will be returned that is not backed by any file.
*
@@ -1550,13 +1718,16 @@ public class RestConfig implements ServletConfig {
/**
* Returns the configuration properties for this resource.
+ *
* <p>
* The configuration properties are determined via the {@link RestResource#properties()} annotation on the resource.
+ *
* <p>
* The configuration properties can be augmented programmatically by adding the following method to your resource:
* <p class='bcode'>
* <jk>public</jk> ObjectMap createProperties(ServletConfig servletConfig) <jk>throws</jk> ServletException;
* </p>
+ *
* <p>
* These properties can be modified during servlet initialization.
* However, any modifications made after {@link RestServlet#init(RestConfig)} has been called will have no effect.
@@ -1569,6 +1740,7 @@ public class RestConfig implements ServletConfig {
/**
* Creates the variable resolver for this resource.
+ *
* <p>
* The variable resolver returned by this method can resolve the following variables:
* <ul>
@@ -1578,6 +1750,7 @@ public class RestConfig implements ServletConfig {
* <li>{@link IfVar}
* <li>{@link SwitchVar}
* </ul>
+ *
* <p>
* Note that the variables supported here are only a subset of those returned by
* {@link RestRequest#getVarResolverSession()}.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
index 99b3335..bb6e970 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -50,6 +50,7 @@ import org.apache.juneau.utils.*;
/**
* Contains all the configuration on a REST resource and the entry points for handling REST calls.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*/
@@ -57,20 +58,24 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Enable header URL parameters.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.allowHeaderParams"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When enabled, headers such as <js>"Accept"</js> and <js>"Content-Type"</js> to be passed in as URL query
* parameters.
* For example: <js>"?Accept=text/json&Content-Type=text/json"</js>
+ *
* <p>
* Parameter names are case-insensitive.
+ *
* <p>
* Useful for debugging REST interface using only a browser.
+ *
* <p>
* Applicable to servlet class only.
*/
@@ -78,27 +83,32 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Enable <js>"method"</js> URL parameter for specific HTTP methods.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.allowMethodParam"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>""</js>
* </ul>
+ *
* <p>
* When specified, the HTTP method can be overridden by passing in a <js>"method"</js> URL parameter on a regular
* GET request.
* For example: <js>"?method=OPTIONS"</js>
+ *
* <p>
* Format is a comma-delimited list of HTTP method names that can be passed in as a method parameter.
* Parameter name is case-insensitive.
* Use "*" to represent all methods.
* For backwards compatibility, "true" also means "*".
+ *
* <p>
* Note that per the <a class="doclink"
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html">HTTP specification</a>, special care should
* be taken when allowing non-safe (POST, PUT, DELETE) methods to be invoked through GET requests.
+ *
* <p>
* Applicable to servlet class only.
+ *
* <p>
* Example: <js>"HEAD,OPTIONS"</js>
*/
@@ -106,20 +116,24 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Enable <js>"body"</js> URL parameter.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.allowBodyParam"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When enabled, the HTTP body content on PUT and POST requests can be passed in as text using the <js>"body"</js>
* URL parameter.
* For example: <js>"?body={name:'John%20Smith',age:45}"</js>
+ *
* <p>
* Parameter name is case-insensitive.
+ *
* <p>
* Useful for debugging PUT and POST methods using only a browser.
+ *
* <p>
* Applicable to servlet class only.
*/
@@ -127,17 +141,20 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Render stack traces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.renderResponseStackTraces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* </ul>
+ *
* <p>
* Render stack traces in HTTP response bodies when errors occur.
+ *
* <p>
* When enabled, Java stack traces will be rendered in the output response.
* Useful for debugging, although allowing stack traces to be rendered may cause security concerns.
+ *
* <p>
* Applicable to servlet class only.
*/
@@ -145,15 +162,17 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Use stack trace hashes.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.useStackTraceHashes"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* When enabled, the number of times an exception has occurred will be determined based on stack trace hashsums,
* made available through the {@link RestException#getOccurrence()} method.
+ *
* <p>
* Applicable to servlet class only.
*/
@@ -161,14 +180,16 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Default character encoding.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.defaultCharset"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"utf-8"</js>
* </ul>
+ *
* <p>
* The default character encoding for the request and response if not specified on the request.
+ *
* <p>
* Applicable to servlet class and methods.
*/
@@ -176,7 +197,7 @@ public final class RestContext extends Context {
/**
* <b>Configuration property:</b> Expected format of request parameters.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"RestServlet.paramFormat"</js>
* <li><b>Data type:</b> <code>String</code>
@@ -194,12 +215,15 @@ public final class RestContext extends Context {
* <br>Only POJOs directly convertible from <l>Strings</l> can be represented in parameters when using this
* mode.
* </ul>
+ *
* <p>
* Note that the parameter value <js>"(foo)"</js> is interpreted as <js>"(foo)"</js> when using plain mode, but
* <js>"foo"</js> when using UON mode.
+ *
* <p>
* The format can also be specified per-parameter using the {@link FormData#format() @FormData.format()} and
* {@link Query#format() @Query.format()} annotations.
+ *
* <p>
* Applicable to servlet class and methods.
*/
@@ -212,9 +236,11 @@ public final class RestContext extends Context {
/**
* The request servlet path.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getServletPath()}
*/
@@ -222,6 +248,7 @@ public final class RestContext extends Context {
/**
* The request servlet URI.
+ *
* <p>
* Equivalent to the value returned by {@link UriContext#getRootRelativeServletPath()}
*/
@@ -229,9 +256,11 @@ public final class RestContext extends Context {
/**
* The request URI path info.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getPathInfo()}
*/
@@ -239,9 +268,11 @@ public final class RestContext extends Context {
/**
* The request URI.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getRequestURI()}
*/
@@ -249,9 +280,11 @@ public final class RestContext extends Context {
/**
* The request method.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getMethod()}
*/
@@ -259,9 +292,11 @@ public final class RestContext extends Context {
/**
* The localized servlet title.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getServletTitle()}
*/
@@ -269,9 +304,11 @@ public final class RestContext extends Context {
/**
* The localized servlet description.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getServletDescription()}
*/
@@ -279,9 +316,11 @@ public final class RestContext extends Context {
/**
* The localized method summary.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getMethodSummary()}
*/
@@ -289,9 +328,11 @@ public final class RestContext extends Context {
/**
* The localized method description.
+ *
* <p>
* Automatically added to properties returned by {@link SerializerSession#getProperty(String)} and
* {@link ParserSession#getProperty(String)}.
+ *
* <p>
* Equivalent to the value returned by {@link RestRequest#getMethodDescription()}
*/
@@ -779,6 +820,7 @@ public final class RestContext extends Context {
/**
* Returns the variable resolver for this servlet.
+ *
* <p>
* Variable resolvers are used to replace variables in property values.
*
@@ -797,9 +839,9 @@ public final class RestContext extends Context {
* )
* <jk>public class</jk> MyRestResource <jk>extends</jk> RestServletDefault {
* </p>
+ *
* <p>
* A typical usage pattern is using variables for resolving URL links when rendering HTML:
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(
* name=<js>"GET"</js>, path=<js>"/{name}/*"</js>,
@@ -812,6 +854,7 @@ public final class RestContext extends Context {
* )
* <jk>public</jk> LoggerEntry getLogger(RestRequest req, <ja>@Path</ja> String name) <jk>throws</jk> Exception {
* </p>
+ *
* <p>
* Calls to <code>req.getProperties().getString(<js>"key"</js>)</code> returns strings with variables resolved.
*
@@ -823,6 +866,7 @@ public final class RestContext extends Context {
/**
* Returns the config file associated with this servlet.
+ *
* <p>
* The config file is identified via one of the following:
* <ul>
@@ -838,6 +882,7 @@ public final class RestContext extends Context {
/**
* Resolve a static resource file.
+ *
* <p>
* The location of static resources are defined via one of the following:
* <ul>
@@ -883,8 +928,10 @@ public final class RestContext extends Context {
/**
* Same as {@link Class#getResourceAsStream(String)} except if it doesn't find the resource on this class, searches
* up the parent hierarchy chain.
+ *
* <p>
* If the resource cannot be found in the classpath, then an attempt is made to look in the JVM working directory.
+ *
* <p>
* If the <code>locale</code> is specified, then we look for resources whose name matches that locale.
* For example, if looking for the resource <js>"MyResource.txt"</js> for the Japanese locale, we will look for
@@ -947,6 +994,7 @@ public final class RestContext extends Context {
/**
* Reads the input stream from {@link #getResource(String, Locale)} and parses it into a POJO using the parser
* matched by the specified media type.
+ *
* <p>
* Useful if you want to load predefined POJOs from JSON files in your classpath.
*
@@ -982,8 +1030,10 @@ public final class RestContext extends Context {
/**
* Returns the path for this resource as defined by the {@link RestResource#path()} annotation or
* {@link RestConfig#setPath(String)} method concatenated with those on all parent classes.
+ *
* <p>
* If path is not specified, returns <js>"/"</js>.
+ *
* <p>
* Path always starts with <js>"/"</js>.
*
@@ -995,6 +1045,7 @@ public final class RestContext extends Context {
/**
* The HTML page title.
+ *
* <p>
* Defined by the {@link HtmlDoc#title()} annotation or {@link RestConfig#setHtmlTitle(String)} method.
*
@@ -1006,6 +1057,7 @@ public final class RestContext extends Context {
/**
* The HTML page description.
+ *
* <p>
* Defined by the {@link HtmlDoc#description()} annotation or {@link RestConfig#setHtmlDescription(String)} method.
*
@@ -1017,6 +1069,7 @@ public final class RestContext extends Context {
/**
* The HTML page branding.
+ *
* <p>
* Defined by the {@link HtmlDoc#branding()} annotation or {@link RestConfig#setHtmlBranding(String)} method.
*
@@ -1028,6 +1081,7 @@ public final class RestContext extends Context {
/**
* The HTML page header contents.
+ *
* <p>
* Defined by the {@link HtmlDoc#header()} annotation or {@link RestConfig#setHtmlHeader(String)} method.
*
@@ -1039,6 +1093,7 @@ public final class RestContext extends Context {
/**
* The HTML page nav section links.
+ *
* <p>
* Defined by the {@link HtmlDoc#links()} annotation or {@link RestConfig#setHtmlLinks(String)} method.
*
@@ -1050,6 +1105,7 @@ public final class RestContext extends Context {
/**
* The HTML page nav section contents.
+ *
* <p>
* Defined by the {@link HtmlDoc#nav()} annotation or {@link RestConfig#setHtmlNav(String)} method.
*
@@ -1061,6 +1117,7 @@ public final class RestContext extends Context {
/**
* The HTML page aside section contents.
+ *
* <p>
* Defined by the {@link HtmlDoc#aside()} annotation or {@link RestConfig#setHtmlAside(String)} method.
*
@@ -1072,6 +1129,7 @@ public final class RestContext extends Context {
/**
* The HTML page footer section contents.
+ *
* <p>
* Defined by the {@link HtmlDoc#footer()} annotation or {@link RestConfig#setHtmlFooter(String)} method.
*
@@ -1083,6 +1141,7 @@ public final class RestContext extends Context {
/**
* The HTML page CSS URL.
+ *
* <p>
* Defined by the {@link HtmlDoc#cssUrl()} annotation or {@link RestConfig#setHtmlCssUrl(String)} method.
*
@@ -1094,6 +1153,7 @@ public final class RestContext extends Context {
/**
* The HTML page CSS contents.
+ *
* <p>
* Defined by the {@link HtmlDoc#css()} annotation or {@link RestConfig#setHtmlCss(String)} method.
*
@@ -1105,6 +1165,7 @@ public final class RestContext extends Context {
/**
* The HTML page nowrap setting.
+ *
* <p>
* Defined by the {@link HtmlDoc#nowrap()} annotation or {@link RestConfig#setHtmlNoWrap(boolean)} method.
*
@@ -1116,6 +1177,7 @@ public final class RestContext extends Context {
/**
* The HTML page template.
+ *
* <p>
* Defined by the {@link HtmlDoc#template()} annotation or {@link RestConfig#setHtmlTemplate(Class)} method.
*
@@ -1127,6 +1189,7 @@ public final class RestContext extends Context {
/**
* The HTML page no-results message.
+ *
* <p>
* Defined by the {@link HtmlDoc#noResultsMessage()} annotation or {@link RestConfig#setHtmlNoResultsMessage(String)}
* method.
@@ -1139,6 +1202,7 @@ public final class RestContext extends Context {
/**
* The widgets used for resolving <js>"$W{...}"<js> variables.
+ *
* <p>
* Defined by the {@link RestResource#widgets()} annotation or {@link RestConfig#addWidget(Class)} method.
*
@@ -1150,6 +1214,7 @@ public final class RestContext extends Context {
/**
* Returns the logger to use for this resource.
+ *
* <p>
* The logger for a resource is defined via one of the following:
* <ul>
@@ -1165,6 +1230,7 @@ public final class RestContext extends Context {
/**
* Returns the resource bundle used by this resource.
+ *
* <p>
* The resource bundle is defined via one of the following:
* <ul>
@@ -1179,6 +1245,7 @@ public final class RestContext extends Context {
/**
* Returns the REST information provider used by this resource.
+ *
* <p>
* The information provider is defined via one of the following:
* <ul>
@@ -1194,6 +1261,7 @@ public final class RestContext extends Context {
/**
* Returns the REST call handler used by this resource.
+ *
* <p>
* The call handler is defined via one of the following:
* <ul>
@@ -1218,6 +1286,7 @@ public final class RestContext extends Context {
/**
* Returns the resource object.
+ *
* <p>
* This is the instance of the class annotated with the {@link RestResource @RestResource} annotation, usually
* an instance of {@link RestServlet}.
@@ -1231,8 +1300,9 @@ public final class RestContext extends Context {
/**
* Returns the resource object as a {@link RestServlet}.
*
- * @return The resource object cast to {@link RestServlet}, or
- * <jk>null</jk> if the resource doesn't subclass from {@link RestServlet}
+ * @return
+ * The resource object cast to {@link RestServlet}, or <jk>null</jk> if the resource doesn't subclass from
+ * {@link RestServlet}
*/
public RestServlet getRestServlet() {
return resource instanceof RestServlet ? (RestServlet)resource : null;
@@ -1250,6 +1320,7 @@ public final class RestContext extends Context {
/**
* Returns the parent resource context (if this resource was initialized from a parent).
+ *
* <p>
* From this object, you can get access to the parent resource class itself using {@link #getResource()} or
* {@link #getRestServlet()}
@@ -1271,6 +1342,7 @@ public final class RestContext extends Context {
/**
* Returns the class-level properties associated with this servlet.
+ *
* <p>
* Properties at the class level are defined via one of the following:
* <ul>
@@ -1292,6 +1364,7 @@ public final class RestContext extends Context {
/**
* Returns the serializers registered with this resource.
+ *
* <p>
* Serializers at the class level are defined via one of the following:
* <ul>
@@ -1307,6 +1380,7 @@ public final class RestContext extends Context {
/**
* Returns the parsers registered with this resource.
+ *
* <p>
* Parsers at the class level are defined via one of the following:
* <ul>
@@ -1333,8 +1407,9 @@ public final class RestContext extends Context {
/**
* Returns the child resources associated with this servlet.
*
- * @return An unmodifiable map of child resources.
- * Keys are the {@link RestResource#path() @RestResource.path()} annotation defined on the child resource.
+ * @return
+ * An unmodifiable map of child resources.
+ * Keys are the {@link RestResource#path() @RestResource.path()} annotation defined on the child resource.
*/
public Map<String,RestContext> getChildResources() {
return Collections.unmodifiableMap(childResources);
@@ -1344,8 +1419,9 @@ public final class RestContext extends Context {
* Returns the number of times this exception was thrown based on a hash of its stacktrace.
*
* @param e The exception to check.
- * @return The number of times this exception was thrown, or <code>0</code> if <code>stackTraceHashes</code>
- * setting is not enabled.
+ * @return
+ * The number of times this exception was thrown, or <code>0</code> if <code>stackTraceHashes</code>
+ * setting is not enabled.
*/
protected int getStackTraceOccurrence(Throwable e) {
if (! useStackTraceHashes)
@@ -1402,8 +1478,10 @@ public final class RestContext extends Context {
/**
* Returns the name of the client version header name used by this resource.
+ *
* <p>
* The client version header is the name of the HTTP header on requests that identify a client version.
+ *
* <p>
* The client version header is defined via one of the following:
* <ul>
@@ -1429,6 +1507,7 @@ public final class RestContext extends Context {
/**
* Returns the bean filters associated with this resource.
+ *
* <p>
* Bean filters at the class level are defined via one of the following:
* <ul>
@@ -1444,6 +1523,7 @@ public final class RestContext extends Context {
/**
* Returns the POJO swaps associated with this resource.
+ *
* <p>
* POJO swaps at the class level are defined via one of the following:
* <ul>
@@ -1558,8 +1638,10 @@ public final class RestContext extends Context {
/**
* Returns the encoders associated with this resource.
+ *
* <p>
* Encoders are used to provide various types of encoding such as <code>gzip</code> encoding.
+ *
* <p>
* Encoders at the class level are defined via one of the following:
* <ul>
@@ -1576,6 +1658,7 @@ public final class RestContext extends Context {
/**
* Returns the explicit list of supported accept types for this resource.
+ *
* <p>
* By default, this is simply the list of accept types supported by the registered parsers, but
* can be overridden via the {@link RestConfig#setSupportedAcceptTypes(MediaType...)}/{@link RestConfig#setSupportedAcceptTypes(String...)}
@@ -1589,6 +1672,7 @@ public final class RestContext extends Context {
/**
* Returns the explicit list of supported content types for this resource.
+ *
* <p>
* By default, this is simply the list of content types supported by the registered serializers, but can be
* overridden via the {@link RestConfig#setSupportedContentTypes(MediaType...)}/{@link RestConfig#setSupportedContentTypes(String...)}
@@ -1602,8 +1686,10 @@ public final class RestContext extends Context {
/**
* Returns the default request headers for this resource.
+ *
* <p>
* These are headers automatically added to requests if not present.
+ *
* <p>
* Default request headers are defined via one of the following:
* <ul>
@@ -1619,8 +1705,10 @@ public final class RestContext extends Context {
/**
* Returns the default response headers for this resource.
+ *
* <p>
* These are headers automatically added to responses if not otherwise specified during the request.
+ *
* <p>
* Default response headers are defined via one of the following:
* <ul>
@@ -1637,8 +1725,10 @@ public final class RestContext extends Context {
/**
* Returns the converters associated with this resource at the class level.
+ *
* <p>
* Converters are used to 'convert' POJOs from one form to another before being passed of to the response handlers.
+ *
* <p>
* Converters at the class level are defined via one of the following:
* <ul>
@@ -1654,8 +1744,10 @@ public final class RestContext extends Context {
/**
* Returns the guards associated with this resource at the class level.
+ *
* <p>
* Guards are used to restrict access to resources.
+ *
* <p>
* Guards at the class level are defined via one of the following:
* <ul>
@@ -1671,8 +1763,10 @@ public final class RestContext extends Context {
/**
* Returns the response handlers associated with this resource.
+ *
* <p>
* Response handlers are used to convert POJOs returned by REST Java methods into actual HTTP responses.
+ *
* <p>
* Response handlers are defined via one of the following:
* <ul>
@@ -1689,6 +1783,7 @@ public final class RestContext extends Context {
/**
* Returns the media type for the specified file name.
+ *
* <p>
* The list of MIME-type mappings can be augmented through the {@link RestConfig#addMimeTypes(String...)} method.
* See that method for a description of predefined MIME-type mappings.
@@ -1702,8 +1797,10 @@ public final class RestContext extends Context {
/**
* Returns the favicon of the resource.
+ *
* <p>
* This is the icon served up under <js>"/favicon.ico"</jk> recognized by browsers.
+ *
* <p>
* The favicon is defined via one of the following:
* <ul>
@@ -1719,8 +1816,10 @@ public final class RestContext extends Context {
/**
* Returns the stylesheet for use in the HTML views of the resource.
+ *
* <p>
* This is the contents of the page served up under <js>"/styles.css"</jk>.
+ *
* <p>
* The stylesheet is defined via one of the following:
* <ul>
@@ -1736,8 +1835,10 @@ public final class RestContext extends Context {
/**
* Returns <jk>true</jk> if the specified path refers to a static file.
+ *
* <p>
* Static files are files pulled from the classpath and served up directly to the browser.
+ *
* <p>
* Static files are defined via one of the following:
* <ul>
@@ -1754,6 +1855,7 @@ public final class RestContext extends Context {
/**
* Returns the REST Java methods defined in this resource.
+ *
* <p>
* These are the methods annotated with the {@link RestMethod @RestMethod} annotation.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
index 4f85306..c60972a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConverter.java
@@ -19,9 +19,11 @@ import org.apache.juneau.serializer.*;
/**
* REST method response converter.
+ *
* <p>
* Implements a filter mechanism for REST method calls that allows response objects to be converted to some other POJO
* after invocation of the REST method.
+ *
* <p>
* Converters are associated with REST methods through the {@link RestMethod#converters()} annotation.
*
@@ -37,20 +39,22 @@ import org.apache.juneau.serializer.*;
* }
* }
* </p>
+ *
* <p>
* Converters can also be associated at the servlet level using the {@link RestResource#converters()} annotation.
* Applying converters at the resource level is equivalent to applying converters to each resource method individually.
*
* <h6 class='topic'>How to implement</h6>
- * <p>
+ *
* Implementers should simply implement the {@link #convert(RestRequest, Object, ClassMeta)} and return back a
* 'converted' object.
* It's up to the implementer to decide what this means.
+ *
* <p>
* Converters must implement a no-args constructor.
*
* <h6 class='topic'>Predefined converters</h6>
- * <p>
+ *
* The following converters are available by default.
* <ul class='spaced-list'>
* <li>
@@ -68,8 +72,9 @@ public interface RestConverter {
*
* @param req The servlet request.
* @param res The response object set by the REST method through the {@link RestResponse#setOutput(Object)} method.
- * @param cm The {@link ClassMeta} on the object from the bean context of the servlet.
- * Can be used to check if the object has any filters.
+ * @param cm
+ * The {@link ClassMeta} on the object from the bean context of the servlet.
+ * Can be used to check if the object has any filters.
* @return The converted object.
* @throws RestException Thrown if any errors occur during conversion.
* @throws SerializeException
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
index a8f4f6f..03e67bf 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestException.java
@@ -21,6 +21,7 @@ import org.apache.juneau.*;
/**
* Exception thrown to trigger an error HTTP status.
+ *
* <p>
* REST methods on subclasses of {@link RestServlet} can throw this exception to trigger an HTTP status other than the
* automatically-generated <code>404</code>, <code>405</code>, and <code>500</code> statuses.
@@ -70,6 +71,8 @@ public class RestException extends FormattedRuntimeException {
/**
* Returns the root cause of this exception.
+ *
+ * <p>
* The root cause is the first exception in the init-cause parent chain that's not one of the following:
* <ul>
* <li>{@link RestException}
@@ -90,11 +93,13 @@ public class RestException extends FormattedRuntimeException {
/**
* Returns all error messages from all errors in this stack.
+ *
* <p>
- * Typically useful if you want to render all the error messages in the stack, but don't
- * want to render all the stack traces too.
+ * Typically useful if you want to render all the error messages in the stack, but don't want to render all the
+ * stack traces too.
*
- * @param scrubForXssVulnerabilities If <jk>true</jk>, replaces <js>'<'</js>, <js>'>'</js>, and <js>'&'</js> characters with spaces.
+ * @param scrubForXssVulnerabilities
+ * If <jk>true</jk>, replaces <js>'<'</js>, <js>'>'</js>, and <js>'&'</js> characters with spaces.
* @return All error messages from all errors in this stack.
*/
public String getFullStackMessage(boolean scrubForXssVulnerabilities) {
@@ -138,10 +143,12 @@ public class RestException extends FormattedRuntimeException {
/**
* Returns the number of times this exception occurred on this servlet.
+ *
* <p>
* This only gets set if {@link RestContext#REST_useStackTraceHashes} is enabled on the servlet.
*
- * @return The occurrence number if {@link RestContext#REST_useStackTraceHashes} is enabled, or <code>0</code> otherwise.
+ * @return
+ * The occurrence number if {@link RestContext#REST_useStackTraceHashes} is enabled, or <code>0</code> otherwise.
*/
public int getOccurrence() {
return occurrence;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
index f95b916..54d5f85 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestGuard.java
@@ -20,23 +20,27 @@ import org.apache.juneau.rest.annotation.*;
* REST method guard.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Implements a guard mechanism for REST method calls that allows requests to be rejected before invocation of the REST
* method.
* For example, guards can be used to ensure that only administrators can call certain methods.
+ *
* <p>
* Guards are applied to REST methods declaratively through the {@link RestResource#guards()} or
* {@link RestMethod#guards()} annotations.
+ *
* <p>
* If multiple guards are specified, ALL guards must pass in order for the request to proceed.
*
* <h6 class='topic'>How to implement</h6>
- * <p>
+ *
* Typically, guards will be used for permissions checking on the user making the request, but it can also be used for
* other purposes like pre-call validation of a request.
+ *
* <p>
* Implementers should simply throw a {@link RestException} from the {@link #guard(RestRequest, RestResponse)}
* method to abort processing on the current request.
+ *
* <p>
* Guards must implement a no-args constructor.
*
@@ -66,17 +70,20 @@ public abstract class RestGuard {
/**
* Checks the current HTTP request and throws a {@link RestException} if the guard does not permit the request.
+ *
* <p>
* By default, throws an <jsf>SC_FORBIDDEN</jsf> exception if {@link #isRequestAllowed(RestRequest)} returns
* <jk>false</jk>.
+ *
* <p>
* Subclasses are free to override this method to tailor the behavior of how to handle unauthorized requests.
*
* @param req The servlet request.
* @param res The servlet response.
* @throws RestException Thrown to abort processing on current request.
- * @return <jk>true</jk> if request can proceed.
- * Specify <jk>false</jk> if you're doing something like a redirection to a login page.
+ * @return
+ * <jk>true</jk> if request can proceed.
+ * Specify <jk>false</jk> if you're doing something like a redirection to a login page.
*/
public boolean guard(RestRequest req, RestResponse res) throws RestException {
if (! isRequestAllowed(req))
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestInfoProvider.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestInfoProvider.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestInfoProvider.java
index b0aa412..2b506f9 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestInfoProvider.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestInfoProvider.java
@@ -28,9 +28,11 @@ import org.apache.juneau.svl.*;
/**
* Class that provides documentation and other related information about a REST resource.
+ *
* <p>
* Subclasses can override these methods to tailor how HTTP REST resources are documented.
* Subclasses MUST implement a public constructor that takes in a {@link RestContext} object.
+ *
* <p>
* RestInfoProviders are associated with servlets/resources in one of the following ways:
* <ul>
@@ -155,9 +157,11 @@ public class RestInfoProvider {
/**
* Returns the localized Swagger from the file system.
+ *
* <p>
- * Looks for a file called <js>"{ServletClass}_{locale}.json"</js> in the same package
- * as this servlet and returns it as a parsed {@link Swagger} object.
+ * Looks for a file called <js>"{ServletClass}_{locale}.json"</js> in the same package as this servlet and returns
+ * it as a parsed {@link Swagger} object.
+ *
* <p>
* Returned objects are cached for later quick-lookup.
*
@@ -180,11 +184,12 @@ public class RestInfoProvider {
/**
* Returns the localized summary of the specified java method on this servlet.
+ *
* <p>
* Subclasses can override this method to provide their own summary.
+ *
* <p>
* The default implementation returns the summary from the following locations (whichever matches first):
- * </p>
* <ol>
* <li>{@link RestMethod#summary() @RestMethod.summary()} annotation on the method.
* <li><ck>[ClassName].[javaMethodName].summary</ck> property in resource bundle identified by
@@ -206,11 +211,12 @@ public class RestInfoProvider {
/**
* Returns the localized description of the specified java method on this servlet.
+ *
* <p>
* Subclasses can override this method to provide their own description.
+ *
* <p>
* The default implementation returns the description from the following locations (whichever matches first):
- * </p>
* <ol>
* <li>{@link RestMethod#description() @RestMethod.description()} annotation on the method.
* <li><ck>[ClassName].[javaMethodName].description</ck> property in resource bundle identified by
@@ -232,11 +238,12 @@ public class RestInfoProvider {
/**
* Returns the localized title of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own title.
+ *
* <p>
* The default implementation returns the description from the following locations (whichever matches first):
- * <p>
* <ol>
* <li>{@link RestResource#title() @RestResourcel.title()} annotation on this class, and then any parent classes.
* <li><ck>[ClassName].title</ck> property in resource bundle identified by
@@ -265,8 +272,10 @@ public class RestInfoProvider {
/**
* Returns the localized description of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own description.
+ *
* <p>
* The default implementation returns the description from the following locations (whichever matches first):
* <ol>
@@ -297,8 +306,10 @@ public class RestInfoProvider {
/**
* Returns the localized contact information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own contact information.
+ *
* <p>
* The default implementation returns the contact information from the following locations (whichever matches first):
* <ol>
@@ -312,8 +323,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public Contact getContact(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
@@ -335,8 +346,10 @@ public class RestInfoProvider {
/**
* Returns the localized license information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own license information.
+ *
* <p>
* The default implementation returns the license information from the following locations (whichever matches first):
* <ol>
@@ -350,8 +363,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public License getLicense(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
@@ -373,8 +386,10 @@ public class RestInfoProvider {
/**
* Returns the terms-of-service information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own terms-of-service information.
+ *
* <p>
* The default implementation returns the terms-of-service information from the following locations (whichever
* matches first):
@@ -389,8 +404,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public String getTermsOfService(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
@@ -407,8 +422,10 @@ public class RestInfoProvider {
/**
* Returns the version information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own version information.
+ *
* <p>
* The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
@@ -422,8 +439,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public String getVersion(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
@@ -440,8 +457,10 @@ public class RestInfoProvider {
/**
* Returns the version information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own version information.
+ *
* <p>
* The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
@@ -455,8 +474,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public List<Tag> getTags(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
@@ -478,8 +497,10 @@ public class RestInfoProvider {
/**
* Returns the version information of this REST resource.
+ *
* <p>
* Subclasses can override this method to provide their own version information.
+ *
* <p>
* The default implementation returns the version information from the following locations (whichever matches first):
* <ol>
@@ -493,8 +514,8 @@ public class RestInfoProvider {
* </ol>
*
* @param req The current request.
- * @return The localized contact information of this REST resource, or <jk>null</jk> if no contact information was
- * found.
+ * @return
+ * The localized contact information of this REST resource, or <jk>null</jk> if no contact information was found.
*/
public ExternalDocumentation getExternalDocs(RestRequest req) {
VarResolverSession vr = req.getVarResolverSession();
[09/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java
index 6c12246..ce3bccf 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java
@@ -55,6 +55,7 @@ public class CollectionUtils {
/**
* Adds the contents of one list to the other in reverse order.
+ *
* <p>
* i.e. add values from 2nd list from end-to-start order to the end of the 1st list.
*
@@ -71,6 +72,7 @@ public class CollectionUtils {
/**
* Adds the contents of the array to the list in reverse order.
+ *
* <p>
* i.e. add values from the array from end-to-start order to the end of the list.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java
index 73b8583..c0d4f3d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java
@@ -19,9 +19,11 @@ import java.util.*;
import javax.xml.bind.*;
/**
- * A utility class for parsing and formatting HTTP dates as used in cookies and
- * other headers. This class handles dates as defined by RFC 2616 section
- * 3.3.1 as well as some other common non-standard formats.
+ * A utility class for parsing and formatting HTTP dates as used in cookies and other headers.
+ *
+ * <p>
+ * This class handles dates as defined by RFC 2616 section 3.3.1 as well as some other common non-standard formats.
+ *
* <p>
* This class was copied from HttpClient 4.3.
*/
@@ -78,9 +80,10 @@ public final class DateUtils {
*
* @param dateValue the date value to parse
* @param dateFormats the date formats to use
- * @param startDate During parsing, two digit years will be placed in the range <code>startDate</code> to
- * <code>startDate + 100 years</code>. This value may be <code>null</code>. When
- * <code>null</code> is given as a parameter, year <code>2000</code> will be used.
+ * @param startDate
+ * During parsing, two digit years will be placed in the range <code>startDate</code> to
+ * <code>startDate + 100 years</code>. This value may be <code>null</code>. When
+ * <code>null</code> is given as a parameter, year <code>2000</code> will be used.
* @return the parsed date or null if input could not be parsed
*/
public static Date parseDate(final String dateValue, final String[] dateFormats, final Date startDate) {
@@ -128,8 +131,10 @@ public final class DateUtils {
}
/**
- * Formats the given date according to the specified pattern. The pattern must conform to that used by the
- * {@link SimpleDateFormat simple date format} class.
+ * Formats the given date according to the specified pattern.
+ *
+ * <p>
+ * The pattern must conform to that used by the {@link SimpleDateFormat simple date format} class.
*
* @param date The date to format.
* @param pattern The pattern to use for formatting the date.
@@ -150,9 +155,11 @@ public final class DateUtils {
}
/**
- * A factory for {@link SimpleDateFormat}s. The instances are stored in a thread-local way because SimpleDateFormat
- * is not thread-safe as noted in {@link SimpleDateFormat its javadoc}.
+ * A factory for {@link SimpleDateFormat}s.
*
+ * <p>
+ * The instances are stored in a thread-local way because SimpleDateFormat is not thread-safe as noted in
+ * {@link SimpleDateFormat its javadoc}.
*/
final static class DateFormatHolder {
private static final ThreadLocal<SoftReference<Map<String,SimpleDateFormat>>> THREADLOCAL_FORMATS =
@@ -166,10 +173,13 @@ public final class DateUtils {
/**
* Creates a {@link SimpleDateFormat} for the requested format string.
*
- * @param pattern a non-<code>null</code> format String according to {@link SimpleDateFormat}. The format is not
- * checked against <code>null</code> since all paths go through {@link DateUtils}.
- * @return the requested format. This simple date-format should not be used to
- * {@link SimpleDateFormat#applyPattern(String) apply} to a different pattern.
+ * @param pattern
+ * A non-<code>null</code> format String according to {@link SimpleDateFormat}.
+ * The format is not checked against <code>null</code> since all paths go through {@link DateUtils}.
+ * @return
+ * The requested format.
+ * This simple date-format should not be used to {@link SimpleDateFormat#applyPattern(String) apply} to a
+ * different pattern.
*/
public static SimpleDateFormat formatFor(final String pattern) {
final SoftReference<Map<String,SimpleDateFormat>> ref = THREADLOCAL_FORMATS.get();
@@ -194,6 +204,7 @@ public final class DateUtils {
/**
* Pads out an ISO8601 string so that it can be parsed using {@link DatatypeConverter#parseDateTime(String)}.
+ *
* <ul>
* <li><js>"2001-07-04T15:30:45-05:00"</js> --> <js>"2001-07-04T15:30:45-05:00"</js>
* <li><js>"2001-07-04T15:30:45Z"</js> --> <js>"2001-07-04T15:30:45Z"</js>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
index cdf4291..1e0c9fe 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
@@ -19,6 +19,7 @@ import org.apache.juneau.*;
/**
* Represents a wrapped {@link BeanMap} where property values can be overridden, removed, or reordered without
* affecting the underlying bean.
+ *
* <p>
* Provides the {@link #filterKeys(List)} method for specifying the keys to keep in the bean map and in what order
* they should appear.
@@ -73,6 +74,7 @@ public class DelegateBeanMap<T> extends BeanMap<T> {
/**
* Remove all but the specified properties from this bean map.
+ *
* <p>
* This does not affect the underlying bean.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java
index 3c0e59f..83d7440 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java
@@ -42,6 +42,7 @@ public class DelegateMap<T> extends ObjectMap implements Delegate<T> {
/**
* Remove all but the specified keys from this map.
+ *
* <p>
* This does not affect the underlying map.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java
index 6580275..f2c3000 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java
@@ -81,6 +81,8 @@ public class FileUtils {
/**
* Creates a file if it doesn't already exist using {@link File#createNewFile()}.
+ *
+ * <p>
* Throws a {@link RuntimeException} if the file could not be created.
*
* @param f The file to create.
@@ -98,6 +100,8 @@ public class FileUtils {
/**
* Updates the modified timestamp on the specified file.
+ *
+ * <p>
* Method ensures that the timestamp changes even if it's been modified within the past millisecond.
*
* @param f The file to modify the modified timestamp on.
@@ -120,9 +124,11 @@ public class FileUtils {
/**
* Create a temporary file with the specified name.
+ *
* <p>
* The name is broken into file name and suffix, and the parts are passed to
* {@link File#createTempFile(String, String)}.
+ *
* <p>
* {@link File#deleteOnExit()} is called on the resulting file before being returned by this method.
*
@@ -169,6 +175,7 @@ public class FileUtils {
/**
* Returns the candidate file names for the specified file name in the specified locale.
+ *
* <p>
* For example, if looking for the <js>"MyResource.txt"</js> file in the Japanese locale, the iterator will return
* names in the following order:
@@ -177,6 +184,7 @@ public class FileUtils {
* <li><js>"MyResource_ja.txt"</js>
* <li><js>"MyResource.txt"</js>
* </ol>
+ *
* <p>
* If the locale is null, then it will only return <js>"MyResource.txt"</js>.
*
@@ -220,6 +228,7 @@ public class FileUtils {
/**
* Returns the candidate locales for the specified locale.
+ *
* <p>
* For example, if <code>locale</code> is <js>"ja_JP"</js>, then this method will return:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
index d0f46e1..8e76000 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
@@ -14,6 +14,7 @@ package org.apache.juneau.internal;
/**
* Utility class for generating integer hash codes.
+ *
* <p>
* General usage:
* <p class='bcode'>
@@ -47,6 +48,7 @@ public class HashCode {
/**
* Hashes the hashcode into this object.
+ *
* <p>
* The formula is simply <code>hashCode = 31*hashCode + i;</code>
*
@@ -69,9 +71,12 @@ public class HashCode {
/**
* Converts the object to a normalized form before grabbing it's hashcode.
- * Subclasses can override this method to provide specialized handling
- * (e.g. converting numbers to strings so that <code>123</code> and <js>"123"</js>
- * end up creating the same hashcode.)
+ *
+ * <p>
+ * Subclasses can override this method to provide specialized handling (e.g. converting numbers to strings so that
+ * <code>123</code> and <js>"123"</js> end up creating the same hashcode.)
+ *
+ * <p>
* Default implementation does nothing.
*
* @param o The object to normalize before getting it's hashcode.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java
index 4e680ac..b2da86a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java
@@ -54,6 +54,7 @@ public final class IOUtils {
/**
* Reads the specified object to a <code>String</code>.
+ *
* <p>
* Can be any of the following object types:
* <ul>
@@ -205,8 +206,10 @@ public final class IOUtils {
/**
* Reads the specified input into a {@link String} until the end of the input is reached.
+ *
* <p>
* The {@code Reader} is automatically closed.
+ *
* <p>
* If the {@code Reader} is not an instance of a {@code BufferedReader}, then it gets wrapped in a
* {@code BufferedReader}.
@@ -235,6 +238,8 @@ public final class IOUtils {
/**
* Pipes the contents of the specified reader into the writer.
+ *
+ * <p>
* The reader is closed, the writer is not.
*
* @param in The reader to pipe from.
@@ -251,8 +256,9 @@ public final class IOUtils {
* Wraps the specified reader in a buffered reader.
*
* @param r The reader being wrapped.
- * @return The reader wrapped in a {@link BufferedReader}, or the original {@link Reader} if it's already a buffered
- * reader.
+ * @return
+ * The reader wrapped in a {@link BufferedReader}, or the original {@link Reader} if it's already a buffered
+ * reader.
*/
public static Reader getBufferedReader(Reader r) {
if (r instanceof BufferedReader || r instanceof StringReader)
@@ -302,6 +308,8 @@ public final class IOUtils {
/**
* Given the specified <js>"Content-Length"</js> header value, return an appropriate buffer size.
+ *
+ * <p>
* The maximum buffer size is 1MB.
*
* @param contentLength The value of the <js>"Content-Length"</js> header.
@@ -325,6 +333,8 @@ public final class IOUtils {
/**
* Close input stream and ignore any exceptions.
+ *
+ * <p>
* No-op if input stream is <jk>null</jk>.
*
* @param is The input stream to close.
@@ -338,6 +348,8 @@ public final class IOUtils {
/**
* Close output stream and ignore any exceptions.
+ *
+ * <p>
* No-op if output stream is <jk>null</jk>.
*
* @param os The output stream to close.
@@ -351,6 +363,8 @@ public final class IOUtils {
/**
* Close reader and ignore any exceptions.
+ *
+ * <p>
* No-op if reader is <jk>null</jk>.
*
* @param r The reader to close.
@@ -364,6 +378,8 @@ public final class IOUtils {
/**
* Close writer and ignore any exceptions.
+ *
+ * <p>
* No-op if writer is <jk>null</jk>.
*
* @param w The writer to close.
@@ -396,16 +412,17 @@ public final class IOUtils {
/**
* Converts an object to an <code>InputStream</code>.
*
- * @param o The object to convert to an input stream.
- * Can be any of the following:
- * <ul>
- * <li>{@link InputStream}
- * <li>{@link Reader}
- * <li>{@link File}
- * <li>{@link CharSequence} - Converted to UTF-8 stream.
- * <li><code><jk>byte</jk>[]</code>
- * <li><code><jk>null</jk></code> - Returns null.
- * </ul>
+ * @param o
+ * The object to convert to an input stream.
+ * Can be any of the following:
+ * <ul>
+ * <li>{@link InputStream}
+ * <li>{@link Reader}
+ * <li>{@link File}
+ * <li>{@link CharSequence} - Converted to UTF-8 stream.
+ * <li><code><jk>byte</jk>[]</code>
+ * <li><code><jk>null</jk></code> - Returns null.
+ * </ul>
* @return The object converted to an input stream.
* @throws IOException If invalid object passed in or file could not be read.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java b/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java
index 7ddf361..5feb470 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java
@@ -16,6 +16,7 @@ import java.util.*;
/**
* Combination of a {@link LinkedList} and <code>IdentitySet</code>.
+ *
* <ul class='spaced-list'>
* <li>
* Duplicate objects (by identity) will be skipped during insertion.
@@ -27,6 +28,7 @@ import java.util.*;
* <ul>
* <li>This class is NOT thread safe, and is intended for use on small lists.
* </ul>
+ *
* @param <T> Entry type.
*/
public class IdentityList<T> extends LinkedList<T> {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
index c4f3c73..cb2344f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
@@ -58,13 +58,14 @@ public class JuneauLogger extends java.util.logging.Logger {
* Get logger for specified class using the specified resource bundle name.
*
* @param forClass The class to create a logger for.
- * @param resourceBundleName The name of the resource bundle.
- * Can be any of the following formats:
- * <ol>
- * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>.
- * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>.
- * </ol>
- * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters.
+ * @param resourceBundleName
+ * The name of the resource bundle.
+ * Can be any of the following formats:
+ * <ol>
+ * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>.
+ * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>.
+ * </ol>
+ * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters.
* @return A new <l>Logger</l>.
*/
public static JuneauLogger getLogger(Class<?> forClass, String resourceBundleName) {
@@ -75,13 +76,14 @@ public class JuneauLogger extends java.util.logging.Logger {
* Get logger with specified name using the specified resource bundle name.
*
* @param name The name of the logger to use.
- * @param resourceBundleName The name of the resource bundle.
- * Can be any of the following formats:
- * <ol>
- * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>.
- * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>.
- * </ol>
- * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters.
+ * @param resourceBundleName
+ * The name of the resource bundle.
+ * Can be any of the following formats:
+ * <ol>
+ * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>.
+ * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>.
+ * </ol>
+ * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters.
* @return A new <l>Logger</l>.
*/
public static synchronized JuneauLogger getLogger(String name, String resourceBundleName) {
@@ -245,6 +247,8 @@ public class JuneauLogger extends java.util.logging.Logger {
/**
* Similar to {@link #log(Level, String, Object[])}, except arguments are converted to objects
* that are serialized using the {@link JsonSerializer#toStringObject(Object)} method.
+ *
+ * <p>
* This allows arbitrary POJOs to be serialized as message parameters.
*
* @param level The level of the given message.
@@ -292,5 +296,4 @@ public class JuneauLogger extends java.util.logging.Logger {
}
return ("".equals(rb) ? null : rb);
}
-
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java b/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java
index 831efbc..15ebd33 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java
@@ -16,6 +16,7 @@ import static org.apache.juneau.internal.ThrowableUtils.*;
/**
* Stores a set of language keywords for quick lookup.
+ *
* <p>
* Keywords must be:
* <ul class='spaced-list'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java b/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java
index 9cff585..194bffd 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java
@@ -18,6 +18,7 @@ import java.util.*;
/**
* Utility class for defining an iterator over one or more iterables.
+ *
* @param <E> The element class type.
*/
public class MultiIterable<E> implements Iterable<E> {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java
index 73f73d4..7aac560 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java
@@ -22,6 +22,7 @@ public class ObjectUtils {
/**
* Returns <jk>true</jk> if the specified objects are equal.
+ *
* <p>
* Gracefully handles <jk>null</jk>s.
*
@@ -39,6 +40,7 @@ public class ObjectUtils {
/**
* Returns <jk>true</jk> if the specified object is empty.
+ *
* <p>
* Return <jk>true</jk> if the value is any of the following:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java
index 451ae2c..cc4effb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java
@@ -53,6 +53,7 @@ public final class ReflectionUtils {
/**
* Returns the specified annotation only if it's been declared on the specified class.
+ *
* <p>
* More efficient than calling {@link Class#getAnnotation(Class)} since it doesn't recursively look for the class
* up the parent chain.
@@ -72,9 +73,9 @@ public final class ReflectionUtils {
/**
* Returns all instances of the specified annotation on the specified class.
+ *
* <p>
* Searches all superclasses and superinterfaces.
- * <p>
* Results are ordered child-to-parent.
*
* @param <T> The annotation class type.
@@ -102,8 +103,9 @@ public final class ReflectionUtils {
}
/**
- * Same as {@link #findAnnotations(Class, Class)} except returns the annotations as a map
- * with the keys being the class on which the annotation was found.
+ * Same as {@link #findAnnotations(Class, Class)} except returns the annotations as a map with the keys being the
+ * class on which the annotation was found.
+ *
* <p>
* Results are ordered child-to-parent.
*
@@ -189,6 +191,7 @@ public final class ReflectionUtils {
/**
* Similar to {@link #getResource(Class, String)} except looks for localized versions of the specified resource.
+ *
* <p>
* For example, if looking in the Japanese locale, the order of lookup on the <js>"MyResource.txt"</js> file is:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java
index 8a36771..e2faec7 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java
@@ -22,10 +22,13 @@ import org.apache.juneau.*;
/**
* An instance of a <code>Map</code> where the keys and values are simple <code>String[]</code> and
* <code>Object[]</code> arrays.
+ *
* <p>
* Typically more efficient than <code>HashMaps</code> for small maps (e.g. <10 entries).
+ *
* <p>
* Does not support adding or removing entries.
+ *
* <p>
* Setting values overwrites the value on the underlying value array.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java b/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java
index 6fc902c..e83a85e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java
@@ -16,6 +16,7 @@ import java.io.*;
/**
* Similar to {@link StringWriter}, but uses a {@link StringBuilder} instead to avoid synchronization overhead.
+ *
* <p>
* Note that this class is NOT thread safe.
*/
@@ -34,9 +35,9 @@ public final class StringBuilderWriter extends Writer {
/**
* Create a new string writer using the specified initial string-builder size.
*
- * @param initialSize The number of <tt>char</tt> values that will fit into this buffer before it is automatically
- * expanded
- * @throws IllegalArgumentException If <tt>initialSize</tt> is negative
+ * @param initialSize
+ * The number of <tt>char</tt> values that will fit into this buffer before it is automatically expanded.
+ * @throws IllegalArgumentException If <tt>initialSize</tt> is negative.
*/
public StringBuilderWriter(int initialSize) {
sb = new StringBuilder(initialSize);
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java
index 14d5345..72ffcc8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java
@@ -60,19 +60,20 @@ public final class StringUtils {
* Parses a number from the specified reader stream.
*
* @param r The reader to parse the string from.
- * @param type The number type to created.
- * Can be any of the following:
- * <ul>
- * <li> Integer
- * <li> Double
- * <li> Float
- * <li> Long
- * <li> Short
- * <li> Byte
- * <li> BigInteger
- * <li> BigDecimal
- * </ul>
- * If <jk>null</jk>, uses the best guess.
+ * @param type
+ * The number type to created.
+ * Can be any of the following:
+ * <ul>
+ * <li> Integer
+ * <li> Double
+ * <li> Float
+ * <li> Long
+ * <li> Short
+ * <li> Byte
+ * <li> BigInteger
+ * <li> BigDecimal
+ * </ul>
+ * If <jk>null</jk>, uses the best guess.
* @throws IOException If a problem occurred trying to read from the reader.
* @return The parsed number.
* @throws Exception
@@ -107,19 +108,20 @@ public final class StringUtils {
* Parses a number from the specified string.
*
* @param s The string to parse the number from.
- * @param type The number type to created.
- * Can be any of the following:
- * <ul>
- * <li> Integer
- * <li> Double
- * <li> Float
- * <li> Long
- * <li> Short
- * <li> Byte
- * <li> BigInteger
- * <li> BigDecimal
- * </ul>
- * If <jk>null</jk>, uses the best guess.
+ * @param type
+ * The number type to created.
+ * Can be any of the following:
+ * <ul>
+ * <li> Integer
+ * <li> Double
+ * <li> Float
+ * <li> Long
+ * <li> Short
+ * <li> Byte
+ * <li> BigInteger
+ * <li> BigDecimal
+ * </ul>
+ * If <jk>null</jk>, uses the best guess.
* @return The parsed number.
* @throws ParseException
*/
@@ -470,8 +472,12 @@ public final class StringUtils {
/**
* Splits a character-delimited string into a string array.
+ *
+ * <p>
* Does not split on escaped-delimiters (e.g. "\,");
* Resulting tokens are trimmed of whitespace.
+ *
+ * <p>
* <b>NOTE:</b> This behavior is different than the Jakarta equivalent.
* split("a,b,c",',') -> {"a","b","c"}
* split("a, b ,c ",',') -> {"a","b","c"}
@@ -540,6 +546,7 @@ public final class StringUtils {
/**
* Splits a list of key-value pairs into an ordered map.
+ *
* <p>
* Example:
* <p class='bcode'>
@@ -630,8 +637,8 @@ public final class StringUtils {
* string.
*
* @param s The string to check.
- * @return <jk>true</jk> if specified string is <jk>null</jk> or it's {@link #toString()} method returns an empty
- * string.
+ * @return
+ * <jk>true</jk> if specified string is <jk>null</jk> or it's {@link #toString()} method returns an empty string.
*/
public static boolean isEmpty(Object s) {
return s == null || s.toString().isEmpty();
@@ -854,8 +861,7 @@ public final class StringUtils {
}
/**
- * Shortcut for calling <code>base64Decode(String)</code> and converting the
- * result to a UTF-8 encoded string.
+ * Shortcut for calling <code>base64Decode(String)</code> and converting the result to a UTF-8 encoded string.
*
* @param in The BASE-64 encoded string to decode.
* @return The decoded string.
@@ -914,7 +920,11 @@ public final class StringUtils {
/**
* Generated a random UUID with the specified number of characters.
+ *
+ * <p>
* Characters are composed of lower-case ASCII letters and numbers only.
+ *
+ * <p>
* This method conforms to the restrictions for hostnames as specified in <a class="doclink"
* href="https://tools.ietf.org/html/rfc952">RFC 952</a>
* Since each character has 36 possible values, the square approximation formula for the number of generated IDs
@@ -922,6 +932,8 @@ public final class StringUtils {
* <code>sqrt(36^N)</code>.
* Dividing this number by 10 gives you an approximation of the number of generated IDs needed to produce a
* <1% chance of collision.
+ *
+ * <p>
* For example, given 5 characters, the number of generated IDs need to produce a <1% chance of collision would
* be:
* <code>sqrt(36^5)/10=777</code>
@@ -982,10 +994,13 @@ public final class StringUtils {
/**
* Simple utility for replacing variables of the form <js>"{key}"</js> with values in the specified map.
+ *
* <p>
* Nested variables are supported in both the input string and map values.
+ *
* <p>
* If the map does not contain the specified value, the variable is not replaced.
+ *
* <p>
* <jk>null</jk> values in the map are treated as blank strings.
*
@@ -1106,6 +1121,7 @@ public final class StringUtils {
/**
* Returns the specified field in a delimited string without splitting the string.
+ *
* <p>
* Equivalent to the following:
* <p class='bcode'>
@@ -1250,10 +1266,12 @@ public final class StringUtils {
/**
* Returns <jk>true</jk> if the specified string is one of the specified values.
*
- * @param s The string to test.
- * Can be <jk>null</jk>.
- * @param values The values to test.
- * Can contain <jk>null</jk>.
+ * @param s
+ * The string to test.
+ * Can be <jk>null</jk>.
+ * @param values
+ * The values to test.
+ * Can contain <jk>null</jk>.
* @return <jk>true</jk> if the specified string is one of the specified values.
*/
public static boolean isOneOf(String s, String...values) {
@@ -1353,8 +1371,9 @@ public final class StringUtils {
* Returns the first non-whitespace character in the string.
*
* @param s The string to check.
- * @return The first non-whitespace character, or <code>0</code> if the string is <jk>null</jk>, empty, or composed
- * of only whitespace.
+ * @return
+ * The first non-whitespace character, or <code>0</code> if the string is <jk>null</jk>, empty, or composed
+ * of only whitespace.
*/
public static char firstNonWhitespaceChar(String s) {
if (s != null)
@@ -1369,7 +1388,8 @@ public final class StringUtils {
*
* @param s The string.
* @param i The index position.
- * @return The character at the specified index, or <code>0</code> if the index is out-of-range or the string
+ * @return
+ * The character at the specified index, or <code>0</code> if the index is out-of-range or the string
* is <jk>null</jk>.
*/
public static char charAt(String s, int i) {
@@ -1431,8 +1451,10 @@ public final class StringUtils {
/**
* Efficiently determines whether a URL is of the pattern "xxx:/xxx".
+ *
* <p>
* The pattern matched is: <code>[a-z]{2,}\:\/.*</code>
+ *
* <p>
* Note that this excludes filesystem paths such as <js>"C:/temp"</js>.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java b/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java
index 507abbb..96dfe73 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java
@@ -44,8 +44,8 @@ public class TeeOutputStream extends OutputStream {
* Adds an output stream to this tee output stream.
*
* @param os The output stream to add to this tee output stream.
- * @param close If <jk>false</jk>, then calling {@link #close()} on this stream will not filter to the specified
- * output stream.
+ * @param close
+ * If <jk>false</jk>, then calling {@link #close()} on this stream will not filter to the specified output stream.
* @return This object (for method chaining).
*/
public TeeOutputStream add(OutputStream os, boolean close) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java b/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java
index dd1dee5..be48416 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java
@@ -44,8 +44,8 @@ public class TeeWriter extends Writer {
* Adds a writer to this tee writer.
*
* @param w The writer to add to this tee writer.
- * @param close If <jk>false</jk>, then calling {@link #close()} on this tee writer will not filter to the
- * specified writer.
+ * @param close
+ * If <jk>false</jk>, then calling {@link #close()} on this tee writer will not filter to the specified writer.
* @return This object (for method chaining).
*/
public TeeWriter add(Writer w, boolean close) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java b/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java
index 2aeb77a..5c40951 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java
@@ -22,9 +22,10 @@ public class Utils {
*
* @param i1 Integer #1
* @param i2 Integer #2
- * @return The value <code>0</code> if Integer #1 is equal to Integer #2; a value less than <code>0</code> if
- * Integer #1 numerically less than Integer #2; and a value greater than <code>0</code> if Integer #1 is numerically
- * greater than Integer #2 (signed comparison).
+ * @return
+ * The value <code>0</code> if Integer #1 is equal to Integer #2; a value less than <code>0</code> if
+ * Integer #1 numerically less than Integer #2; and a value greater than <code>0</code> if Integer #1 is
+ * numerically greater than Integer #2 (signed comparison).
*/
public static final int compare(int i1, int i2) {
return (i1<i2 ? -1 : (i1==i2 ? 0 : 1));
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/Version.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/Version.java b/juneau-core/src/main/java/org/apache/juneau/internal/Version.java
index 4630c37..375f1f9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/Version.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/Version.java
@@ -16,6 +16,7 @@ import static org.apache.juneau.internal.StringUtils.*;
/**
* Represents a version string such as <js>"1.2"</js> or <js>"1.2.3"</js>
+ *
* <p>
* Used to compare version numbers.
*/
@@ -26,15 +27,16 @@ public class Version {
/**
* Constructor
*
- * @param versionString A string of the form <js>"#.#..."</js> where there can be any number of parts.
- * <br>Valid values:
- * <ul>
- * <li><js>"1.2"</js>
- * <li><js>"1.2.3"</js>
- * <li><js>"0.1"</js>
- * <li><js>".1"</js>
- * </ul>
- * Any parts that are not numeric are interpreted as {@link Integer#MAX_VALUE}
+ * @param versionString
+ * A string of the form <js>"#.#..."</js> where there can be any number of parts.
+ * <br>Valid values:
+ * <ul>
+ * <li><js>"1.2"</js>
+ * <li><js>"1.2.3"</js>
+ * <li><js>"0.1"</js>
+ * <li><js>".1"</js>
+ * </ul>
+ * Any parts that are not numeric are interpreted as {@link Integer#MAX_VALUE}
*/
public Version(String versionString) {
if (isEmpty(versionString))
@@ -52,6 +54,7 @@ public class Version {
/**
* Returns <jk>true</jk> if the specified version is at least this version.
+ *
* <p>
* Note that the following is true:
* <p class='bcode'>
@@ -80,6 +83,7 @@ public class Version {
/**
* Returns <jk>true</jk> if the specified version is at most this version.
+ *
* <p>
* Note that the following is true:
* <p class='bcode'>
@@ -108,6 +112,7 @@ public class Version {
/**
* Returns <jk>true</jk> if the specified version is equal to this version.
+ *
* <p>
* Note that the following is true:
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java b/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java
index 3321f2d..16d6294 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java
@@ -14,6 +14,7 @@ package org.apache.juneau.internal;
/**
* Represents an OSGi-style version range like <js>"1.2"</js> or <js>"[1.0,2.0)"</js>.
+ *
* <p>
* The range can be any of the following formats:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java b/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java
index ca975d0..67a302f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java
@@ -22,7 +22,7 @@ import org.apache.juneau.parser.*;
* Parses POJOs from HTTP responses as Java {@link ObjectInputStream ObjectInputStreams}.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Consumes <code>Content-Type</code> types: <code>application/x-java-serialized-object</code>
*/
@Consumes("application/x-java-serialized-object")
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java b/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java
index 6989905..92cde21 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java
@@ -22,8 +22,9 @@ import org.apache.juneau.serializer.*;
* Serializes POJOs to HTTP responses as Java Serialized Object {@link ObjectOutputStream ObjectOutputStreams}.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>application/x-java-serialized-object</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>application/x-java-serialized-object</code>
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
index e18a513..e2aab27 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
@@ -30,13 +30,14 @@ import org.apache.juneau.transform.*;
* Parses any valid JSON text into a POJO model.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>application/json, text/json</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* 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:
@@ -50,7 +51,10 @@ import org.apache.juneau.transform.*;
* <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'>
@@ -75,6 +79,7 @@ import org.apache.juneau.transform.*;
* <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'>
@@ -97,6 +102,7 @@ import org.apache.juneau.transform.*;
* <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)
@@ -104,7 +110,7 @@ import org.apache.juneau.transform.*;
* The end result should be the same.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link JsonParserContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
index a498f9e..66977f3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.parser.*;
/**
* Configurable properties on the {@link JsonParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -40,6 +42,7 @@ public final class JsonParserContext extends ParserContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java
index 34128be..17571c0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java
@@ -22,6 +22,7 @@ import org.apache.juneau.parser.*;
/**
* Session object that lives for the duration of a single use of {@link JsonParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -32,24 +33,30 @@ public final class JsonParserSession extends ParserSession {
/**
* 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.
- * @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>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @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>
+ * @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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public JsonParserSession(JsonParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
@@ -73,6 +80,7 @@ public final class JsonParserSession extends ParserSession {
/**
* 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
index 0c43381..f4fda17 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
@@ -28,13 +28,13 @@ import org.apache.juneau.transform.*;
* Serializes POJO metadata to HTTP responses as JSON.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>application/json+schema, text/json+schema</code>
* <p>
* Produces <code>Content-Type</code> types: <code>application/json</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Produces the JSON-schema for the JSON produced by the {@link JsonSerializer} class with the same properties.
*/
@Produces(value="application/json+schema,text/json+schema",contentType="application/json")
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
index e97e64f..5c6449e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
@@ -27,13 +27,13 @@ import org.apache.juneau.transform.*;
* Serializes POJO models to JSON.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>application/json, text/json</code>
* <p>
* Produces <code>Content-Type</code> types: <code>application/json</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* The conversion is as follows...
* <ul class='spaced-list'>
* <li>
@@ -54,18 +54,21 @@ import org.apache.juneau.transform.*;
* <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 CoreObjectBuilder#pojoSwaps(Class...)} method.
+ * 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 CoreObjectBuilder#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.
+ * 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'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link JsonSerializerContext}
@@ -74,7 +77,7 @@ import org.apache.juneau.transform.*;
* </ul>
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience:
* <ul class='spaced-list'>
* <li>
@@ -218,8 +221,10 @@ public class JsonSerializer extends WriterSerializer {
}
/**
- * Workhorse method. Determines the type of object, and then calls the
- * appropriate type-specific serialization method.
+ * Workhorse method.
+ *
+ * <p>
+ * Determines the type of object, and then calls the appropriate type-specific serialization method.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
SerializerWriter serializeAnything(JsonSerializerSession session, JsonWriter out, Object o, ClassMeta<?> eType,
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java
index a75e895..14393cc 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java
@@ -53,13 +53,14 @@ public class JsonSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Simple JSON mode.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
* Otherwise, they are always quoted.
@@ -88,13 +89,14 @@ public class JsonSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Prefix solidus <js>'/'</js> characters with escapes.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, solidus (e.g. slash) characters should be escaped.
* The JSON specification allows for either format.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
index f15f6ce..3e07022 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.serializer.*;
/**
* Configurable properties on the {@link JsonSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -40,13 +42,14 @@ public final class JsonSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Simple JSON mode.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
* Otherwise, they are always quoted.
@@ -55,36 +58,39 @@ public final class JsonSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Prefix solidus <js>'/'</js> characters with escapes.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <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>.
+ * However, if you're embedding JSON in an HTML script tag, this setting prevents confusion when trying to serialize
+ * <xt><\/script></xt>.
*/
public static final String JSON_escapeSolidus = "JsonSerializer.escapeSolidus";
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"JsonSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
* 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.
+ *
* <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}.
@@ -98,6 +104,7 @@ public final class JsonSerializerContext extends SerializerContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
index 3f21ab2..a4beae0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
@@ -23,6 +23,7 @@ import org.apache.juneau.serializer.*;
/**
* Session object that lives for the duration of a single use of {@link JsonSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -36,19 +37,26 @@ public final class JsonSerializerSession 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.
- * @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.
+ * @param ctx
+ * The context creating this session 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.
* @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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
protected JsonSerializerSession(JsonSerializerContext ctx, ObjectMap op, Object output, Method javaMethod,
Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java b/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java
index 451d236..6d91626 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java
@@ -19,8 +19,10 @@ import java.lang.annotation.*;
/**
* Annotation for specifying various JSON options for the JSON serializers and parsers.
+ *
* <p>
* Can be applied to Java types.
+ *
* <p>
* Can be used for the following:
* <ul class='spaced-list'>
@@ -36,8 +38,10 @@ public @interface Json {
/**
* Wraps beans in a JSON object with the specified attribute name.
+ *
* <p>
* Applies only to {@link ElementType#TYPE}.
+ *
* <p>
* This annotation can be applied to beans as well as other objects serialized to other types (e.g. strings).
*
@@ -48,17 +52,17 @@ public @interface Json {
* <jk>public int</jk> f1 = 123;
* }
* </p>
+ *
* <p>
* Without the <ja>@Xml</ja> annotations, serializing this bean as JSON would have produced the following...
- * </p>
* <p class='bcode'>
* {
* f1: 123
* }
* </p>
+ *
* <p>
* With the annotations, serializing this bean as XML produces the following...
- * </p>
* <p class='bcode'>
* {
* myWrapper: {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java
index 2411636..40a03ec 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java
@@ -73,6 +73,8 @@ public final class MsgPackInputStream extends InputStream {
/**
* Reads the data type flag from the stream.
+ *
+ * <p>
* This is the byte that indicates what kind of data follows.
*/
DataType readDataType() throws IOException {
@@ -376,6 +378,8 @@ public final class MsgPackInputStream extends InputStream {
/**
* Returns the length value for the field.
+ *
+ * <p>
* For ints/floats/bins/strings, this is the number of bytes that the field takes up (minus the data-type flag).
* For arrays, it's the number of array entries.
* For maps, it's the number of map entries.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
index 1eb1a92..727b465 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
@@ -27,11 +27,11 @@ import org.apache.juneau.transform.*;
* Parses a MessagePack stream into a POJO model.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>octal/msgpack</code>
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link MsgPackParserContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
index e221779..dc56d25 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.parser.*;
/**
* Configurable properties on the {@link MsgPackParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -40,6 +42,7 @@ public final class MsgPackParserContext extends ParserContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java
index 170e165..93f16e6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java
@@ -22,6 +22,7 @@ import org.apache.juneau.parser.*;
/**
* Session object that lives for the duration of a single use of {@link MsgPackParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -32,24 +33,30 @@ public final class MsgPackParserSession extends ParserSession {
/**
* 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.
- * @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>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @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>
+ * @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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public MsgPackParserSession(MsgPackParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
index 85f6708..b301fa0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
@@ -25,13 +25,13 @@ import org.apache.juneau.transform.*;
* Serializes POJO models to MessagePack.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>octal/msgpack</code>
* <p>
* Produces <code>Content-Type</code> types: <code>octal/msgpack</code>
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link MsgPackSerializerContext}
@@ -64,8 +64,10 @@ public class MsgPackSerializer extends OutputStreamSerializer {
}
/**
- * Workhorse method. Determines the type of object, and then calls the appropriate type-specific serialization
- * method.
+ * Workhorse method.
+ *
+ * <p>
+ * Determines the type of object, and then calls the appropriate type-specific serialization method.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
MsgPackOutputStream serializeAnything(MsgPackSerializerSession session, MsgPackOutputStream out, Object o,
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
index f0c6bb0..f1365e1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
@@ -17,9 +17,11 @@ import org.apache.juneau.serializer.*;
/**
* Configurable properties on the {@link MsgPackSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -40,19 +42,21 @@ public final class MsgPackSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"MsgPackSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
* 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.
+ *
* <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}.
@@ -64,6 +68,7 @@ public final class MsgPackSerializerContext extends SerializerContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java
index 9a489d8..860989a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java
@@ -24,6 +24,7 @@ import org.apache.juneau.serializer.*;
/**
* Session object that lives for the duration of a single use of {@link MsgPackSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -35,19 +36,26 @@ public final class MsgPackSerializerSession 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.
- * @param output The output object. See {@link JsonSerializerSession#getOutputStream()} for valid class types.
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @param ctx
+ * The context creating this session object.
+ * The context contains all the configuration settings for this object.
+ * @param output
+ * The output object.
+ * See {@link JsonSerializerSession#getOutputStream()} for valid class types.
+ * @param op
+ * The override properties.
+ * 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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
protected MsgPackSerializerSession(MsgPackSerializerContext ctx, ObjectMap op, Object output, Method javaMethod,
Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java b/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java
index 622dd35..46b1678 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java
@@ -19,7 +19,7 @@ import org.apache.juneau.annotation.*;
* Subclass of {@link Parser} for byte-based parsers.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* This class is typically the parent class of all byte-based parsers.
* It has 1 abstract method to implement...
* <ul>
@@ -27,8 +27,9 @@ import org.apache.juneau.annotation.*;
* </ul>
*
* <h6 class='topic'>@Consumes annotation</h6>
- * <p>
+ *
* The media types that this parser can handle is specified through the {@link Consumes @Consumes} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()} method.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java
index 8c27221..756e7ce 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java
@@ -80,6 +80,8 @@ public final class ParseException extends FormattedException {
/**
* Returns the highest-level <code>ParseException</code> in the stack trace.
+ *
+ * <p>
* Useful for JUnit testing of error conditions.
*
* @return The root parse exception, or this exception if there isn't one.
[07/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
index a699b2b..10fb1bb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
@@ -53,13 +53,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Max serialization depth.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxDepth"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>100</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Abort serialization if specified depth is reached in the POJO tree.
* If this depth is exceeded, an exception is thrown.
@@ -80,13 +81,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Initial depth.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.initialDepth"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>0</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The initial indentation level at the root.
* Useful when constructing document fragments that need to be indented at a certain level.
@@ -106,20 +108,24 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Automatically detect POJO recursions.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.detectRecursions"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies that recursions should be checked for during serialization.
+ *
* <p>
* Recursions can occur when serializing models that aren't true trees, but rather contain loops.
+ *
* <p>
* The behavior when recursions are detected depends on the value for
* {@link SerializerContext#SERIALIZER_ignoreRecursions}.
+ *
* <p>
* For example, if a model contains the links A->B->C->A, then the JSON generated will look like
* the following when <jsf>SERIALIZER_ignoreRecursions</jsf> is <jk>true</jk>...
@@ -141,16 +147,18 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Ignore recursion errors.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.ignoreRecursions"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Used in conjunction with {@link SerializerContext#SERIALIZER_detectRecursions}.
* Setting is ignored if <jsf>SERIALIZER_detectRecursions</jsf> is <jk>false</jk>.
+ *
* <p>
* If <jk>true</jk>, when we encounter the same object when serializing a tree, we set the value to <jk>null</jk>.
* Otherwise, an exception is thrown.
@@ -171,13 +179,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Use whitespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.useWhitepace"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, newlines and indentation and spaces are added to the output to improve readability.
*
@@ -205,13 +214,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Maximum indentation.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxIndent"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>100</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the maximum indentation level in the serialized document.
*
@@ -230,13 +240,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
@@ -260,13 +271,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Quote character.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.quoteChar"</js>
* <li><b>Data type:</b> <code>Character</code>
* <li><b>Default:</b> <js>'"'</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* This is the character used for quoting attributes and values.
*
@@ -294,13 +306,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Trim null bean property values.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimNullProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, null bean values will not be serialized to the output.
*
@@ -323,13 +336,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Trim empty lists and arrays.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyLists"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, empty list values will not be serialized to the output.
*
@@ -353,13 +367,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Trim empty maps.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyMaps"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, empty map values will not be serialized to the output.
*
@@ -382,13 +397,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Trim strings.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
*
@@ -407,13 +423,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> URI context bean.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriContext"</js>
* <li><b>Data type:</b> {@link UriContext}
* <li><b>Default:</b> {@link UriContext#DEFAULT}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Bean used for resolution of URIs to absolute or root-relative form.
*
@@ -437,13 +454,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> URI resolution.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriResolution"</js>
* <li><b>Data type:</b> {@link UriResolution}
* <li><b>Default:</b> {@link UriResolution#ROOT_RELATIVE}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Defines the resolution level for URIs when serializing any of the following:
* <ul>
@@ -451,6 +469,7 @@ public class SerializerBuilder extends CoreObjectBuilder {
* <li>{@link java.net.URL}
* <li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
+ *
* <p>
* Possible values are:
* <ul>
@@ -477,13 +496,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> URI relativity.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriRelativity"</js>
* <li><b>Data type:</b> {@link UriRelativity}
* <li><b>Default:</b> {@link UriRelativity#RESOURCE}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Defines what relative URIs are relative to when serializing any of the following:
* <ul>
@@ -491,6 +511,7 @@ public class SerializerBuilder extends CoreObjectBuilder {
* <li>{@link java.net.URL}
* <li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
+ *
* <p>
* Possible values are:
* <ul>
@@ -515,7 +536,7 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Sort arrays and collections alphabetically.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortCollections"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -539,7 +560,7 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Sort maps alphabetically.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortMaps"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -563,20 +584,21 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Abridged output.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.parserKnowsRootTypes"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
- * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed,
- * and therefore top-level type information that might normally be included to determine
- * the data type will not be serialized.
+ * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
+ * type information that might normally be included to determine the data type will not be serialized.
+ *
* <p>
- * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js>
- * will be added when this setting is disabled, but not added when it is enabled.
+ * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js> will be added when
+ * this setting is disabled, but not added when it is enabled.
*
* @param value The new value for this property.
* @return This object (for method chaining).
@@ -588,13 +610,14 @@ public class SerializerBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Serializer listener.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.listener"</js>
* <li><b>Data type:</b> <code>Class<? extends SerializerListener></code>
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Class used to listen for errors and warnings that occur during serialization.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
index 0afd2b4..4ab30cf 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
@@ -22,13 +22,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Max serialization depth.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxDepth"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>100</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Abort serialization if specified depth is reached in the POJO tree.
* If this depth is exceeded, an exception is thrown.
@@ -38,13 +39,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Initial depth.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.initialDepth"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>0</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The initial indentation level at the root.
* Useful when constructing document fragments that need to be indented at a certain level.
@@ -53,19 +55,23 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Automatically detect POJO recursions.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.detectRecursions"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies that recursions should be checked for during serialization.
+ *
* <p>
* Recursions can occur when serializing models that aren't true trees, but rather contain loops.
+ *
* <p>
* The behavior when recursions are detected depends on the value for {@link #SERIALIZER_ignoreRecursions}.
+ *
* <p>
* For example, if a model contains the links A->B->C->A, then the JSON generated will look like
* the following when <jsf>SERIALIZER_ignoreRecursions</jsf> is <jk>true</jk>...
@@ -80,34 +86,37 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Ignore recursion errors.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.ignoreRecursions"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Used in conjunction with {@link #SERIALIZER_detectRecursions}.
* Setting is ignored if <jsf>SERIALIZER_detectRecursions</jsf> is <jk>false</jk>.
+ *
* <p>
- * If <jk>true</jk>, when we encounter the same object when serializing a tree,
- * we set the value to <jk>null</jk>.
+ * If <jk>true</jk>, when we encounter the same object when serializing a tree, we set the value to <jk>null</jk>.
* Otherwise, an exception is thrown.
*/
public static final String SERIALIZER_ignoreRecursions = "Serializer.ignoreRecursions";
/**
* <b>Configuration property:</b> Use whitespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.useWhitespace"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, whitespace is added to the output to improve readability.
+ *
* <p>
* This setting does not apply to the MessagePack serializer.
*/
@@ -115,15 +124,17 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Maximum indentation.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.maxIndent"</js>
* <li><b>Data type:</b> <code>Integer</code>
* <li><b>Default:</b> <code>100</code>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the maximum indentation level in the serialized document.
+ *
* <p>
* This setting does not apply to the MessagePack or RDF serializers.
*/
@@ -131,13 +142,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <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.
@@ -149,15 +161,17 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Quote character.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.quoteChar"</js>
* <li><b>Data type:</b> <code>Character</code>
* <li><b>Default:</b> <js>'"'</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* This is the character used for quoting attributes and values.
+ *
* <p>
* This setting does not apply to the MessagePack or RDF serializers.
*/
@@ -165,15 +179,17 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Trim null bean property values.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimNullProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, null bean values will not be serialized to the output.
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -185,15 +201,17 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Trim empty lists and arrays.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyLists"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, empty list values will not be serialized to the output.
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -207,15 +225,17 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Trim empty maps.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimEmptyMaps"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, empty map values will not be serialized to the output.
+ *
* <p>
* Note that enabling this setting has the following effects on parsing:
* <ul class='spaced-list'>
@@ -227,13 +247,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Trim strings.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.trimStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized.
*/
@@ -241,13 +262,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> URI context bean.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriContext"</js>
* <li><b>Data type:</b> {@link UriContext}
* <li><b>Default:</b> {@link UriContext#DEFAULT}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Bean used for resolution of URIs to absolute or root-relative form.
*
@@ -260,13 +282,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> URI resolution.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriResolution"</js>
* <li><b>Data type:</b> {@link UriResolution}
* <li><b>Default:</b> {@link UriResolution#NONE}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Defines the resolution level for URIs when serializing any of the following:
* <ul>
@@ -274,6 +297,7 @@ public class SerializerContext extends BeanContext {
* <li>{@link java.net.URL}
* <li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
+ *
* <p>
* Possible values are:
* <ul>
@@ -289,13 +313,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> URI relativity.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.uriRelativity"</js>
* <li><b>Data type:</b> {@link UriRelativity}
* <li><b>Default:</b> {@link UriRelativity#RESOURCE}
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Defines what relative URIs are relative to when serializing any of the following:
* <ul>
@@ -303,6 +328,7 @@ public class SerializerContext extends BeanContext {
* <li>{@link java.net.URL}
* <li>Properties annotated with {@link org.apache.juneau.annotation.URI @URI}
* </ul>
+ *
* <p>
* Possible values are:
* <ul>
@@ -316,13 +342,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Sort arrays and collections alphabetically.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortCollections"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Note that this introduces a performance penalty.
*/
@@ -330,13 +357,14 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Sort maps alphabetically.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.sortMaps"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Note that this introduces a performance penalty.
*/
@@ -344,32 +372,34 @@ public class SerializerContext extends BeanContext {
/**
* <b>Configuration property:</b> Abridged output.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.abridged"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
- * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed,
- * and therefore top-level type information that might normally be included to determine
- * the data type will not be serialized.
+ * When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level
+ * type information that might normally be included to determine the data type will not be serialized.
+ *
* <p>
- * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js>
- * will be added when this setting is disabled, but not added when it is enabled.
+ * For example, when serializing a POJO with a {@link Bean#typeName()} value, a <js>"_type"</js> will be added when
+ * this setting is disabled, but not added when it is enabled.
*/
public static final String SERIALIZER_abridged = "Serializer.abridged";
/**
* <b>Configuration property:</b> Serializer listener.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Serializer.listener"</js>
* <li><b>Data type:</b> <code>Class<? extends SerializerListener></code>
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Class used to listen for errors and warnings that occur during serialization.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
index 2a6d3bb..80fc063 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
@@ -22,7 +22,7 @@ import org.apache.juneau.http.*;
* Represents a group of {@link Serializer Serializers} that can be looked up by media type.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Provides the following features:
* <ul class='spaced-list'>
* <li>
@@ -36,11 +36,13 @@ import org.apache.juneau.http.*;
* </ul>
*
* <h6 class='topic'>Match ordering</h6>
- * <p>
+ *
* Serializers are matched against <code>Accept</code> strings in the order they exist in this group.
+ *
* <p>
* Adding new entries will cause the entries to be prepended to the group.
* This allows for previous serializers to be overridden through subsequent calls.
+ *
* <p>
* For example, calling <code>g.append(S1.<jk>class</jk>,S2.<jk>class</jk>).append(S3.<jk>class</jk>,S4.<jk>class</jk>)</code>
* will result in the order <code>S3, S4, S1, S2</code>.
@@ -77,11 +79,13 @@ public final class SerializerGroup {
/**
* Constructor.
*
- * @param propertyStore The modifiable properties that were used to initialize the serializers.
- * A snapshot of these will be made so that we can clone and modify this group.
- * @param serializers The serializers defined in this group.
- * The order is important because they will be tried in reverse order (e.g.newer first) in which they will be tried
- * to match against media types.
+ * @param propertyStore
+ * The modifiable properties that were used to initialize the serializers.
+ * A snapshot of these will be made so that we can clone and modify this group.
+ * @param serializers
+ * The serializers defined in this group.
+ * The order is important because they will be tried in reverse order (e.g.newer first) in which they will be tried
+ * to match against media types.
*/
public SerializerGroup(PropertyStore propertyStore, Serializer[] serializers) {
this.propertyStore = PropertyStore.create(propertyStore);
@@ -104,6 +108,7 @@ public final class SerializerGroup {
/**
* Searches the group for a serializer that can handle the specified <code>Accept</code> value.
+ *
* <p>
* The <code>accept</code> value complies with the syntax described in RFC2616, Section 14.1, as described below:
* <p class='bcode'>
@@ -117,6 +122,7 @@ public final class SerializerGroup {
* accept-params = ";" "q" "=" qvalue *( accept-extension )
* accept-extension = ";" token [ "=" ( token | quoted-string ) ]
* </p>
+ *
* <p>
* The general idea behind having the serializer resolution be a two-step process is so that the matched media type
* can be passed in to the {@link WriterSerializer#doSerialize(SerializerSession, Object)} method.
@@ -183,6 +189,7 @@ public final class SerializerGroup {
/**
* Returns the media types that all serializers in this group can handle.
+ *
* <p>
* Entries are ordered in the same order as the serializers in the group.
*
@@ -194,6 +201,8 @@ public final class SerializerGroup {
/**
* Returns a copy of the property store that was used to create the serializers in this group.
+ *
+ * <p>
* This method returns a new factory each time so is somewhat expensive.
*
* @return A new copy of the property store passed in to the constructor.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
index 9636597..e6992f0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroupBuilder.java
@@ -40,6 +40,7 @@ public class SerializerGroupBuilder {
/**
* Create an empty serializer group using the specified property store for settings.
+ *
* <p>
* Note: Modifying the specified property store externally will also modify it here.
*
@@ -96,6 +97,7 @@ public class SerializerGroupBuilder {
/**
* Creates a new {@link SerializerGroup} object using a snapshot of the settings defined in this builder.
+ *
* <p>
* This method can be called multiple times to produce multiple serializer groups.
*
@@ -1114,9 +1116,11 @@ public class SerializerGroupBuilder {
/**
* Specifies the classloader to use when resolving classes from strings for all serializers in this group.
+ *
* <p>
* Can be used for resolving class names when the classes being created are in a different classloader from the
* Juneau code.
+ *
* <p>
* If <jk>null</jk>, the system classloader will be used to resolve classes.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
index f75d3c2..f3c03ff 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
@@ -28,6 +28,7 @@ import org.apache.juneau.transform.*;
/**
* Context object that lives for the duration of a single use of {@link Serializer}.
+ *
* <p>
* Used by serializers for the following purposes:
* <ul class='spaced-list'>
@@ -40,6 +41,7 @@ import org.apache.juneau.transform.*;
* <li>
* Allowing serializer properties to be overridden on method calls.
* </ul>
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -79,30 +81,36 @@ public class SerializerSession extends BeanSession {
/**
* Create a new session using properties specified in the context.
*
- * @param ctx The context creating this session object.
- * The context contains all the configuration settings for this object.
- * @param output The output object.
- * <br>Character-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link Writer}
- * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
- * <li>{@link File} - Output will be written as system-default encoded stream.
- * </ul>
- * <br>Stream-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link OutputStream}
- * <li>{@link File}
- * </ul>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @param ctx
+ * The context creating this session object.
+ * The context contains all the configuration settings for this object.
+ * @param output
+ * The output object.
+ * <br>Character-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link Writer}
+ * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
+ * <li>{@link File} - Output will be written as system-default encoded stream.
+ * </ul>
+ * <br>Stream-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link OutputStream}
+ * <li>{@link File}
+ * </ul>
+ * @param op
+ * The override properties.
+ * 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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
*/
public SerializerSession(SerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale,
TimeZone timeZone, MediaType mediaType, UriContext uriContext) {
@@ -166,7 +174,10 @@ public class SerializerSession extends BeanSession {
/**
* Wraps the specified output object inside an output stream.
+ *
+ * <p>
* Subclasses can override this method to implement their own specialized output streams.
+ *
* <p>
* This method can be used if the output object is any of the following class types:
* <ul>
@@ -193,7 +204,10 @@ public class SerializerSession extends BeanSession {
/**
* Wraps the specified output object inside a writer.
+ *
+ * <p>
* Subclasses can override this method to implement their own specialized writers.
+ *
* <p>
* This method can be used if the output object is any of the following class types:
* <ul>
@@ -252,6 +266,7 @@ public class SerializerSession extends BeanSession {
/**
* Returns the Java method that invoked this serializer.
+ *
* <p>
* When using the REST API, this is the Java method invoked by the REST call.
* Can be used to access annotations defined on the method or class.
@@ -403,8 +418,9 @@ public class SerializerSession extends BeanSession {
* @param attrName The attribute name.
* @param o The current object being serialized.
* @param eType The expected class type.
- * @return The {@link ClassMeta} of the object so that <code>instanceof</code> operations only need to be performed
- * once (since they can be expensive).
+ * @return
+ * The {@link ClassMeta} of the object so that <code>instanceof</code> operations only need to be performed
+ * once (since they can be expensive).
* @throws SerializeException If recursion occurred.
*/
public ClassMeta<?> push(String attrName, Object o, ClassMeta<?> eType) throws SerializeException {
@@ -607,27 +623,28 @@ public class SerializerSession extends BeanSession {
/**
* Converts a String to an absolute URI based on the {@link UriContext} on this session.
*
- * @param uri The input URI.
- * Can be any of the following:
- * <ul>
- * <li>{@link java.net.URI}
- * <li>{@link java.net.URL}
- * <li>{@link CharSequence}
- * </ul>
- * URI can be any of the following forms:
- * <ul>
- * <li><js>"foo://foo"</js> - Absolute URI.
- * <li><js>"/foo"</js> - Root-relative URI.
- * <li><js>"/"</js> - Root URI.
- * <li><js>"context:/foo"</js> - Context-root-relative URI.
- * <li><js>"context:/"</js> - Context-root URI.
- * <li><js>"servlet:/foo"</js> - Servlet-path-relative URI.
- * <li><js>"servlet:/"</js> - Servlet-path URI.
- * <li><js>"request:/foo"</js> - Request-path-relative URI.
- * <li><js>"request:/"</js> - Request-path URI.
- * <li><js>"foo"</js> - Path-info-relative URI.
- * <li><js>""</js> - Path-info URI.
- * </ul>
+ * @param uri
+ * The input URI.
+ * Can be any of the following:
+ * <ul>
+ * <li>{@link java.net.URI}
+ * <li>{@link java.net.URL}
+ * <li>{@link CharSequence}
+ * </ul>
+ * URI can be any of the following forms:
+ * <ul>
+ * <li><js>"foo://foo"</js> - Absolute URI.
+ * <li><js>"/foo"</js> - Root-relative URI.
+ * <li><js>"/"</js> - Root URI.
+ * <li><js>"context:/foo"</js> - Context-root-relative URI.
+ * <li><js>"context:/"</js> - Context-root URI.
+ * <li><js>"servlet:/foo"</js> - Servlet-path-relative URI.
+ * <li><js>"servlet:/"</js> - Servlet-path URI.
+ * <li><js>"request:/foo"</js> - Request-path-relative URI.
+ * <li><js>"request:/"</js> - Request-path URI.
+ * <li><js>"foo"</js> - Path-info-relative URI.
+ * <li><js>""</js> - Path-info URI.
+ * </ul>
* @return The resolved URI.
*/
public String resolveUri(Object uri) {
@@ -636,8 +653,10 @@ public class SerializerSession extends BeanSession {
/**
* Opposite of {@link #resolveUri(Object)}.
+ *
* <p>
* Converts the URI to a value relative to the specified <code>relativeTo</code> parameter.
+ *
* <p>
* Both parameters can be any of the following:
* <ul>
@@ -645,6 +664,8 @@ public class SerializerSession extends BeanSession {
* <li>{@link java.net.URL}
* <li>{@link CharSequence}
* </ul>
+ *
+ * <p>
* Both URIs can be any of the following forms:
* <ul>
* <li><js>"foo://foo"</js> - Absolute URI.
@@ -824,6 +845,7 @@ public class SerializerSession extends BeanSession {
/**
* Returns the parser-side expected type for the object.
+ *
* <p>
* The return value depends on the {@link SerializerContext#SERIALIZER_abridged} setting.
* When enabled, the parser already knows the Java POJO type being parsed, so there is
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerWriter.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
index 628fc11..ee4f882 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerWriter.java
@@ -19,6 +19,7 @@ import org.apache.juneau.*;
/**
* Simple wrapper around a standard {@link Writer} with additional methods.
+ *
* <p>
* Modeled after the Java ProcessBuilder class so that you can chain commands to reduce the need for string
* concatenation for performance reasons.
@@ -50,8 +51,9 @@ public class SerializerWriter extends Writer {
/**
* @param out The writer being wrapped.
- * @param useWhitespace If <jk>true</jk>, calling {@link #cr(int)} will create an indentation and calling
- * {@link #s()} will write a space character.
+ * @param useWhitespace
+ * If <jk>true</jk>, calling {@link #cr(int)} will create an indentation and calling {@link #s()} will write a
+ * space character.
* @param maxIndent The maximum indentation level.
* @param trimStrings If <jk>true</jk>, strings should be trimmed before they're serialized.
* @param quoteChar The character to write when {@link #q()} is called.
@@ -69,6 +71,7 @@ public class SerializerWriter extends Writer {
/**
* Performs a carriage return.
+ *
* <p>
* Adds a newline and the specified number of tabs (if the {@code useWhitespace} setting is enabled) to the output.
*
@@ -84,6 +87,7 @@ public class SerializerWriter extends Writer {
/**
* Performs a carriage return at the end of a line.
+ *
* <p>
* Adds a newline and the specified number of tabs (if the {@code useWhitespace} setting is enabled) to the output.
*
@@ -165,9 +169,11 @@ public class SerializerWriter extends Writer {
/**
* Appends the specified object as a URI.
+ *
* <p>
* Object is converted to a <code>String</code> using <code>toString()</code>, so this will work on {@link URL} or
* {@link URI} objects, or any other type that returns a URI via it's <code>toString()</code> method.
+ *
* <p>
* The URI is resolved based on the {@link SerializerContext#SERIALIZER_uriRelativity} and
* {@link SerializerContext#SERIALIZER_uriResolution} settings and the {@link UriContext} that's part of the
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/WriterSerializer.java b/juneau-core/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
index bb0491f..e80cb58 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
@@ -25,7 +25,7 @@ import org.apache.juneau.utils.*;
* Subclass of {@link Serializer} for character-based serializers.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* This class is typically the parent class of all character-based serializers.
* It has 2 abstract methods to implement...
* <ul class='spaced-list'>
@@ -36,8 +36,9 @@ import org.apache.juneau.utils.*;
* </ul>
*
* <h6 class='topic'>@Produces annotation</h6>
- * <p>
+ *
* The media types that this serializer can produce is specified through the {@link Produces @Produces} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()}
* and {@link #getResponseContentType()} methods.
@@ -78,8 +79,9 @@ public abstract class WriterSerializer extends Serializer {
}
/**
- * Identical to {@link #serialize(Object)} except throws a {@link RuntimeException}
- * instead of a {@link SerializeException}.
+ * Identical to {@link #serialize(Object)} except throws a {@link RuntimeException} instead of a {@link SerializeException}.
+ *
+ * <p>
* This is typically good enough for debugging purposes.
*
* @param o The object to serialize.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
index 7ea762b..aa5f6fa 100644
--- a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
@@ -23,17 +23,18 @@ import org.apache.juneau.xml.*;
* Serializes POJOs to HTTP responses as XML+SOAP.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/xml+soap</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/xml+soap</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Essentially the same output as {@link XmlDocSerializer}, except wrapped in a standard SOAP envelope.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link SoapXmlSerializerContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerBuilder.java
index 74dd512..f3810fc 100644
--- a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerBuilder.java
@@ -54,7 +54,7 @@ public class SoapXmlSerializerBuilder extends XmlSerializerBuilder {
/**
* <b>Configuration property:</b> The <code>SOAPAction</code> HTTP header value to set on responses.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"SoapXmlSerializer.SOAPAction"</js>
* <li><b>Data type:</b> <code>String</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerContext.java
index 0746c19..e6eb5d6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializerContext.java
@@ -44,7 +44,7 @@ public final class SoapXmlSerializerContext {
/**
* <b>Configuration property:</b> The <code>SOAPAction</code> HTTP header value to set on responses.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"SoapXmlSerializer.SOAPAction"</js>
* <li><b>Data type:</b> <code>String</code>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/DefaultingVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/DefaultingVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/DefaultingVar.java
index e8674ce..6c2bcd6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/DefaultingVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/DefaultingVar.java
@@ -16,9 +16,11 @@ 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>
+ * property doesn't exist: <js>"$S{myProperty,not found}"</js>
+ *
* <p>
* Subclasses must implement the {@link #resolve(VarResolverSession, String)} method.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/MultipartVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/MultipartVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/MultipartVar.java
index 43cb6f7..9c3f2d1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/MultipartVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/MultipartVar.java
@@ -16,6 +16,7 @@ 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>)
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/SimpleVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/SimpleVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/SimpleVar.java
index 9091698..3d926f4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/SimpleVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/SimpleVar.java
@@ -16,10 +16,12 @@ 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.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/StreamedVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/StreamedVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/StreamedVar.java
index 4ab4540..7fc2ead 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/StreamedVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/StreamedVar.java
@@ -14,11 +14,13 @@ 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.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/Var.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/Var.java b/juneau-core/src/main/java/org/apache/juneau/svl/Var.java
index a68ecaa..7a0b6b9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/Var.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/Var.java
@@ -18,18 +18,23 @@ 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>
@@ -48,9 +53,10 @@ 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 is implemented.
- * If <jk>false</jk>, then the {@link #resolve(VarResolverSession, String)} method is implemented.
+ * @param streamed
+ * Whether this variable is 'streamed', meaning the {@link #resolveTo(VarResolverSession, Writer, String)} method
+ * is implemented.
+ * If <jk>false</jk>, then the {@link #resolve(VarResolverSession, String)} method is implemented.
*/
public Var(String name, boolean streamed) {
this.name = name;
@@ -68,6 +74,7 @@ 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>.
@@ -80,6 +87,8 @@ 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).
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/VarResolver.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolver.java b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolver.java
index f4d8cc9..e7af243 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolver.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolver.java
@@ -21,14 +21,17 @@ 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.
- * <p>
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jk>public class</jk> SystemPropertiesVar <jk>extends</jk> SimpleVar {
@@ -52,21 +55,24 @@ import org.apache.juneau.svl.vars.*;
* </p>
*
* <h6 class='topic'>Context objects</h6>
- * <p>
+ *
* 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 {@link ConfigFile} 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>
- * <p>
+ *
* 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)}
@@ -74,12 +80,13 @@ 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>
- * <p>
+ *
* 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.
*
@@ -96,7 +103,7 @@ public class VarResolver {
/**
* Default string variable resolver with support for system properties and environment variables:
- * <p>
+ *
* <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.
@@ -143,9 +150,10 @@ 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.
+ * Session objects can be associated with the specified session using the {@link VarResolverSession#sessionObject(String, Object)}
+ * method.
*
* @return A new resolver session.
*/
@@ -165,6 +173,7 @@ 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
@@ -179,6 +188,7 @@ 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
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
index f4414dd..915d2e8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverBuilder.java
@@ -40,8 +40,9 @@ 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.
+ * @param vars
+ * The variable resolver classes.
+ * These classes must subclass from {@link Var} and have no-arg constructors.
* @return This object (for method chaining).
*/
@SuppressWarnings("unchecked")
@@ -55,6 +56,7 @@ public class VarResolverBuilder {
/**
* Adds the default variables to this builder.
+ *
* <p>
* The default variables are:
* <ul>
@@ -72,6 +74,7 @@ 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.
@@ -87,6 +90,7 @@ 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverContext.java b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverContext.java
index 1f9757d..c39d383 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverContext.java
@@ -19,6 +19,7 @@ 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}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverSession.java b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverSession.java
index ef012e3..0e4b8e1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/VarResolverSession.java
@@ -21,13 +21,17 @@ 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.
*
@@ -41,8 +45,9 @@ 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 context
+ * The {@link VarResolver} context object that contains the {@link Var Vars} and context objects associated with
+ * that resolver.
* @param sessionObjects The session objects.
*
*/
@@ -67,8 +72,9 @@ public class VarResolverSession {
* Resolve all variables in the specified string.
*
* @param s The string to resolve variables in.
- * @return The new string with all variables resolved, or the same string if no variables were found.
- * Null input results in a blank string.
+ * @return
+ * The new string with all variables resolved, or the same string if no variables were found.
+ * Null input results in a blank string.
*/
public String resolve(String s) {
@@ -104,7 +110,7 @@ public class VarResolverSession {
}
}
- /**
+ /*
* Checks to see if string is of the simple form "$X{...}" with no embedded variables.
* This is a common case, and we can avoid using StringWriters.
*/
@@ -144,6 +150,8 @@ 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.
*
@@ -259,6 +267,8 @@ 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/ArgsVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ArgsVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ArgsVar.java
index 5597a8b..b5e7fd2 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ArgsVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ArgsVar.java
@@ -17,8 +17,10 @@ import org.apache.juneau.utils.*;
/**
* JVM args variable resolver.
+ *
* <p>
* The format for this var is <js>"$ARG{argNameOrNum}"</js> or <js>"$ARG{argNameOrNum,defaultValue}"</js>
+ *
* <p>
* This variable resolver requires that an {@link Args} object be set as a context object on the resolver or a
* session object on the resolver session.
@@ -35,6 +37,7 @@ import org.apache.juneau.utils.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"Arg #1 is set to $ARG{1}"</js>));
* </p>
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/ConfigFileVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ConfigFileVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ConfigFileVar.java
index 04e704f..d253c6b 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ConfigFileVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ConfigFileVar.java
@@ -17,9 +17,11 @@ import org.apache.juneau.svl.*;
/**
* Config file variable resolver.
+ *
* <p>
* The format for this var is <js>"$C{key}"</js> or <js>"$C{key,defaultValue}"</js>.
* See {@link ConfigFile#getString(String)} for the format of the key.
+ *
* <p>
* This variable resolver requires that a {@link ConfigFile} object be set as a context object on the resolver or a
* session object on the resolver session.
@@ -36,6 +38,7 @@ import org.apache.juneau.svl.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"Value for myKey in section MySection is $C{MySection/myKey}"</js>));
* </p>
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/EnvVariablesVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/EnvVariablesVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/EnvVariablesVar.java
index ecda3fd..60c0c13 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/EnvVariablesVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/EnvVariablesVar.java
@@ -16,6 +16,7 @@ import org.apache.juneau.svl.*;
/**
* Environment variable variable resolver.
+ *
* <p>
* The format for this var is <js>"$E{envVar}"</js> or <js>"$E{envVar,defaultValue}"</js>
*
@@ -27,6 +28,7 @@ import org.apache.juneau.svl.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"Environment variable PATH is set to $E{PATH}"</js>));
* </p>
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/IfVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/IfVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/IfVar.java
index b5600b5..4f7d9b6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/IfVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/IfVar.java
@@ -18,12 +18,14 @@ import org.apache.juneau.svl.*;
/**
* A basic if-else logic variable resolver.
+ *
* <p>
* The format for this var is one of the following:
* <ul>
* <li><js>"$IF{booleanArg,thenValue}"</js>
* <li><js>"$IF{booleanArg,thenValue,elseValue}"</js>
* </ul>
+ *
* <p>
* The boolean argument is any string.
* <br>The following values are interpreted as <jk>true</jk>: <js>"true"</js>,<js>"TRUE"</js>,<js>"t"</js>,
@@ -38,6 +40,7 @@ import org.apache.juneau.svl.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"Property $IF{$S{someBooleanFlag},IS,IS NOT} set!"</js>));
* </p>
+ *
* <p>
* Since this is a {@link MultipartVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/ManifestFileVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ManifestFileVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ManifestFileVar.java
index 35bea2d..18eb086 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/ManifestFileVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/ManifestFileVar.java
@@ -17,8 +17,10 @@ import org.apache.juneau.utils.*;
/**
* Manifest file entries variable resolver.
+ *
* <p>
* The format for this var is <js>"$MF{key}"</js> or <js>"$MF{key,defaultValue}"</js>
+ *
* <p>
* This variable resolver requires that a {@link ManifestFile} object be set as a context object on the resolver or a
* session object on the resolver session.
@@ -35,6 +37,7 @@ import org.apache.juneau.utils.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"The main class is $MF{Main-Class}"</js>));
* </p>
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/SwitchVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/SwitchVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/SwitchVar.java
index caa6108..e4f19b9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/SwitchVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/SwitchVar.java
@@ -20,6 +20,7 @@ import org.apache.juneau.svl.*;
/**
* A basic switch/case logic variable resolver.
+ *
* <p>
* The format for this var is one of the following:
* <ul>
@@ -29,6 +30,7 @@ import org.apache.juneau.svl.*;
* <li><js>"$SWITCH{stringArg,pattern,thenValue,pattern,thenValue,elsePattern}"</js>
* <li>...
* </ul>
+ *
* <p>
* The pattern can be any string optionally containing <js>'*'</js> or <js>'?'</js> representing any or one character
* respectively.
@@ -41,6 +43,7 @@ import org.apache.juneau.svl.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"We are running on $SWITCH{$P{os.name},*win*,Windows,Something else}!"</js>));
* </p>
+ *
* <p>
* Since this is a {@link MultipartVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/svl/vars/SystemPropertiesVar.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/svl/vars/SystemPropertiesVar.java b/juneau-core/src/main/java/org/apache/juneau/svl/vars/SystemPropertiesVar.java
index 7242db4..b151360 100644
--- a/juneau-core/src/main/java/org/apache/juneau/svl/vars/SystemPropertiesVar.java
+++ b/juneau-core/src/main/java/org/apache/juneau/svl/vars/SystemPropertiesVar.java
@@ -16,6 +16,7 @@ import org.apache.juneau.svl.*;
/**
* System property variable resolver.
+ *
* <p>
* The format for this var is <js>"$S{systemProperty}"</js> or <js>"$S{systemProperty,defaultValue}"</js>
*
@@ -27,6 +28,7 @@ import org.apache.juneau.svl.*;
* <jc>// Use it!</jc>
* System.<jsf>out</jsf>.println(r.resolve(<js>"java.home is set to $S{java.home}"</js>));
* </p>
+ *
* <p>
* Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.
* Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilterBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilterBuilder.java b/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilterBuilder.java
index 5b03cea..7f1d942 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilterBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilterBuilder.java
@@ -21,6 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Bean filter builder initialized from the contents of a {@link Bean @Bean} annotation found on a class.
+ *
* <p>
* <b>*** Internal class - Not intended for external use ***</b>
*/
@@ -30,8 +31,8 @@ public final class AnnotationBeanFilterBuilder extends BeanFilterBuilder {
* Constructor.
*
* @param annotatedClass The class found to have a {@link Bean @Bean} annotation.
- * @param annotations The {@link Bean @Bean} annotations found on the class and all parent classes in
- * child-to-parent order.
+ * @param annotations
+ * The {@link Bean @Bean} annotations found on the class and all parent classes in child-to-parent order.
* @throws Exception Thrown from property namer constructor.
*/
public AnnotationBeanFilterBuilder(Class<?> annotatedClass, Map<Class<?>,Bean> annotations) throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
index 0cdd606..9a354f0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
@@ -19,8 +19,10 @@ import org.apache.juneau.annotation.*;
/**
* Parent class for all bean filters.
+ *
* <p>
* Bean filters are used to control aspects of how beans are handled during serialization and parsing.
+ *
* <p>
* This class can be considered a programmatic equivalent to using the {@link Bean @Bean} annotation on bean classes.
* Thus, it can be used to perform the same function as the <code>@Bean</code> annotation when you don't have
@@ -75,8 +77,9 @@ public class BeanFilter {
/**
* Returns the set and order of names of properties associated with a bean class.
*
- * @return The name of the properties associated with a bean class, or <jk>null</jk> if all bean properties should
- * be used.
+ * @return
+ * The name of the properties associated with a bean class, or <jk>null</jk> if all bean properties should
+ * be used.
*/
public String[] getProperties() {
return properties;
@@ -93,6 +96,7 @@ public class BeanFilter {
/**
* Returns <jk>true</jk> if the properties defined on this bean class should be ordered alphabetically.
+ *
* <p>
* This method is only used when the {@link #getProperties()} method returns <jk>null</jk>.
* Otherwise, the ordering of the properties in the returned value is used.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
index 5312693..0c76a44 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
@@ -21,6 +21,7 @@ import org.apache.juneau.*;
/**
* Builder class for {@link BeanFilter} objects.
+ *
* <p>
* Bean filter builders must have a public no-arg constructor.
* Builder settings should be set in the constructor using the provided setters on this class.
@@ -78,6 +79,8 @@ public abstract class BeanFilterBuilder {
/**
* Specifies the set and order of names of properties associated with the bean class.
+ *
+ * <p>
* The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and
* related methods.
* Entries in the list can also contain comma-delimited lists that will be split.
@@ -103,9 +106,11 @@ public abstract class BeanFilterBuilder {
/**
* Identifies a class to be used as the interface class for this and all subclasses.
+ *
* <p>
* When specified, only the list of properties defined on the interface class will be used during serialization.
* Additional properties on subclasses will be ignored.
+ *
* <p class='bcode'>
* <jc>// Parent class</jc>
* <jk>public abstract class</jk> A {
@@ -130,6 +135,7 @@ public abstract class BeanFilterBuilder {
* String r = s.serialize(a1);
* <jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, r); <jc>// Note f1 is not serialized</jc>
* </p>
+ *
* <p>
* Note that this filter can be used on the parent class so that it filters to all child classes, or can be set
* individually on the child classes.
@@ -144,12 +150,15 @@ public abstract class BeanFilterBuilder {
/**
* Identifies a stop class for this class and all subclasses.
+ *
* <p>
* Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
* Any properties in the stop class or in its base classes will be ignored during analysis.
+ *
* <p>
* For example, in the following class hierarchy, instances of <code>C3</code> will include property <code>p3</code>,
* but not <code>p1</code> or <code>p2</code>.
+ *
* <p class='bcode'>
* <jk>public class</jk> C1 {
* <jk>public int</jk> getP1();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilterBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilterBuilder.java b/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilterBuilder.java
index 64e7d1a..a15522e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilterBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilterBuilder.java
@@ -22,6 +22,7 @@ import org.apache.juneau.internal.*;
/**
* Simple bean filter that simply identifies a class to be used as an interface class for all child classes.
+ *
* <p>
* These objects are created when you pass in non-<code>BeanFilterBuilder</code> classes to
* {@link PropertyStore#addToProperty(String,Object)}, and are equivalent to adding a
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java b/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
index 14e89ee..51dec68 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
@@ -24,20 +24,23 @@ import org.apache.juneau.serializer.*;
* Used to swap out non-serializable objects with serializable replacements during serialization, and vis-versa during parsing.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* <code>PojoSwaps</code> are used to extend the functionality of the serializers and parsers to be able to handle
* POJOs that aren't automatically handled by the serializers or parsers. For example, JSON does not have a standard
* representation for rendering dates.
* By defining a special {@code Date} swap and associating it with a serializer and parser, you can convert a
* {@code Date} object to a {@code String} during serialization, and convert that {@code String} object back into a
* {@code Date} object during parsing.
+ *
* <p>
* Swaps MUST declare a public no-arg constructor so that the bean context can instantiate them.
+ *
* <p>
* <code>PojoSwaps</code> are associated with instances of {@link BeanContext BeanContexts} by passing the swap
* class to the {@link CoreObjectBuilder#pojoSwaps(Class...)} method.
* <br>When associated with a bean context, fields of the specified type will automatically be converted when the
* {@link BeanMap#get(Object)} or {@link BeanMap#put(String, Object)} methods are called.
+ *
* <p>
* <code>PojoSwaps</code> have two parameters:
* <ol>
@@ -50,7 +53,7 @@ import org.apache.juneau.serializer.*;
* {@link BeanMap#put(String,Object)}.
*
* <h6 class='topic'>Subtypes</h6>
- * <p>
+ *
* The following abstract subclasses are provided for common swap types:
* <ol>
* <li>{@link StringSwap} - Objects swapped with strings.
@@ -58,7 +61,7 @@ import org.apache.juneau.serializer.*;
* </ol>
*
* <h6 class='topic'>Localization</h6>
- * <p>
+ *
* Swaps have access to the session locale and timezone through the {@link BeanSession#getLocale()} and
* {@link BeanSession#getTimeZone()} methods.
* This allows you to specify localized swap values when needed.
@@ -66,7 +69,7 @@ import org.apache.juneau.serializer.*;
* <code>Time-Zone</code> headers on the request.
*
* <h6 class='topic'>Swap Class Type {@code <S>}</h6>
- * <p>
+ *
* The swapped object representation of an object must be an object type that the serializers can natively convert to
* JSON (or language-specific equivalent).
* The list of valid transformed types are as follows...
@@ -88,11 +91,11 @@ import org.apache.juneau.serializer.*;
* </ul>
*
* <h6 class='topic'>Normal Class Type {@code <T>}</h6>
- * <p>
+ *
* The normal object representation of an object.
*
* <h6 class='topic'>One-way vs. Two-way Serialization</h6>
- * <p>
+ *
* Note that while there is a unified interface for handling swaps during both serialization and parsing,
* in many cases only one of the {@link #swap(BeanSession, Object)} or {@link #unswap(BeanSession, Object, ClassMeta)}
* methods will be defined because the swap is one-way.
@@ -105,6 +108,7 @@ import org.apache.juneau.serializer.*;
* {@code Date} from just the JSON or XML text.
*
* <h5 class='section'>Additional information:</h5>
+ *
* See <a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.transform</a> for more information.
*
* @param <T> The normal form of the class.
@@ -144,6 +148,7 @@ public abstract class PojoSwap<T,S> {
/**
* If this transform is to be used to serialize non-serializable POJOs, it must implement this method.
+ *
* <p>
* The object must be converted into one of the following serializable types:
* <ul class='spaced-list'>
@@ -163,8 +168,9 @@ public abstract class PojoSwap<T,S> {
* An array of anything on this list.
* </ul>
*
- * @param session The bean session to use to get the class meta.
- * This is always going to be the same bean context that created this swap.
+ * @param session
+ * The bean session to use to get the class meta.
+ * This is always going to be the same bean context that created this swap.
* @param o The object to be transformed.
* @return The transformed object.
* @throws SerializeException If a problem occurred trying to convert the output.
@@ -176,12 +182,15 @@ public abstract class PojoSwap<T,S> {
/**
* If this transform is to be used to reconstitute POJOs that aren't true Java beans, it must implement this method.
*
- * @param session The bean session to use to get the class meta.
- * This is always going to be the same bean context that created this swap.
+ * @param session
+ * The bean session to use to get the class meta.
+ * This is always going to be the same bean context that created this swap.
* @param f The transformed object.
- * @param hint If possible, the parser will try to tell you the object type being created. For example,
- * on a serialized date, this may tell you that the object being created must be of type {@code GregorianCalendar}.
- * <br>This may be <jk>null</jk> if the parser cannot make this determination.
+ * @param hint
+ * If possible, the parser will try to tell you the object type being created.
+ * For example, on a serialized date, this may tell you that the object being created must be of type
+ * {@code GregorianCalendar}.
+ * <br>This may be <jk>null</jk> if the parser cannot make this determination.
* @return The narrowed object.
* @throws ParseException If this method is not implemented.
*/
@@ -200,6 +209,7 @@ public abstract class PojoSwap<T,S> {
/**
* Returns the G class, the generalized form of the class.
+ *
* <p>
* Subclasses must override this method if the generalized class is {@code Object}, meaning it can produce multiple
* generalized forms.
@@ -212,10 +222,13 @@ public abstract class PojoSwap<T,S> {
/**
* Returns the {@link ClassMeta} of the transformed class type.
+ *
+ * <p>
* This value is cached for quick lookup.
*
- * @param beanContext The bean context to use to get the class meta.
- * This is always going to be the same bean context that created this swap.
+ * @param beanContext
+ * The bean context to use to get the class meta.
+ * This is always going to be the same bean context that created this swap.
* @return The {@link ClassMeta} of the transformed class type.
*/
public ClassMeta<?> getSwapClassMeta(BeanContext beanContext) {
@@ -228,8 +241,9 @@ public abstract class PojoSwap<T,S> {
* Checks if the specified object is an instance of the normal class defined on this swap.
*
* @param o The object to check.
- * @return <jk>true</jk> if the specified object is a subclass of the normal class defined on this transform.
- * <jk>null</jk> always return <jk>false</jk>.
+ * @return
+ * <jk>true</jk> if the specified object is a subclass of the normal class defined on this transform.
+ * <jk>null</jk> always return <jk>false</jk>.
*/
public boolean isNormalObject(Object o) {
if (o == null)
@@ -241,8 +255,9 @@ public abstract class PojoSwap<T,S> {
* Checks if the specified object is an instance of the swap class defined on this swap.
*
* @param o The object to check.
- * @return <jk>true</jk> if the specified object is a subclass of the transformed class defined on this transform.
- * <jk>null</jk> always return <jk>false</jk>.
+ * @return
+ * <jk>true</jk> if the specified object is a subclass of the transformed class defined on this transform.
+ * <jk>null</jk> always return <jk>false</jk>.
*/
public boolean isSwappedObject(Object o) {
if (o == null)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java b/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
index 69f3dfe..fa8b57f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
@@ -22,9 +22,11 @@ import org.apache.juneau.serializer.*;
/**
* Specialized {@link PojoSwap} for surrogate classes.
+ *
* <p>
* Surrogate classes are used in place of other classes during serialization.
* For example, you may want to use a surrogate class to change the names or order of bean properties on a bean.
+ *
* <p>
* The following is an example of a surrogate class change changes a property name:
* <p class='bcode'>
@@ -36,6 +38,7 @@ import org.apache.juneau.serializer.*;
* }
* }
* </p>
+ *
* <p>
* Optionally, a public static method can be used to un-transform a class during parsing:
* <p class='bcode'>
@@ -46,6 +49,7 @@ import org.apache.juneau.serializer.*;
* }
* }
* </p>
+ *
* <p>
* Surrogate classes must conform to the following:
* <ul class='spaced-list'>
@@ -63,6 +67,7 @@ import org.apache.juneau.serializer.*;
* transformed class can be instantiated by the parser before being converted into the normal class by the
* un-transform method).
* </ul>
+ *
* <p>
* Surrogate classes are associated with serializers and parsers using the {@link CoreObjectBuilder#pojoSwaps(Class...)}
* method.
@@ -112,6 +117,7 @@ import org.apache.juneau.serializer.*;
* }
* }
* </p>
+ *
* <p>
* It should be noted that a surrogate class is functionally equivalent to the following {@link PojoSwap}
* implementation:
@@ -149,6 +155,8 @@ public class SurrogateSwap<T,F> extends PojoSwap<T,F> {
/**
* Given the specified surrogate class, return the list of POJO swaps.
+ *
+ * <p>
* A transform is returned for each public 1-arg constructor found.
* Returns an empty list if no public 1-arg constructors are found.
*
[04/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/Microservice.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/Microservice.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/Microservice.java
index 4aabb8f..e4a556a 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/Microservice.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/Microservice.java
@@ -28,13 +28,16 @@ import org.apache.juneau.utils.*;
/**
* Parent class for all microservices.
+ *
* <p>
* A microservice defines a simple API for starting and stopping simple Java services contained in executable jars.
+ *
* <p>
* The general command for invoking these services is...
* <p class='bcode'>
* java -jar mymicroservice.jar [mymicroservice.cfg]
* </p>
+ *
* <p>
* Your microservice class must be specified as the <jk>Main-Class</jk> entry in the manifest file of your microservice
* jar file.
@@ -42,7 +45,6 @@ import org.apache.juneau.utils.*;
* <h6 class='topic'>Microservice Configuration</h6>
*
* This class defines the following method for accessing configuration for your microservice:
- * <p>
* <ul class='spaced-list'>
* <li>
* {@link #getArgs()} - The command-line arguments passed to the jar file.
@@ -56,7 +58,6 @@ import org.apache.juneau.utils.*;
*
* Subclasses must implement a static void main method as the entry point for the microservice.
* Typically, this method will simply consist of the following...
- * <p>
* <p class='bcode'>
* <jk>public static void</jk> main(String[] args) <jk>throws</jk> Exception {
* <jk>new</jk> MyMicroservice(args).start();
@@ -66,7 +67,6 @@ import org.apache.juneau.utils.*;
* <h6 class='topic'>Lifecycle Methods</h6>
*
* Subclasses must implement the following lifecycle methods:
- * <p>
* <ul class='spaced-list'>
* <li>
* {@link #start()} - Gets executed during startup.
@@ -79,7 +79,6 @@ import org.apache.juneau.utils.*;
* <h6 class='topic'>Lifecycle Listener Methods</h6>
*
* Subclasses can optionally implement the following event listener methods:
- * <p>
* <ul class='spaced-list'>
* <li>
* {@link #onStart()} - Gets executed before {@link #start()}.
@@ -94,7 +93,6 @@ import org.apache.juneau.utils.*;
* <h6 class='topic'>Other Methods</h6>
*
* Subclasses can optionally override the following methods to provide customized behavior:
- * <p>
* <ul class='spaced-list'>
* <li>
* {@link #createVarResolver()} - Creates the {@link VarResolver} used to resolve variables in the config file
@@ -121,6 +119,7 @@ public abstract class Microservice {
/**
* Specifies the path of the config file for this microservice.
+ *
* <p>
* If you do not specify the config file location, we attempt to resolve it through the following methods:
* <ol>
@@ -129,6 +128,8 @@ public abstract class Microservice {
* <li>A config file in the same location and with the same name as the executable jar file.
* (e.g. <js>"java -jar myjar.jar"</js> will look for <js>"myjar.cfg"</js>).
* </ol>
+ *
+ * <p>
* If this path does not exist, a {@link FileNotFoundException} will be thrown from the {@link #start()} command.
*
* @param cfPath The absolute or relative path of the config file.
@@ -150,6 +151,7 @@ public abstract class Microservice {
/**
* Specifies the config file for this microservice.
+ *
* <p>
* Note that if you use this method instead of {@link #setConfig(String,boolean)}, the config file will not use
* the variable resolver constructed from {@link #createVarResolver()}.
@@ -164,6 +166,7 @@ public abstract class Microservice {
/**
* Specifies the manifest file of the jar file this microservice is contained within.
+ *
* <p>
* If you do not specify the manifest file, we attempt to resolve it through the following methods:
* <ol>
@@ -207,7 +210,7 @@ public abstract class Microservice {
}
/**
- * Same as {@link #setManifest(Manifest)} except finds and loads the manifest file of the jar file that the
+ * Same as {@link #setManifest(Manifest)} except finds and loads the manifest file of the jar file that the
* specified class is contained within.
*
* @param c The class whose jar file contains the manifest to use for this microservice.
@@ -220,8 +223,8 @@ public abstract class Microservice {
}
/**
- * Creates the {@link VarResolver} used to resolve variables in the
- * config file returned by {@link #getConfig()}.
+ * Creates the {@link VarResolver} used to resolve variables in the config file returned by {@link #getConfig()}.
+ *
* <p>
* The default implementation resolves the following variables:
* <ul>
@@ -234,6 +237,7 @@ public abstract class Microservice {
* <li><code>$SWITCH{stringArg,pattern,thenVal...}</code>,
* <code>$SWITCH{stringArg,pattern,thenVal,elseVal...}</code> - Switch-block logic.
* </ul>
+ *
* <p>
* Subclasses can override this method to provide their own variables.
*
@@ -280,8 +284,10 @@ public abstract class Microservice {
/**
* Returns the command-line arguments passed into the application.
+ *
* <p>
* This method can be called from the class constructor.
+ *
* <p>
* See {@link Args} for details on using this method.
*
@@ -293,6 +299,7 @@ public abstract class Microservice {
/**
* Returns the external INI-style configuration file that can be used to configure your microservice.
+ *
* <p>
* The config file location is determined in the following order:
* <ol class='spaced-list'>
@@ -304,12 +311,16 @@ public abstract class Microservice {
* The name of the microservice jar with a <js>".cfg"</js> suffix (e.g.
* <js>"mymicroservice.jar"</js>-><js>"mymicroservice.cfg"</js>).
* </ol>
+ *
* <p>
* If all methods for locating the config file fail, then this method returns <jk>null</jk>.
+ *
* <p>
* Subclasses can set their own config file by calling the {@link #setConfig(ConfigFile)} method.
+ *
* <p>
* String variables defined by {@link #createVarResolver()} are automatically resolved when using this method.
+ *
* <p>
* This method can be called from the class constructor.
*
@@ -358,8 +369,8 @@ public abstract class Microservice {
*
* <cc># A POJO with embedded variables</cc>
* <ck>aBean2</ck> = {foo:'$ARG{0}',baz:$C{MySection/anInt}}
- *
* </p>
+ *
* <p class='bcode'>
* <jc>// Java code for accessing config entries above.</jc>
* ConfigFile cf = getConfig();
@@ -385,9 +396,10 @@ public abstract class Microservice {
/**
* Returns the main jar manifest file contents as a simple {@link ObjectMap}.
+ *
* <p>
- * This map consists of the contents of {@link Manifest#getMainAttributes()} with the keys
- * and entries converted to simple strings.
+ * This map consists of the contents of {@link Manifest#getMainAttributes()} with the keys and entries converted to
+ * simple strings.
* <p>
* This method can be called from the class constructor.
*
@@ -413,8 +425,10 @@ public abstract class Microservice {
/**
* Start this application.
+ *
* <p>
* Default implementation simply calls {@link #onStart()}.
+ *
* <p>
* Overridden methods MUST call this method FIRST so that the {@link #onStart()} method is called.
*
@@ -545,6 +559,7 @@ public abstract class Microservice {
/**
* Joins the application with the current thread.
+ *
* <p>
* Default implementation is a no-op.
*
@@ -557,8 +572,10 @@ public abstract class Microservice {
/**
* Stop this application.
+ *
* <p>
* Default implementation simply calls {@link #onStop()}.
+ *
* <p>
* Overridden methods MUST call this method LAST so that the {@link #onStop()} method is called.
*
@@ -585,6 +602,7 @@ public abstract class Microservice {
/**
* Called at the beginning of the {@link #start()} call.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -592,6 +610,7 @@ public abstract class Microservice {
/**
* Called at the end of the {@link #stop()} call.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -599,6 +618,7 @@ public abstract class Microservice {
/**
* Called if the {@link ConfigFile#save()} is called on the config file.
+ *
* <p>
* Subclasses can override this method to listen for config file changes.
*
@@ -608,6 +628,7 @@ public abstract class Microservice {
/**
* Called if one or more changes occur in the config file.
+ *
* <p>
* Subclasses can override this method to listen for config file changes.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/Resource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/Resource.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/Resource.java
index 2c6283c..ef0eea1 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/Resource.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/Resource.java
@@ -18,6 +18,7 @@ import org.apache.juneau.svl.vars.*;
/**
* Superclass for all REST resources.
+ *
* <p>
* In additional to the functionality of the {@link RestServletDefault} group,
* augments the {@link RestContext#getVarResolver()} method with the following additional variable types:
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/ResourceGroup.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/ResourceGroup.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/ResourceGroup.java
index 793ab6e..ce27cef 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/ResourceGroup.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/ResourceGroup.java
@@ -18,6 +18,7 @@ import org.apache.juneau.svl.vars.*;
/**
* Superclass for all REST resource groups.
+ *
* <p>
* In additional to the functionality of the {@link RestServletGroupDefault} group,
* augments the {@link RestContext#getVarResolver()} method with the following additional variable types:
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java
index 6fbdd72..9dd4639 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java
@@ -43,17 +43,17 @@ import org.eclipse.jetty.util.ssl.*;
* Entry point for Juneau microservice that implements a REST interface using Jetty on a single port.
*
* <h6 class='topic'>Jetty Server Details</h6>
- * <p>
+ *
* The Jetty server is created by the {@link #createServer()} method and started with the {@link #startServer()} method.
* These methods can be overridden to provided customized behavior.
*
* <h6 class='topic'>Defining REST Resources</h6>
- * <p>
+ *
* Top-level REST resources are defined by the {@link #getResourceMap()} method.
* This method can be overridden to provide a customized list of REST resources.
*
* <h6 class='topic'>Logging</h6>
- * <p>
+ *
* Logging is initialized by the {@link #initLogging()} method.
* This method can be overridden to provide customized logging behavior.
*
@@ -85,6 +85,8 @@ public class RestMicroservice extends Microservice {
/**
* Main method.
+ *
+ * <p>
* Subclasses must also implement this method!
*
* @param args Command line arguments.
@@ -185,8 +187,10 @@ public class RestMicroservice extends Microservice {
/**
* Initialize the logging for this microservice.
+ *
* <p>
* Subclasses can override this method to provide customized logging.
+ *
* <p>
* The default implementation uses the <cs>Logging</cs> section in the config file to set up logging:
* <p class='bcode'>
@@ -286,11 +290,12 @@ public class RestMicroservice extends Microservice {
/**
* Method used to create (but not start) an instance of a Jetty server.
+ *
* <p>
* Subclasses can override this method to customize the Jetty server before it is started.
+ *
* <p>
* The default implementation is configured by the following values in the config file:
- * <p>
* <p class='bcode'>
* <cc>#================================================================================
* # REST settings
@@ -419,6 +424,7 @@ public class RestMicroservice extends Microservice {
/**
* Method used to start the Jetty server created by {@link #createServer()}.
+ *
* <p>
* Subclasses can override this method to customize server startup.
*
@@ -435,12 +441,12 @@ public class RestMicroservice extends Microservice {
/**
* Returns the resource map to use for this microservice.
- * <p>
+ *
* <p>
* Subclasses can override this method to programmatically specify their resources.
+ *
* <p>
* The default implementation is configured by the following values in the config file:
- * <p>
* <p class='bcode'>
*
* <cc>#================================================================================
@@ -465,10 +471,10 @@ public class RestMicroservice extends Microservice {
* # the manifest file.</cc>
* <ck>resources</ck> =
* </p>
+ *
* <p>
- * In most cases, the rest resources will be specified in the manifest file since
- * it's not likely to be a configurable property:
- * <p>
+ * In most cases, the rest resources will be specified in the manifest file since it's not likely to be a
+ * configurable property:
* <p class='bcode'>
* <mk>Rest-Resources:</mk> org.apache.juneau.microservice.sample.RootResources
* </p>
@@ -510,9 +516,9 @@ public class RestMicroservice extends Microservice {
/**
* Called when {@link ConfigFile#save()} is called on the config file.
+ *
* <p>
* The default behavior is configured by the following value in the config file:
- * <p>
* <p class='bcode'>
* <cs>[REST]</cs>
*
@@ -556,6 +562,7 @@ public class RestMicroservice extends Microservice {
/**
* Called before {@link #createServer()} is called.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -563,6 +570,7 @@ public class RestMicroservice extends Microservice {
/**
* Called before {@link #startServer()} is called.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -570,6 +578,7 @@ public class RestMicroservice extends Microservice {
/**
* Called after the Jetty server is started.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -577,6 +586,7 @@ public class RestMicroservice extends Microservice {
/**
* Called before the Jetty server is stopped.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
@@ -584,6 +594,7 @@ public class RestMicroservice extends Microservice {
/**
* Called after the Jetty server is stopped.
+ *
* <p>
* Subclasses can override this method to hook into the lifecycle of this application.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
index 99ea01c..5d818bc 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
@@ -35,18 +35,18 @@ import org.apache.juneau.utils.*;
/**
* REST resource that allows access to a file system directory.
+ *
* <p>
* The root directory is specified in one of two ways:
- * </p>
* <ul class='spaced-list'>
* <li>
* Specifying the location via a <l>DirectoryResource.rootDir</l> property.
* <li>
* Overriding the {@link #getRootDir()} method.
* </ul>
+ *
* <p>
* Read/write access control is handled through the following properties:
- * </p>
* <ul class='spaced-list'>
* <li>
* <l>DirectoryResource.allowViews</l> - If <jk>true</jk>, allows view and download access to files.
@@ -55,6 +55,7 @@ import org.apache.juneau.utils.*;
* <li>
* <l>DirectoryResource.allowDeletes</l> - If <jk>true</jk>, allows files to be deleted.
* </ul>
+ *
* <p>
* Access can also be controlled by overriding the {@link #checkAccess(RestRequest)} method.
*/
@@ -95,7 +96,10 @@ public class DirectoryResource extends Resource {
/**
* Returns the root directory defined by the 'rootDir' init parameter.
+ *
+ * <p>
* Subclasses can override this method to provide their own root directory.
+ *
* @return The root directory.
*/
protected File getRootDir() {
@@ -109,9 +113,7 @@ public class DirectoryResource extends Resource {
}
/**
- * [GET /*]
- * On directories, returns a directory listing.
- * On files, returns information about the file.
+ * [GET /*] - On directories, returns a directory listing. On files, returns information about the file.
*
* @param req The HTTP request.
* @return Either a FileResource or list of FileResources depending on whether it's a
@@ -149,8 +151,7 @@ public class DirectoryResource extends Resource {
}
/**
- * [DELETE /*]
- * Delete a file on the file system.
+ * [DELETE /*] - Delete a file on the file system.
*
* @param req The HTTP request.
* @return The message <js>"File deleted"</js> if successful.
@@ -171,8 +172,7 @@ public class DirectoryResource extends Resource {
}
/**
- * [PUT /*]
- * Add or overwrite a file on the file system.
+ * [PUT /*] - Add or overwrite a file on the file system.
*
* @param req The HTTP request.
* @return The message <js>"File added"</js> if successful.
@@ -194,8 +194,9 @@ public class DirectoryResource extends Resource {
}
/**
- * [VIEW /*]
- * View the contents of a file.
+ * [VIEW /*] - View the contents of a file.
+ *
+ * <p>
* Applies to files only.
*
* @param req The HTTP request.
@@ -222,8 +223,9 @@ public class DirectoryResource extends Resource {
}
/**
- * [DOWNLOAD /*]
- * Download the contents of a file.
+ * [DOWNLOAD /*] - Download the contents of a file.
+ *
+ * <p>
* Applies to files only.
*
* @param req The HTTP request.
@@ -251,6 +253,8 @@ public class DirectoryResource extends Resource {
/**
* Verify that the specified request is allowed.
+ *
+ * <p>
* Subclasses can override this method to provide customized behavior.
* Method should throw a {@link RestException} if the request should be disallowed.
*
@@ -275,6 +279,7 @@ public class DirectoryResource extends Resource {
/**
* Constructor.
+ *
* @param f The file.
* @param url The URL of the file resource.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogEntryFormatter.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogEntryFormatter.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogEntryFormatter.java
index ad547fb..2c36603 100644
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogEntryFormatter.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogEntryFormatter.java
@@ -24,6 +24,7 @@ import java.util.regex.*;
/**
* Log entry formatter.
+ *
* <p>
* Uses three simple parameter for configuring log entry formats:
* <ul class='spaced-list'>
@@ -35,6 +36,7 @@ import java.util.regex.*;
* <code>useStackTraceHashes</code> - A setting that causes duplicate stack traces to be replaced with 8-character
* hash strings.
* </ul>
+ *
* <p>
* This class converts the format strings into a regular expression that can be used to parse the resulting log file.
*/
@@ -49,21 +51,24 @@ public class LogEntryFormatter extends Formatter {
/**
* Create a new formatter.
*
- * @param format The log entry format. e.g. <js>"[{date} {level}] {msg}%n"</js>
- * The string can contain any of the following variables:
- * <ol>
- * <li><js>"{date}"</js> - The date, formatted per <js>"Logging/dateFormat"</js>.
- * <li><js>"{class}"</js> - The class name.
- * <li><js>"{method}"</js> - The method name.
- * <li><js>"{logger}"</js> - The logger name.
- * <li><js>"{level}"</js> - The log level name.
- * <li><js>"{msg}"</js> - The log message.
- * <li><js>"{threadid}"</js> - The thread ID.
- * <li><js>"{exception}"</js> - The localized exception message.
- * </ol>
- * @param dateFormat The {@link SimpleDateFormat} format to use for dates. e.g. <js>"yyyy.MM.dd hh:mm:ss"</js>.
- * @param useStackTraceHashes If <jk>true</jk>, only print unique stack traces once and then refer to them by a
- * simple 8 character hash identifier.
+ * @param format
+ * The log entry format. e.g. <js>"[{date} {level}] {msg}%n"</js>
+ * The string can contain any of the following variables:
+ * <ol>
+ * <li><js>"{date}"</js> - The date, formatted per <js>"Logging/dateFormat"</js>.
+ * <li><js>"{class}"</js> - The class name.
+ * <li><js>"{method}"</js> - The method name.
+ * <li><js>"{logger}"</js> - The logger name.
+ * <li><js>"{level}"</js> - The log level name.
+ * <li><js>"{msg}"</js> - The log message.
+ * <li><js>"{threadid}"</js> - The thread ID.
+ * <li><js>"{exception}"</js> - The localized exception message.
+ * </ol>
+ * @param dateFormat
+ * The {@link SimpleDateFormat} format to use for dates. e.g. <js>"yyyy.MM.dd hh:mm:ss"</js>.
+ * @param useStackTraceHashes
+ * If <jk>true</jk>, only print unique stack traces once and then refer to them by a simple 8 character hash
+ * identifier.
*/
public LogEntryFormatter(String format, String dateFormat, boolean useStackTraceHashes) {
this.df = new SimpleDateFormat(dateFormat);
@@ -194,10 +199,12 @@ public class LogEntryFormatter extends Formatter {
}
/**
- * Given a matcher that has matched the pattern specified by {@link #getLogEntryPattern()},
- * returns the field value from the match.
+ * Given a matcher that has matched the pattern specified by {@link #getLogEntryPattern()}, returns the field value
+ * from the match.
*
- * @param fieldName The field name. Possible values are:
+ * @param fieldName
+ * The field name.
+ * Possible values are:
* <ul>
* <li><js>"date"</js>
* <li><js>"class"</js>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogParser.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogParser.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogParser.java
index 3aca085..59e5165 100644
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogParser.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogParser.java
@@ -20,9 +20,10 @@ import java.util.regex.*;
/**
* Utility class for reading log files.
+ *
* <p>
- * Provides the capability of returning splices of log files based on dates and filtering based
- * on thread and logger names.
+ * Provides the capability of returning splices of log files based on dates and filtering based on thread and logger
+ * names.
*/
public class LogParser implements Iterable<LogParser.Entry>, Iterator<LogParser.Entry> {
private BufferedReader br;
@@ -113,8 +114,7 @@ public class LogParser implements Iterable<LogParser.Entry>, Iterator<LogParser.
}
/**
- * Serializes the contents of the parsed log file to the specified writer
- * and then closes the underlying reader.
+ * Serializes the contents of the parsed log file to the specified writer and then closes the underlying reader.
*
* @param w The writer to write the log file to.
* @throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-releng/eclipse-preferences/user-dictionary.txt
----------------------------------------------------------------------
diff --git a/juneau-releng/eclipse-preferences/user-dictionary.txt b/juneau-releng/eclipse-preferences/user-dictionary.txt
index 03e4024..e287b97 100644
--- a/juneau-releng/eclipse-preferences/user-dictionary.txt
+++ b/juneau-releng/eclipse-preferences/user-dictionary.txt
@@ -10,467 +10,467 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
* specific language governing permissions and limitations under the License. *
***************************************************************************************************************************
+aaa
+ab
+abbr
abbrev
-juneau
-juno
-servlet
-microservice
-lax
-jena
-zip
-json
-xml
-html
-javadoc
-jc
-jd
-jt
-jk
-js
-jf
-jsa
-jsf
-jsm
-jss
-ja
-xt
-xa
-xc
-xs
-xv
-mk
-mv
-cc
-cs
-ck
-ce
-cv
-l
-properties
-ua
-uk
-un
-us
-
-bcode
-int
-myparam
-foo
-remoteable
-url
-proxies
-proxy
-marshalled
-doclink
-href
-myurl
-foo
-baz
-bcode
-serializers
-mybeans
-serializer
-foobar
-metadata
-scratchpads
-int
-serializable
-overridable
-arg
-introspector
-specs
-subpackages
-config
-timezone
-genericized
-hashmap
-dyna
-souped
-impl
-struct
-prev
-covariant
-superclasses
-nutshell
-multi
-args
-enum
-bm
-metas
-op
-classloader
-swappable
-unswap
-init
-enums
-charset
-stateless
-typecasting
accessor
-iterable
-lowercase
-def
-decapitalize
-cacheable
-classpath
-ps
-bc
-hashcode
-scratchpad
+addr
+admin
+andandand
+anywhereville
+apache
+api
appendable
-uri
-relativize
-relativizes
-relativized
-mod
-javadocs
-subtypes
-doctree
-mytype
-jackson
-params
-jane
-doe
-hyperlink
-codepoint
-sublink
-jp
-rel
-hreflang
-en
-em
-logo
-timestamp
-xhtml
-src
-marshalling
-namespaces
-sq
-janesmith
-namespace
-xmlabbrev
-bognar
-barry
-caceres
-mpeg
-div
-xmlns
-fÃn
-cognos
-dataset
+apr
+arg
+args
+attr
+aug
+auth
barack
-obama
-george
-ds
-abbr
-coords
+barney
+barry
+batchfile
+baz
+bbb
+bc
+bcode
+bcode
bdi
bdo
-dir
+billy
+birthdate
blockquote
+blog
+bm
+bognar
br
+byteranges
+ca
+caceres
+cacheable
+callable
+cc
+ce
+centric
+cert
+cf
+charset
+chrome
+chunked
+ck
+classloader
+classpath
+cloudant
+cm
+cmd
+codec
+codepoint
+cognos
col
colgroup
+colspan
+com
+concat
+config
+configfile
+cont
+cookbook
+coords
+costas
+covariant
+cp
+crawford
+cs
+css
+csv
+ctx
+cv
+da
+danish
datalist
+dataset
+datatype
dd
+dec
+decapitalize
+def
+deflate
del
+demoted
+deserialize
dfn
+differentiable
+dir
+discoverable
+discriminator
+div
dl
+doclink
+docs
+doctree
+doctype
+doe
+ds
dt
+duper
+dvi
+dyna
+em
+en
+endian
+enum
+enums
+envfile
+etag
+ethel
+ext
+extlink
+favicon
+feb
+fico
fieldset
figcaption
-hr
-iframe
+filesystem
+firefox
+firewall
+fixarray
+fixext
+fixint
+fixmap
+fixnum
+fixstr
+foo
+foo
+foobar
+fred
+fÃn
+gatewayed
+gb
+gecko
+genericized
+generics
+george
+gif
+gigabytes
+globalizable
+globalized
+gzip
+hashcode
+hashmap
+hashsums
+hostname
+hr
+href
+hreflang
+htdocs
+htm
+html
+htmldoc
+http
+httpclient
+httpcore
+httpmime
+https
+hussein
+hv
+hyperlink
+hyperlinks
+iframe
img
+impl
+inbound
+init
+instanceof
+int
+int
+intercepters
+interceptors
+introspectable
+introspector
+io
+iri
+iso
+iter
+iterable
+iterables
+ja
+jackson
+jan
+jane
+janesmith
+javadoc
+javadocs
+javascript
+jc
+jd
+jena
+jetty
+jf
+jk
+jp
+jpeg
+js
+jsa
+jsf
+jsm
+json
+jss
+jt
+jul
+jun
+juneau
+juneaubp
+juno
kbd
keygen
+l
+lang
+lax
li
+lib
+libwww
+lifecycle
+locales
+localhost
+logo
+lossless
+losslessly
+lowercase
+lowercased
+ls
+lucy
+maori
+marshalled
+marshalling
+maxage
+mertz
+metadata
+metamodel
+metamodels
+metas
+mf
+mi
+microservice
+microservices
+min
+mk
+mkdirs
+mod
+mozilla
+mpeg
+msg
+msgpack
+multi
+multipart
+mv
+myarg
+mybeans
+mydiv
+mydocs
+myentry
+myform
+myheader
+mymethod
+myobject
+myparam
+myproperty
+myproxy
+myresource
+mystyles
+mytable
+mytype
+myurl
+namespace
+namespaces
nav
+neg
+nls
noscript
+nosniff
+nov
+nowrap
+ns
+nutshell
+obama
+oct
+octets
ol
+onload
+onmouseover
+op
optgroup
+ordinality
+org
+orig
+ororor
+outbound
+outerdata
+overridable
param
+params
+parsable
+payload
+pb
+pg
+pl
+playback
+png
+pojo
+pos
+pp
+pragma
pre
+prev
+println
+properties
+proxies
+proxy
+ps
+pseudonym
+pseudonyms
+pw
+qs
+queryable
+qvalue
+qvalues
rb
+rc
+rd
+rdf
+readonly
+reconstitute
+ref
+referer
+rel
+relativize
+relativized
+relativizes
+remoteable
+req
+resp
+retryable
+revalidate
+revalidating
+ricky
rp
+rs
rt
rtc
+rv
samp
+scratchpad
+scratchpads
+se
+seemlessly
+seg
+sept
+serializable
+serializer
+serializers
+servlet
+servlets
+sf
+sic
+sorta
+souped
+spec
+specs
+sq
+sql
+src
+ss
+ssl
+ssv
+stacktrace
+stateless
+str
+streamable
+struct
+stylesheet
+stylesheets
+subclassed
+subdirectories
+sublink
+subpackages
+subpath
+subtype
+subtypes
+superclasses
+superinterfaces
+swappable
tbody
td
+tee
+templating
+testcases
textarea
tfoot
th
thead
+threadid
+throwables
+thu
+timestamp
+timezone
+tm
+tomcat
+tooltips
tr
+traversable
+tsv
+tumblr
+txt
+typecasting
+ua
+uint
+uk
ul
+ultra
+un
+uncacheable
+unencoded
+unicode
+unswap
+uon
+uri
+url
+urlencoded
+urlencoding
+us
+usemap
+username
+utf
+val
+validator
+vals
var
+vars
+waitangi
wbr
-attr
-xxx
-readonly
-usemap
-pragma
-ordinality
-playback
-onmouseover
-mydiv
-myform
-mytable
-ref
-htmldoc
-req
-csv
-ssv
-tsv
-http
-https
+webmaster
+website
+websocket
+writeable
ws
wss
-urlencoded
www
-templating
-payload
-multipart
-discriminator
-spec
-docs
-website
-gzip
-nls
-hyperlinks
-stylesheet
-css
-subclassed
-outerdata
-subtype
-htdocs
-metamodel
-metamodels
-costas
-billy
-barney
-dvi
-jpeg
-extlink
-qvalue
-utf
-unicode
-iso
-deflate
-qvalues
-danish
-da
-gb
-maxage
-revalidate
-min
-waitangi
-maori
-mi
-octets
-resp
-pos
-nov
-gif
-byteranges
-orig
-gatewayed
-revalidating
-validator
+xa
+xc
+xhtml
+xml
+xmlabbrev
+xmlbase
+xmlns
+xs
+xt
+xv
+xxx
+xyz
xyzzy
-thu
-dec
-org
-webmaster
-oct
-inbound
-lowercased
-outbound
-referer
-sic
-libwww
-demoted
-chunked
-websocket
-firefox
-gecko
-rv
-mozilla
-uncacheable
-fred
-pseudonym
-firewall
-ricky
-ethel
-lucy
-mertz
-pseudonyms
-val
-datatype
-cf
-configfile
-envfile
-vals
-batchfile
-unencoded
-duper
-println
-generics
-mkdirs
-locales
-myobject
-com
-iterables
-superinterfaces
-tee
-javascript
-aaa
-bbb
yyy
-xyz
-birthdate
-fixint
-fixmap
-fixarray
-fixstr
-ext
-uint
-fixext
-str
-neg
-fixnum
-endian
-cont
-msgpack
-myproxy
-mymethod
-pojo
-parsable
-instanceof
-vars
-myproperty
-mf
-reconstitute
yyyy
-uon
-anywhereville
-differentiable
-ultra
-colspan
-seg
-pp
-andandand
-ororor
-zzz
-fico
-cmd
-ls
-pb
-ns
-losslessly
-lossless
-ab
-addr
-microservices
-traversable
-queryable
-introspectable
-cookbook
-pg
-servlets
-centric
-aug
-discoverable
+zip
zipped
-jetty
-subpath
-cp
-ca
-cm
-globalizable
-hussein
-jul
-rd
-crawford
-tumblr
-blog
-sql
-rs
-concat
-ss
-se
-cloudant
-apr
-feb
-jan
-sept
-jun
-iter
-onload
-lang
-etag
-throwables
-callable
-urlencoding
-rdf
-xmlbase
-doctype
-iri
-api
-juneaubp
-deserialize
-lifecycle
-myentry
-myarg
-auth
-username
-codec
-lib
-io
-httpclient
-httpcore
-httpmime
-globalized
-sorta
-writeable
-tomcat
-myheader
-streamable
-htm
-txt
-png
-stylesheets
-favicon
-subdirectories
-nowrap
-hashsums
-stacktrace
-msg
-qs
-filesystem
-nosniff
-chrome
-admin
-apache
-mystyles
-mydocs
-myresource
-tooltips
-testcases
-interceptors
-seemlessly
-pl
-pw
-rc
-localhost
-retryable
-hostname
-hv
-tm
-ctx
-sf
-ssl
-intercepters
-cert
-gigabytes
+zzz
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/DateHeader.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/DateHeader.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/DateHeader.java
index b1321d9..98f2412 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/DateHeader.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/DateHeader.java
@@ -19,6 +19,7 @@ import org.apache.http.message.*;
/**
* Convenience class for setting date headers in RFC2616 format.
+ *
* <p>
* Equivalent to the following code:
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/NameValuePairs.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/NameValuePairs.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/NameValuePairs.java
index 4a9a98b..e7ab3a1 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/NameValuePairs.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/NameValuePairs.java
@@ -24,6 +24,7 @@ import org.apache.juneau.urlencoding.*;
/**
* Convenience class for constructing instances of <code>List<NameValuePair></code> for the
* {@link UrlEncodedFormEntity} class.
+ *
* <p>
* Instances of this method can be passed directly to the {@link RestClient#doPost(Object, Object)} method or
* {@link RestCall#input(Object)} methods to perform URL-encoded form posts.
@@ -53,6 +54,7 @@ public final class NameValuePairs extends LinkedList<NameValuePair> {
/**
* Appends the specified name/value pair to the end of this list.
+ *
* <p>
* The value is simply converted to a string using <code>toString()</code>, or <js>"null"</js> if <jk>null</jk>.
*
@@ -67,6 +69,7 @@ public final class NameValuePairs extends LinkedList<NameValuePair> {
/**
* Appends the specified name/value pair to the end of this list.
+ *
* <p>
* The value is converted to UON notation using the {@link UrlEncodingSerializer} defined on the client.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/ResponsePattern.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/ResponsePattern.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/ResponsePattern.java
index a0e1ae0..cf491c6 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/ResponsePattern.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/ResponsePattern.java
@@ -17,13 +17,14 @@ import java.util.regex.*;
/**
* Used to find regular expression matches in REST responses made through {@link RestCall}.
+ *
* <p>
* Response patterns are applied to REST calls through the {@link RestCall#responsePattern(ResponsePattern)} method.
*
* <h5 class='section'>Example:</h5>
+ *
* This example shows how to use a response pattern finder to find and capture patterns for <js>"x=number"</js> and
* <js>"y=string"</js> from a response body.
- * <p>
* <p class='bcode'>
* <jk>final</jk> List<Number> xList = <jk>new</jk> ArrayList<Number>();
* <jk>final</jk> List<String> yList = <jk>new</jk> ArrayList<String>();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
----------------------------------------------------------------------
diff --git a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
index c73dfa4..d7c9c36 100644
--- a/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
+++ b/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
@@ -18,8 +18,8 @@ import org.apache.juneau.serializer.*;
import org.apache.juneau.urlencoding.*;
/**
- * Subclass of {@link NameValuePair} for serializing POJOs as URL-encoded form post entries
- * using the {@link UrlEncodingSerializer class}.
+ * Subclass of {@link NameValuePair} for serializing POJOs as URL-encoded form post entries using the
+ * {@link UrlEncodingSerializer class}.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BaseProvider.java
----------------------------------------------------------------------
diff --git a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BaseProvider.java b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BaseProvider.java
index 7ec2633..ce95bb0 100644
--- a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BaseProvider.java
+++ b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BaseProvider.java
@@ -74,8 +74,8 @@ public class BaseProvider implements MessageBodyReader<Object>, MessageBodyWrite
/**
* Returns properties defined on the specified method through the {@link RestMethod#properties()}
- * annotation specified on the method and the {@link JuneauProvider#properties()} annotation
- * specified on the provider class.
+ * annotation specified on the method and the {@link JuneauProvider#properties()} annotation specified on the
+ * provider class.
*
* @param a All annotations defined on the method.
* @return A map of all properties define on the method.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
----------------------------------------------------------------------
diff --git a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
index 6390073..e36a5fc 100644
--- a/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
+++ b/juneau-rest-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
@@ -30,7 +30,7 @@ import org.apache.juneau.xml.*;
* Annotations applicable to subclasses of {@link BaseProvider}.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Used to associate serializers, parsers, filters, and properties with instances of {@link BaseProvider}.
*/
@Documented
@@ -41,19 +41,23 @@ public @interface JuneauProvider {
/**
* Provider-level bean filters.
+ *
* <p>
* These filters are applied to all serializers and parsers being used by the provider.
+ *
* <p>
* If the specified class is an instance of {@link BeanFilterBuilder}, then a filter built from that builder is added.
* Any other classes are wrapped in a {@link InterfaceBeanFilterBuilder} to indicate that subclasses should
- * be treated as the specified class type.
+ * be treated as the specified class type.
*/
Class<?>[] beanFilters() default {};
/**
* Provider-level POJO swaps.
+ *
* <p>
* These POJO swaps are applied to all serializers and parsers being used by the provider.
+ *
* <p>
* If the specified class is an instance of {@link PojoSwap}, then that swap is added.
* Any other classes are wrapped in a {@link SurrogateSwap}.
@@ -62,6 +66,7 @@ public @interface JuneauProvider {
/**
* Provider-level properties.
+ *
* <p>
* Any of the following property names can be specified:
* <ul>
@@ -73,8 +78,10 @@ public @interface JuneauProvider {
* <li>{@link XmlSerializerContext}
* <li>{@link XmlParserContext}
* </ul>
+ *
* <p>
* Property values will be converted to the appropriate type.
+ *
* <p>
* These properties can be augmented/overridden through the {@link RestMethod#properties()} annotation on the REST method.
*/
@@ -82,6 +89,7 @@ public @interface JuneauProvider {
/**
* Shortcut for setting {@link #properties()} of boolean types.
+ *
* <p>
* Setting a flag is the equivalent to setting the same property to <js>"true"</js>.
*/
@@ -89,6 +97,7 @@ public @interface JuneauProvider {
/**
* Specifies a list of {@link Serializer} classes to add to the list of serializers available for this provider.
+ *
* <p>
* This annotation can only be used on {@link Serializer} classes that have no-arg constructors.
*/
@@ -96,6 +105,7 @@ public @interface JuneauProvider {
/**
* Specifies a list of {@link Parser} classes to add to the list of parsers available for this provider.
+ *
* <p>
* This annotation can only be used on {@link Parser} classes that have no-arg constructors.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/CallRouter.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/CallRouter.java b/juneau-rest/src/main/java/org/apache/juneau/rest/CallRouter.java
index acc4de4..a592f5a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/CallRouter.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/CallRouter.java
@@ -21,6 +21,7 @@ import javax.servlet.http.*;
/**
* Represents a group of CallMethods on a REST resource that handle the same HTTP Method name but with different
* paths/matchers/guards/etc...
+ *
* <p>
* Incoming requests for a particular HTTP method type (e.g. <js>"GET"</js>) are handed off to this class and then
* dispatched to the appropriate CallMethod.
@@ -67,6 +68,7 @@ class CallRouter {
/**
* Workhorse method.
+ *
* <p>
* Routes this request to one of the CallMethods.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/ClientVersionMatcher.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/ClientVersionMatcher.java b/juneau-rest/src/main/java/org/apache/juneau/rest/ClientVersionMatcher.java
index 891cda5..6d340bd 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/ClientVersionMatcher.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/ClientVersionMatcher.java
@@ -19,6 +19,7 @@ import org.apache.juneau.rest.annotation.*;
/**
* Specialized matcher for matching client versions.
+ *
* <p>
* See {@link RestResource#clientVersionHeader} and {@link RestMethod#clientVersion} for more info.
*/
@@ -30,8 +31,9 @@ public class ClientVersionMatcher extends RestMatcher {
/**
* Constructor.
*
- * @param clientVersionHeader The HTTP request header name containing the client version.
- * If <jk>null</jk> or an empty string, uses <js>"X-Client-Version"</js>
+ * @param clientVersionHeader
+ * The HTTP request header name containing the client version.
+ * If <jk>null</jk> or an empty string, uses <js>"X-Client-Version"</js>
* @param javaMethod The version string that the client version must match.
*/
protected ClientVersionMatcher(String clientVersionHeader, java.lang.reflect.Method javaMethod) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/ReaderResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/ReaderResource.java b/juneau-rest/src/main/java/org/apache/juneau/rest/ReaderResource.java
index 93478c2..ee2272e 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/ReaderResource.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/ReaderResource.java
@@ -27,6 +27,7 @@ import org.apache.juneau.svl.*;
/**
* Represents the contents of a text file with convenience methods for resolving {@link Parameter} variables and adding
* HTTP response headers.
+ *
* <p>
* This class is handled special by the {@link WritableHandler} class.
*/
@@ -41,14 +42,15 @@ public class ReaderResource implements Writable {
* Constructor.
*
* @param mediaType The HTTP media type.
- * @param contents The contents of this resource.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code>CharSequence</code>
- * <li><code>Reader</code>
- * <li><code>File</code>
- * </ul>
+ * @param contents
+ * The contents of this resource.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code>CharSequence</code>
+ * <li><code>Reader</code>
+ * <li><code>File</code>
+ * </ul>
* @throws IOException
*/
protected ReaderResource(MediaType mediaType, Object...contents) throws IOException {
@@ -61,15 +63,16 @@ public class ReaderResource implements Writable {
* @param mediaType The resource media type.
* @param headers The HTTP response headers for this streamed resource.
* @param varSession Optional variable resolver for resolving variables in the string.
- * @param contents The resource contents.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code>InputStream</code>
- * <li><code>Reader</code> - Converted to UTF-8 bytes.
- * <li><code>File</code>
- * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
- * </ul>
+ * @param contents
+ * The resource contents.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code>InputStream</code>
+ * <li><code>Reader</code> - Converted to UTF-8 bytes.
+ * <li><code>File</code>
+ * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
+ * </ul>
* @throws IOException
*/
public ReaderResource(MediaType mediaType, Map<String,String> headers, VarResolverSession varSession, Object...contents) throws IOException {
@@ -134,18 +137,20 @@ public class ReaderResource implements Writable {
/**
* Specifies the contents for this resource.
+ *
* <p>
* This method can be called multiple times to add more content.
*
- * @param contents The resource contents.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code>InputStream</code>
- * <li><code>Reader</code> - Converted to UTF-8 bytes.
- * <li><code>File</code>
- * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
- * </ul>
+ * @param contents
+ * The resource contents.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code>InputStream</code>
+ * <li><code>Reader</code> - Converted to UTF-8 bytes.
+ * <li><code>File</code>
+ * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
+ * </ul>
* @return This object (for method chaining).
*/
public Builder contents(Object...contents) {
@@ -157,7 +162,9 @@ public class ReaderResource implements Writable {
* Specifies an HTTP response header value.
*
* @param name The HTTP header name.
- * @param value The HTTP header value. Will be converted to a <code>String</code> using {@link Object#toString()}.
+ * @param value
+ * The HTTP header value.
+ * Will be converted to a <code>String</code> using {@link Object#toString()}.
* @return This object (for method chaining).
*/
public Builder header(String name, Object value) {
@@ -168,7 +175,9 @@ public class ReaderResource implements Writable {
/**
* Specifies HTTP response header values.
*
- * @param headers The HTTP headers. Values will be converted to <code>Strings</code> using {@link Object#toString()}.
+ * @param headers
+ * The HTTP headers.
+ * Values will be converted to <code>Strings</code> using {@link Object#toString()}.
* @return This object (for method chaining).
*/
public Builder headers(Map<String,Object> headers) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/Redirect.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/Redirect.java b/juneau-rest/src/main/java/org/apache/juneau/rest/Redirect.java
index 1a79d24..98fdb75 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/Redirect.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/Redirect.java
@@ -21,6 +21,7 @@ import org.apache.juneau.urlencoding.*;
/**
* REST methods can return this object as a shortcut for performing <code>HTTP 302</code> redirects.
+ *
* <p>
* The following example shows the difference between handling redirects via the {@link RestRequest}/{@link RestResponse},
* and the simplified approach of using this class.
@@ -39,6 +40,7 @@ import org.apache.juneau.urlencoding.*;
* <jk>return new</jk> Redirect(<js>"foobar"</js>);
* }
* </p>
+ *
* <p>
* The constructor can use a {@link MessageFormat}-style pattern with multiple arguments:
* <p class='bcode'>
@@ -47,10 +49,12 @@ import org.apache.juneau.urlencoding.*;
* <jk>return new</jk> Redirect(<js>"foo/{0}/bar/{1}"</js>, id1, id2);
* }
* </p>
+ *
* <p>
* The arguments are serialized to strings using the servlet's {@link UrlEncodingSerializer}, so any filters defined on
* the serializer or REST method/class will be used when present.
* The arguments will also be automatically URL-encoded.
+ *
* <p>
* Redirecting to the servlet root can be accomplished by simply using the no-arg constructor.
* <p class='bcode'>
@@ -61,6 +65,7 @@ import org.apache.juneau.urlencoding.*;
* <jk>return new</jk> Redirect();
* }
* </p>
+ *
* <p>
* This class is handled by {@link org.apache.juneau.rest.response.RedirectHandler}, a built-in default response
* handler created in {@link RestConfig}.
@@ -72,15 +77,18 @@ public final class Redirect {
/**
* Redirect to the specified URL.
+ *
+ * <p>
* Relative paths are interpreted as relative to the servlet path.
*
- * @param uri The URL to redirect to.
- * <br>Can be any of the following:
- * <ul>
- * <li><code>URL</code>
- * <li><code>URI</code>
- * <li><code>CharSequence</code>
- * </ul>
+ * @param uri
+ * The URL to redirect to.
+ * <br>Can be any of the following:
+ * <ul>
+ * <li><code>URL</code>
+ * <li><code>URI</code>
+ * <li><code>CharSequence</code>
+ * </ul>
* @param args Optional {@link MessageFormat}-style arguments.
*/
public Redirect(Object uri, Object...args) {
@@ -89,15 +97,18 @@ public final class Redirect {
/**
* Convenience method for redirecting to instance of {@link URL} and {@link URI}.
+ *
+ * <p>
* Same as calling <code>toString()</code> on the object and using the other constructor.
*
- * @param uri The URL to redirect to.
- * <br>Can be any of the following:
- * <ul>
- * <li><code>URL</code>
- * <li><code>URI</code>
- * <li><code>CharSequence</code>
- * </ul>
+ * @param uri
+ * The URL to redirect to.
+ * <br>Can be any of the following:
+ * <ul>
+ * <li><code>URL</code>
+ * <li><code>URI</code>
+ * <li><code>CharSequence</code>
+ * </ul>
*/
public Redirect(Object uri) {
this(0, uri, (Object[])null);
@@ -105,16 +116,19 @@ public final class Redirect {
/**
* Redirect to the specified URL.
+ *
+ * <p>
* Relative paths are interpreted as relative to the servlet path.
*
* @param httpResponseCode The HTTP response code.
- * @param url The URL to redirect to.
- * <br>Can be any of the following:
- * <ul>
- * <li><code>URL</code>
- * <li><code>URI</code>
- * <li><code>CharSequence</code>
- * </ul>
+ * @param url
+ * The URL to redirect to.
+ * <br>Can be any of the following:
+ * <ul>
+ * <li><code>URL</code>
+ * <li><code>URI</code>
+ * <li><code>CharSequence</code>
+ * </ul>
* @param args Optional {@link MessageFormat}-style arguments.
*/
public Redirect(int httpResponseCode, Object url, Object...args) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RequestBody.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestBody.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestBody.java
index a7fe2e5..5da647a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestBody.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestBody.java
@@ -86,9 +86,11 @@ public class RequestBody {
/**
* Reads the input from the HTTP request as JSON, XML, or HTML and converts the input to a POJO.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is <jk>true</jk>, then first looks for {@code &body=xxx} in the URL
* query string.
+ *
* <p>
* If type is <jk>null</jk> or <code>Object.<jk>class</jk></code>, then the actual type will be determined
* automatically based on the following input:
@@ -131,6 +133,7 @@ public class RequestBody {
* <td><jk>null</jk></td>
* </tr>
* </table>
+ *
* <p>
* Refer to <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a> for
* a complete definition of supported POJOs.
@@ -157,8 +160,9 @@ public class RequestBody {
* @param <T> The class type to instantiate.
* @return The input parsed to a POJO.
* @throws IOException If a problem occurred trying to read from the reader.
- * @throws ParseException If the input contains a syntax error or is malformed for the requested {@code Accept}
- * header or is not valid for the specified type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed for the requested {@code Accept} header or is not valid
+ * for the specified type.
*/
public <T> T asType(Class<T> type) throws IOException, ParseException {
return parse(beanSession.getClassMeta(type));
@@ -182,13 +186,15 @@ public class RequestBody {
* Map<String,List<MyBean>> body = req.getBody().asType(TreeMap.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>);
* </p>
*
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param <T> The class type to instantiate.
* @return The input parsed to a POJO.
*/
@@ -198,6 +204,7 @@ public class RequestBody {
/**
* Returns the HTTP body content as a plain string.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is true, then first looks for {@code &body=xxx} in the URL query
* string.
@@ -225,9 +232,11 @@ public class RequestBody {
/**
* Returns the HTTP body content as a {@link Reader}.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is true, then first looks for {@code &body=xxx} in the URL query
* string.
+ *
* <p>
* Automatically handles GZipped input streams.
*
@@ -257,6 +266,7 @@ public class RequestBody {
/**
* Returns the HTTP body content as an {@link InputStream}.
+ *
* <p>
* Automatically handles GZipped input streams.
*
@@ -281,9 +291,10 @@ public class RequestBody {
/**
* Returns the parser and media type matching the request <code>Content-Type</code> header.
*
- * @return The parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching parser
- * was found.
- * Includes the matching media type.
+ * @return
+ * The parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching parser was
+ * found.
+ * Includes the matching media type.
*/
public ParserMatch getParserMatch() {
MediaType mediaType = headers.getContentType();
@@ -305,8 +316,9 @@ public class RequestBody {
/**
* Returns the parser matching the request <code>Content-Type</code> header.
*
- * @return The parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching parser
- * was found.
+ * @return
+ * The parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching parser was
+ * found.
*/
public Parser getParser() {
ParserMatch pm = getParserMatch();
@@ -316,8 +328,9 @@ public class RequestBody {
/**
* Returns the reader parser matching the request <code>Content-Type</code> header.
*
- * @return The reader parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching
- * reader parser was found, or the matching parser was an input stream parser.
+ * @return
+ * The reader parser matching the request <code>Content-Type</code> header, or <jk>null</jk> if no matching
+ * reader parser was found, or the matching parser was an input stream parser.
*/
public ReaderParser getReaderParser() {
Parser p = getParser();
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RequestFormData.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestFormData.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestFormData.java
index 4c56c33..a9ba34e 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestFormData.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestFormData.java
@@ -45,6 +45,7 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
/**
* Adds default entries to these form-data parameters.
+ *
* <p>
* This includes the default form-data parameters defined on the servlet and method levels.
*
@@ -75,6 +76,7 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
/**
* Returns a form data parameter value.
+ *
* <p>
* Parameter lookup is case-insensitive (consistent with WAS, but differs from Tomcat).
*
@@ -221,6 +223,7 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
/**
* Same as {@link #get(String, Class)} except for use on multi-part parameters
* (e.g. <js>"key=1&key=2&key=3"</js> instead of <js>"key=(1,2,3)"</js>)
+ *
* <p>
* This method must only be called when parsing into classes of type Collection or array.
*
@@ -260,13 +263,15 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
* </p>
*
* @param name The parameter name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @return The parameter value converted to the specified class type.
* @throws ParseException
*/
@@ -277,17 +282,20 @@ public class RequestFormData extends LinkedHashMap<String,String[]> {
/**
* Same as {@link #get(String, Type, Type...)} except for use on multi-part parameters
* (e.g. <js>"key=1&key=2&key=3"</js> instead of <js>"key=(1,2,3)"</js>)
+ *
* <p>
* This method must only be called when parsing into classes of type Collection or array.
*
* @param name The parameter name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @return The parameter value converted to the specified class type.
* @throws ParseException
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RequestHeaders.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestHeaders.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestHeaders.java
index ff3f3cd..18f403c 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestHeaders.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestHeaders.java
@@ -28,6 +28,7 @@ import org.apache.juneau.urlencoding.*;
/**
* Represents the headers in an HTTP request.
+ *
* <p>
* Entries are stored in a case-insensitive map.
*/
@@ -59,6 +60,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Adds default entries to these headers.
+ *
* <p>
* This includes the default headers defined on the servlet and method levels.
*
@@ -98,10 +100,11 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the specified header value, or <jk>null</jk> if the header doesn't exist.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is <jk>true</jk>, then first looks for {@code &HeaderName=x} in the
* URL query string.
- * <p>
+ *
* @param name The header name.
* @return The header value, or <jk>null</jk> if it doesn't exist.
*/
@@ -118,6 +121,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the specified header value, or a default value if the header doesn't exist.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is <jk>true</jk>, then first looks for {@code &HeaderName=x} in the
* URL query string.
@@ -187,6 +191,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the specified header value converted to a POJO.
+ *
* <p>
* The type can be any POJO type convertible from a <code>String</code>
* (See <a class="doclink" href="package-summary.html#PojosConvertableFromString">POJOs Convertible From Strings</a>).
@@ -228,6 +233,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the specified header value converted to a POJO.
+ *
* <p>
* The type can be any POJO type convertible from a <code>String</code>
* (See <a class="doclink" href="package-summary.html#PojosConvertableFromString">POJOs Convertible From Strings</a>).
@@ -239,13 +245,15 @@ public class RequestHeaders extends TreeMap<String,String[]> {
* </p>
*
* @param name The HTTP header name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param <T> The class type to convert the header value to.
* @return The parameter value converted to the specified class type.
* @throws ParseException If the header could not be converted to the specified type.
@@ -282,6 +290,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Accept</code> header on the request.
+ *
* <p>
* Content-Types that are acceptable for the response.
*
@@ -298,6 +307,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Accept-Charset</code> header on the request.
+ *
* <p>
* Character sets that are acceptable.
*
@@ -314,6 +324,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Accept-Encoding</code> header on the request.
+ *
* <p>
* List of acceptable encodings.
*
@@ -330,6 +341,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Accept-Language</code> header on the request.
+ *
* <p>
* List of acceptable human languages for response.
*
@@ -346,6 +358,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Authorization</code> header on the request.
+ *
* <p>
* Authentication credentials for HTTP authentication.
*
@@ -362,6 +375,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Cache-Control</code> header on the request.
+ *
* <p>
* Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain.
*
@@ -378,6 +392,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Connection</code> header on the request.
+ *
* <p>
* Control options for the current connection and list of hop-by-hop request fields.
*
@@ -395,6 +410,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Content-Length</code> header on the request.
+ *
* <p>
* The length of the request body in octets (8-bit bytes).
*
@@ -411,6 +427,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Content-Type</code> header on the request.
+ *
* <p>
* The MIME type of the body of the request (used with POST and PUT requests).
*
@@ -427,6 +444,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Date</code> header on the request.
+ *
* <p>
* The date and time that the message was originated (in "HTTP-date" format as defined by RFC 7231 Date/Time Formats).
*
@@ -443,6 +461,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Expect</code> header on the request.
+ *
* <p>
* Indicates that particular server behaviors are required by the client.
*
@@ -459,6 +478,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>From</code> header on the request.
+ *
* <p>
* The email address of the user making the request.
*
@@ -475,6 +495,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Host</code> header on the request.
+ *
* <p>
* The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening.
* The port number may be omitted if the port is the standard port for the service requested.
@@ -493,6 +514,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>If-Match</code> header on the request.
+ *
* <p>
* Only perform the action if the client supplied entity matches the same entity on the server.
* This is mainly for methods like PUT to only update a resource if it has not been modified since the user last
@@ -511,6 +533,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>If-Modified-Since</code> header on the request.
+ *
* <p>
* Allows a 304 Not Modified to be returned if content is unchanged.
*
@@ -527,6 +550,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>If-None-Match</code> header on the request.
+ *
* <p>
* Allows a 304 Not Modified to be returned if content is unchanged, see HTTP ETag.
*
@@ -543,6 +567,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>If-Range</code> header on the request.
+ *
* <p>
* If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity.
*
@@ -559,6 +584,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>If-Unmodified-Since</code> header on the request.
+ *
* <p>
* Only send the response if the entity has not been modified since a specific time.
*
@@ -575,6 +601,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Max-Forwards</code> header on the request.
+ *
* <p>
* Limit the number of times the message can be forwarded through proxies or gateways.
*
@@ -591,6 +618,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Pragma</code> header on the request.
+ *
* <p>
* Implementation-specific fields that may have various effects anywhere along the request-response chain.
*
@@ -607,6 +635,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Proxy-Authorization</code> header on the request.
+ *
* <p>
* Authorization credentials for connecting to a proxy.
*
@@ -623,6 +652,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Range</code> header on the request.
+ *
* <p>
* Request only part of an entity. Bytes are numbered from 0.
*
@@ -639,6 +669,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Referer</code> header on the request.
+ *
* <p>
* This is the address of the previous web page from which a link to the currently requested page was followed.
*
@@ -655,6 +686,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>TE</code> header on the request.
+ *
* <p>
* The transfer encodings the user agent is willing to accept: the same values as for the response header field
* Transfer-Encoding can be used, plus the "trailers" value (related to the "chunked" transfer method) to notify the
@@ -673,6 +705,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Time-Zone</code> header value on the request if there is one.
+ *
* <p>
* Example: <js>"GMT"</js>.
*
@@ -687,6 +720,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>User-Agent</code> header on the request.
+ *
* <p>
* The user agent string of the user agent.
*
@@ -703,6 +737,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Upgrade</code> header on the request.
+ *
* <p>
* Ask the server to upgrade to another protocol.
*
@@ -719,6 +754,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Via</code> header on the request.
+ *
* <p>
* Informs the server of proxies through which the request was sent.
*
@@ -735,6 +771,7 @@ public class RequestHeaders extends TreeMap<String,String[]> {
/**
* Returns the <code>Warning</code> header on the request.
+ *
* <p>
* A general warning about possible problems with the entity body.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestPathMatch.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
index fa75767..7dde6d6 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestPathMatch.java
@@ -23,6 +23,7 @@ import org.apache.juneau.urlencoding.*;
/**
* Contains information about the matched path on the HTTP request.
+ *
* <p>
* Provides access to the matched path variables and path match remainder.
*/
@@ -65,6 +66,7 @@ public class RequestPathMatch extends TreeMap<String,String> {
/**
* Returns the specified path parameter converted to a POJO.
+ *
* <p>
* The type can be any POJO type convertible from a <code>String</code> (See <a class="doclink"
* href="package-summary.html#PojosConvertibleFromString">POJOs Convertible From Strings</a>).
@@ -99,9 +101,11 @@ public class RequestPathMatch extends TreeMap<String,String> {
/**
* Returns the specified path parameter converted to a POJO.
+ *
* <p>
* The type can be any POJO type convertible from a <code>String</code> (See <a class="doclink"
* href="package-summary.html#PojosConvertibleFromString">POJOs Convertible From Strings</a>).
+ *
* <p>
* Use this method if you want to parse into a parameterized <code>Map</code>/<code>Collection</code> object.
*
@@ -121,13 +125,15 @@ public class RequestPathMatch extends TreeMap<String,String> {
* </p>
*
* @param name The attribute name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param <T> The class type to convert the attribute value to.
* @return The attribute value converted to the specified class type.
* @throws ParseException
@@ -149,9 +155,9 @@ public class RequestPathMatch extends TreeMap<String,String> {
/**
* Returns the decoded remainder of the URL following any path pattern matches.
+ *
* <p>
* The behavior of path remainder is shown below given the path pattern "/foo/*":
- * <p>
* <table class='styled'>
* <tr>
* <th>URL</th>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RequestQuery.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestQuery.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestQuery.java
index c4d9a7c..e714344 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RequestQuery.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RequestQuery.java
@@ -48,6 +48,7 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Adds default entries to these query parameters.
+ *
* <p>
* This includes the default queries defined on the servlet and method levels.
*
@@ -78,12 +79,15 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Returns a query parameter value.
+ *
* <p>
* Same as {@link HttpServletRequest#getParameter(String)} except only looks in the URL string, not parameters from
* URL-Encoded FORM posts.
+ *
* <p>
* This method can be used to retrieve a parameter without triggering the underlying servlet API to load and parse
* the request body.
+ *
* <p>
* If multiple query parameters have the same name, this returns only the first instance.
*
@@ -110,8 +114,9 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
*
* @param name The URL parameter name.
* @param def The default value.
- * @return The parameter value, or the default value if parameter not specified or has no value
- * (e.g. <js>"&foo"</js>.
+ * @return
+ * The parameter value, or the default value if parameter not specified or has no value
+ * (e.g. <js>"&foo"</js>.
*/
public String getString(String name, String def) {
String s = getString(name);
@@ -122,8 +127,9 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
* Same as {@link #getString(String)} but converts the value to an integer.
*
* @param name The URL parameter name.
- * @return The parameter value, or <code>0</code> if parameter not specified or has no value
- * (e.g. <js>"&foo"</js>.
+ * @return
+ * The parameter value, or <code>0</code> if parameter not specified or has no value
+ * (e.g. <js>"&foo"</js>.
*/
public int getInt(String name) {
return getInt(name, 0);
@@ -134,8 +140,9 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
*
* @param name The URL parameter name.
* @param def The default value.
- * @return The parameter value, or the default value if parameter not specified or has no value
- * (e.g. <js>"&foo"</js>.
+ * @return
+ * The parameter value, or the default value if parameter not specified or has no value
+ * (e.g. <js>"&foo"</js>.
*/
public int getInt(String name, int def) {
String s = getString(name);
@@ -146,8 +153,9 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
* Same as {@link #getString(String)} but converts the value to a boolean.
*
* @param name The URL parameter name.
- * @return The parameter value, or <jk>false</jk> if parameter not specified or has no value
- * (e.g. <js>"&foo"</js>.
+ * @return
+ * The parameter value, or <jk>false</jk> if parameter not specified or has no value
+ * (e.g. <js>"&foo"</js>.
*/
public boolean getBoolean(String name) {
return getBoolean(name, false);
@@ -158,8 +166,9 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
*
* @param name The URL parameter name.
* @param def The default value.
- * @return The parameter value, or the default value if parameter not specified or has no value
- * (e.g. <js>"&foo"</js>.
+ * @return
+ * The parameter value, or the default value if parameter not specified or has no value
+ * (e.g. <js>"&foo"</js>.
*/
public boolean getBoolean(String name, boolean def) {
String s = getString(name);
@@ -168,6 +177,7 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Returns the specified query parameter value converted to a POJO.
+ *
* <p>
* This method can be used to retrieve a parameter without triggering the underlying servlet API to load and parse
* the request body.
@@ -216,9 +226,11 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Returns the specified query parameter value converted to a POJO.
+ *
* <p>
* This method can be used to retrieve a parameter without triggering the underlying servlet API to load and parse
* the request body.
+ *
* <p>
* Use this method if you want to parse into a parameterized <code>Map</code>/<code>Collection</code> object.
*
@@ -238,13 +250,15 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
* </p>
*
* @param name The parameter name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param <T> The class type to convert the parameter value to.
* @return The parameter value converted to the specified class type.
* @throws ParseException
@@ -257,13 +271,15 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
* Same as {@link #get(String, Class)} except returns a default value if not found.
*
* @param name The parameter name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param def The default value if the parameter was not specified or is <jk>null</jk>.
* @param <T> The class type to convert the parameter value to.
* @return The parameter value converted to the specified class type.
@@ -276,6 +292,7 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Same as {@link #get(String, Class)} except for use on multi-part parameters
* (e.g. <js>"&key=1&key=2&key=3"</js> instead of <js>"&key=(1,2,3)"</js>).
+ *
* <p>
* This method must only be called when parsing into classes of type Collection or array.
*
@@ -292,17 +309,20 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Same as {@link #get(String, Type, Type...)} except for use on multi-part parameters
* (e.g. <js>"&key=1&key=2&key=3"</js> instead of <js>"&key=(1,2,3)"</js>).
+ *
* <p>
* This method must only be called when parsing into classes of type Collection or array.
*
* @param name The query parameter name.
- * @param type The type of object to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param type
+ * The type of object to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @param <T> The class type to convert the parameter value to.
* @return The query parameter value converted to the specified class type.
* @throws ParseException
@@ -326,6 +346,7 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
/**
* Locates the special search query arguments in the query and returns them as a {@link SearchArgs} object.
+ *
* <p>
* The query arguments are as follows:
* <ul>
@@ -350,11 +371,13 @@ public final class RequestQuery extends LinkedHashMap<String,String[]> {
* <js>"&i="</js> - The case-insensitive search flag.
* <br>Example: <js>"&i=true"</js>
* </ul>
+ *
* <p>
* Whitespace is trimmed in the parameters.
*
- * @return A new {@link SearchArgs} object initialized with the special search query arguments.
- * <jk>null</jk> if no search arguments were found.
+ * @return
+ * A new {@link SearchArgs} object initialized with the special search query arguments.
+ * <jk>null</jk> if no search arguments were found.
*/
public SearchArgs getSearchArgs() {
if (hasAny("s","v","o","p","l","i")) {
[08/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
index 22a4a5b..c28dbf9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
@@ -30,14 +30,17 @@ import org.apache.juneau.utils.*;
* Parent class for all Juneau parsers.
*
* <h6 class='topic'>@Consumes annotation</h6>
- * <p>
+ *
* The media types that this parser can handle is specified through the {@link Consumes @Consumes} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()} method.
*
* <h6 class='topic'>Valid data conversions</h6>
+ *
* Parsers can parse any parsable POJO types, as specified in the <a class="doclink"
* href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>.
+ *
* <p>
* Some examples of conversions are shown below...
* </p>
@@ -92,9 +95,11 @@ import org.apache.juneau.utils.*;
* <td class='code'>String, StringBuilder</td>
* </tr>
* </table>
+ *
* <p>
* In addition, any class types with {@link PojoSwap PojoSwaps} associated with them on the registered
- * {@link #getBeanContext() beanContext} can also be passed in.
+ * {@link #getBeanContext() beanContext} can also be passed in.
+ *
* <p>
* For example, if the {@link CalendarSwap} transform is used to generalize {@code Calendar} objects to {@code String}
* objects.
@@ -102,10 +107,10 @@ import org.apache.juneau.utils.*;
* following syntax...
* <p class='bcode'>
* Calendar c = parser.parse(<js>"'Sun Mar 03 04:05:06 EST 2001'"</js>, GregorianCalendar.<jk>class</jk>);
+ *
* <p>
* If <code>Object.<jk>class</jk></code> is specified as the target type, then the parser automatically determines the
* data types and generates the following object types...
- * </p>
* <table class='styled'>
* <tr><th>JSON type</th><th>Class type</th></tr>
* <tr><td>object</td><td>{@link ObjectMap}</td></tr>
@@ -118,19 +123,20 @@ import org.apache.juneau.utils.*;
*
* <a id='SupportedTypes'></a>
* <h6 class='topic'>Supported types</h6>
- * <p>
+ *
* Several of the methods below take {@link Type} parameters to identify the type of object to create.
* Any of the following types can be passed in to these methods...
- * </p>
* <ul>
* <li>{@link ClassMeta}
* <li>{@link Class}
* <li>{@link ParameterizedType}
* <li>{@link GenericArrayType}
* </ul>
+ *
* <p>
* However, {@code ParameterizedTypes} and {@code GenericArrayTypes} should not contain
* {@link WildcardType WildcardTypes} or {@link TypeVariable TypeVariables}.
+ *
* <p>
* Passing in <jk>null</jk> or <code>Object.<jk>class</jk></code> typically signifies that it's up to the parser
* to determine what object type is being parsed parsed based on the rules above.
@@ -169,13 +175,15 @@ public abstract class Parser extends CoreObject {
/**
* Workhorse method. Subclasses are expected to implement this method.
*
- * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object,
- * Locale, TimeZone, MediaType)}.
- * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
- * @param type The class type of the object to create.
- * If <jk>null</jk> or <code>Object.<jk>class</jk></code>, object type is based on what's being parsed.
- * For example, when parsing JSON text, it may return a <code>String</code>, <code>Number</code>,
- * <code>ObjectMap</code>, etc...
+ * @param session
+ * The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object,
+ * Locale, TimeZone, MediaType)}.
+ * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
+ * @param type
+ * The class type of the object to create.
+ * If <jk>null</jk> or <code>Object.<jk>class</jk></code>, object type is based on what's being parsed.
+ * For example, when parsing JSON text, it may return a <code>String</code>, <code>Number</code>,
+ * <code>ObjectMap</code>, etc...
* @param <T> The class type of the object to create.
* @return The parsed object.
* @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed.
@@ -195,17 +203,19 @@ public abstract class Parser extends CoreObject {
/**
* Entry point for all parsing calls.
+ *
* <p>
- * Calls the {@link #doParse(ParserSession, ClassMeta)} implementation class and catches/rewraps any exceptions
+ * Calls the {@link #doParse(ParserSession, ClassMeta)} implementation class and catches/re-wraps any exceptions
* thrown.
*
- * @param session The runtime session returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale,
- * TimeZone, MediaType)}.
+ * @param session
+ * The runtime session returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale,
+ * TimeZone, MediaType)}.
* @param type The class type of the object to create.
* @param <T> The class type of the object to create.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
*/
public final <T> T parseSession(ParserSession session, ClassMeta<T> type) throws ParseException {
try {
@@ -229,6 +239,8 @@ public abstract class Parser extends CoreObject {
/**
* Parses input into the specified object type.
+ *
+ * <p>
* The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps).
*
* <h5 class='section'>Examples:</h5>
@@ -250,10 +262,13 @@ public abstract class Parser extends CoreObject {
* <jc>// Parse into a map containing string keys and values of lists containing beans.</jc>
* Map m = p.parse(json, TreeMap.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>);
* </p>
+ *
* <p>
* <code>Collection</code> classes are assumed to be followed by zero or one objects indicating the element type.
+ *
* <p>
* <code>Map</code> classes are assumed to be followed by zero or two meta objects indicating the key and value types.
+ *
* <p>
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
*
@@ -263,38 +278,39 @@ public abstract class Parser extends CoreObject {
* </ul>
*
* @param <T> The class type of the object to create.
- * @param input The input.
- * <br>
- * Character-based parsers can handle the following input class types:
- * <ul>
- * <li><jk>null</jk>
- * <li>{@link Reader}
- * <li>{@link CharSequence}
- * <li>{@link InputStream} containing UTF-8 encoded text (or charset defined by
- * {@link ParserContext#PARSER_inputStreamCharset} property value).
- * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or charset defined by
- * {@link ParserContext#PARSER_inputStreamCharset} property value).
- * <li>{@link File} containing system encoded text (or charset defined by
- * {@link ParserContext#PARSER_fileCharset} property value).
- * </ul>
- * <br>
- * Stream-based parsers can handle the following input class types:
- * <ul>
- * <li><jk>null</jk>
- * <li>{@link InputStream}
- * <li><code><jk>byte</jk>[]</code>
- * <li>{@link File}
- * </ul>
- * @param type The object type to create.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * @param args The type arguments of the class if it's a collection or map.
- * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
- * {@link GenericArrayType}
- * <br>Ignored if the main type is not a map or collection.
+ * @param input
+ * The input.
+ * <br>Character-based parsers can handle the following input class types:
+ * <ul>
+ * <li><jk>null</jk>
+ * <li>{@link Reader}
+ * <li>{@link CharSequence}
+ * <li>{@link InputStream} containing UTF-8 encoded text (or charset defined by
+ * {@link ParserContext#PARSER_inputStreamCharset} property value).
+ * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or charset defined by
+ * {@link ParserContext#PARSER_inputStreamCharset} property value).
+ * <li>{@link File} containing system encoded text (or charset defined by
+ * {@link ParserContext#PARSER_fileCharset} property value).
+ * </ul>
+ * <br>Stream-based parsers can handle the following input class types:
+ * <ul>
+ * <li><jk>null</jk>
+ * <li>{@link InputStream}
+ * <li><code><jk>byte</jk>[]</code>
+ * <li>{@link File}
+ * </ul>
+ * @param type
+ * The object type to create.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * @param args
+ * The type arguments of the class if it's a collection or map.
+ * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType},
+ * {@link GenericArrayType}
+ * <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
* @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
@SuppressWarnings("unchecked")
@@ -305,6 +321,7 @@ public abstract class Parser extends CoreObject {
/**
* Same as {@link #parse(Object, Type, Type...)} except optimized for a non-parameterized class.
+ *
* <p>
* This is the preferred parse method for simple types since you don't need to cast the results.
*
@@ -329,12 +346,13 @@ public abstract class Parser extends CoreObject {
* </p>
*
* @param <T> The class type of the object being created.
- * @param input The input.
- * See {@link #parse(Object, Type, Type...)} for details.
+ * @param input
+ * The input.
+ * See {@link #parse(Object, Type, Type...)} for details.
* @param type The object type to create.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
*/
public final <T> T parse(Object input, Class<T> type) throws ParseException {
ParserSession session = createSession(input);
@@ -344,16 +362,18 @@ public abstract class Parser extends CoreObject {
/**
* Same as {@link #parse(Object, Type, Type...)} except the type has already been converted into a {@link ClassMeta}
* object.
+ *
* <p>
* This is mostly an internal method used by the framework.
*
* @param <T> The class type of the object being created.
- * @param input The input.
- * See {@link #parse(Object, Type, Type...)} for details.
+ * @param input
+ * The input.
+ * See {@link #parse(Object, Type, Type...)} for details.
* @param type The object type to create.
* @return The parsed object.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
*/
public final <T> T parse(Object input, ClassMeta<T> type) throws ParseException {
return parseSession(createSession(input), type);
@@ -361,20 +381,26 @@ public abstract class Parser extends CoreObject {
/**
* Create the session object that will be passed in to the parse method.
+ *
* <p>
* It's up to implementers to decide what the session object looks like, although typically it's going to be a
* subclass of {@link ParserSession}.
*
- * @param input The input. See {@link #parse(Object, ClassMeta)} for supported input types.
+ * @param input
+ * The input.
+ * See {@link #parse(Object, ClassMeta)} for supported input types.
* @param op Optional additional properties.
- * @param javaMethod Java method that invoked this parser.
- * When using the REST API, this is the Java method invoked by the REST call.
- * Can be used to access annotations defined on the method or class.
+ * @param javaMethod
+ * Java method that invoked this parser.
+ * When using the REST API, this is the Java method invoked by the REST call.
+ * Can be used to access annotations defined on the method or class.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
* @return The new session.
*/
@@ -385,6 +411,7 @@ public abstract class Parser extends CoreObject {
/**
* Create a basic session object without overriding properties or specifying <code>javaMethod</code>.
+ *
* <p>
* Equivalent to calling <code>createSession(<jk>null</jk>, <jk>null</jk>)</code>.
*
@@ -402,8 +429,10 @@ public abstract class Parser extends CoreObject {
/**
* Parses the contents of the specified reader and loads the results into the specified map.
+ *
* <p>
* Reader must contain something that serializes to a map (such as text containing a JSON object).
+ *
* <p>
* Used in the following locations:
* <ul class='spaced-list'>
@@ -437,11 +466,14 @@ public abstract class Parser extends CoreObject {
/**
* Implementation method.
+ *
+ * <p>
* Default implementation throws an {@link UnsupportedOperationException}.
*
- * @param session The runtime session object returned by
- * {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}.
- * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
+ * @param session
+ * The runtime session object returned by
+ * {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}.
+ * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
* @param m The map being loaded.
* @param keyType The class type of the keys, or <jk>null</jk> to default to <code>String.<jk>class</jk></code>.
* @param valueType The class type of the values, or <jk>null</jk> to default to whatever is being parsed.
@@ -454,6 +486,7 @@ public abstract class Parser extends CoreObject {
/**
* Parses the contents of the specified reader and loads the results into the specified collection.
+ *
* <p>
* Used in the following locations:
* <ul class='spaced-list'>
@@ -467,8 +500,8 @@ public abstract class Parser extends CoreObject {
* @param c The collection being loaded.
* @param elementType The class type of the elements, or <jk>null</jk> to default to whatever is being parsed.
* @return The same collection that was passed in to allow this method to be chained.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
* @throws UnsupportedOperationException If not implemented.
*/
public final <E> Collection<E> parseIntoCollection(Object input, Collection<E> c, Type elementType)
@@ -487,11 +520,14 @@ public abstract class Parser extends CoreObject {
/**
* Implementation method.
+ *
+ * <p>
* Default implementation throws an {@link UnsupportedOperationException}.
*
- * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object,
- * Locale, TimeZone, MediaType)}.
- * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
+ * @param session
+ * The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object,
+ * Locale, TimeZone, MediaType)}.
+ * If <jk>null</jk>, one will be created using {@link #createSession(Object)}.
* @param c The collection being loaded.
* @param elementType The class type of the elements, or <jk>null</jk> to default to whatever is being parsed.
* @return The same collection that was passed in to allow this method to be chained.
@@ -504,9 +540,11 @@ public abstract class Parser extends CoreObject {
/**
* Parses the specified array input with each entry in the object defined by the {@code argTypes}
* argument.
+ *
* <p>
* Used for converting arrays (e.g. <js>"[arg1,arg2,...]"</js>) into an {@code Object[]} that can be passed
* to the {@code Method.invoke(target, args)} method.
+ *
* <p>
* Used in the following locations:
* <ul class='spaced-list'>
@@ -517,8 +555,8 @@ public abstract class Parser extends CoreObject {
* @param input The input. Subclasses can support different input types.
* @param argTypes Specifies the type of objects to create for each entry in the array.
* @return An array of parsed objects.
- * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified
- * type.
+ * @throws ParseException
+ * If the input contains a syntax error or is malformed, or is not valid for the specified type.
*/
public final Object[] parseArgs(Object input, Type[] argTypes) throws ParseException {
if (argTypes == null || argTypes.length == 0)
@@ -544,8 +582,9 @@ public abstract class Parser extends CoreObject {
* Converts the specified string to the specified type.
*
* @param session The session object.
- * @param outer The outer object if we're converting to an inner object that needs to be created within the context
- * of an outer object.
+ * @param outer
+ * The outer object if we're converting to an inner object that needs to be created within the context
+ * of an outer object.
* @param s The string to convert.
* @param type The class type to convert the string to.
* @return The string converted as an object of the specified type.
@@ -618,6 +657,7 @@ public abstract class Parser extends CoreObject {
/**
* Returns the media types handled based on the value of the {@link Consumes} annotation on the parser class.
+ *
* <p>
* This method can be overridden by subclasses to determine the media types programmatically.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java
index 0f61126..d0369c6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java
@@ -53,13 +53,14 @@ public class ParserBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Trim parsed strings.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.trimStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
@@ -79,18 +80,20 @@ public class ParserBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Strict mode.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.strict"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, strict mode for the parser is enabled.
+ *
* <p>
* Strict mode can mean different things for different parsers.
- * <p>
+ *
* <table class='styled'>
* <tr><th>Parser class</th><th>Strict behavior</th></tr>
* <tr>
@@ -140,15 +143,17 @@ public class ParserBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Input stream charset.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.inputStreamCharset"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"UTF-8"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The character set to use for converting <code>InputStreams</code> and byte arrays to readers.
+ *
* <p>
* Used when passing in input streams and byte arrays to {@link Parser#parse(Object, Class)}.
*
@@ -167,17 +172,20 @@ public class ParserBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> File charset.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.fileCharset"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"default"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The character set to use for reading <code>Files</code> from the file system.
+ *
* <p>
* Used when passing in files to {@link Parser#parse(Object, Class)}.
+ *
* <p>
* <js>"default"</js> can be used to indicate the JVM default file system charset.
*
@@ -196,13 +204,14 @@ public class ParserBuilder extends CoreObjectBuilder {
/**
* <b>Configuration property:</b> Parser listener.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.listener"</js>
* <li><b>Data type:</b> <code>Class<? extends ParserListener></code>
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Class used to listen for errors and warnings that occur during parsing.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
index 47d2384..e8fd4b7 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
@@ -22,13 +22,14 @@ public class ParserContext extends BeanContext {
/**
* <b>Configuration property:</b> Trim parsed strings.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.trimStrings"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to
* the POJO.
@@ -37,7 +38,7 @@ public class ParserContext extends BeanContext {
/**
* <b>Configuration property:</b> Strict mode.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.strict"</js>
* <li><b>Data type:</b> <code>Boolean</code>
@@ -46,10 +47,10 @@ public class ParserContext extends BeanContext {
* </ul>
* <p>
* If <jk>true</jk>, strict mode for the parser is enabled.
+ *
* <p>
* Strict mode can mean different things for different parsers.
- * However, all reader-based parsers will
- * <p>
+ *
* <table class='styled'>
* <tr><th>Parser class</th><th>Strict behavior</th></tr>
* <tr>
@@ -79,15 +80,17 @@ public class ParserContext extends BeanContext {
/**
* <b>Configuration property:</b> Input stream charset.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.inputStreamCharset"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"UTF-8"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The character set to use for converting <code>InputStreams</code> and byte arrays to readers.
+ *
* <p>
* Used when passing in input streams and byte arrays to {@link Parser#parse(Object, Class)}.
*/
@@ -95,17 +98,20 @@ public class ParserContext extends BeanContext {
/**
* <b>Configuration property:</b> File charset.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.fileCharset"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"default"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The character set to use for reading <code>Files</code> from the file system.
+ *
* <p>
* Used when passing in files to {@link Parser#parse(Object, Class)}.
+ *
* <p>
* <js>"default"</js> can be used to indicate the JVM default file system charset.
*/
@@ -113,13 +119,14 @@ public class ParserContext extends BeanContext {
/**
* <b>Configuration property:</b> Parser listener.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"Parser.listener"</js>
* <li><b>Data type:</b> <code>Class<? extends ParserListener></code>
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Class used to listen for errors and warnings that occur during parsing.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
index f429b6f..1a1a258 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
@@ -22,7 +22,7 @@ import org.apache.juneau.http.*;
* Represents a group of {@link Parser Parsers} that can be looked up by media type.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Provides the following features:
* <ul class='spaced-list'>
* <li>
@@ -36,11 +36,13 @@ import org.apache.juneau.http.*;
* </ul>
*
* <h6 class='topic'>Match ordering</h6>
- * <p>
+ *
* Parsers are matched against <code>Content-Type</code> strings in the order they exist in this group.
+ *
* <p>
* Adding new entries will cause the entries to be prepended to the group.
* This allows for previous parsers to be overridden through subsequent calls.
+ *
* <p>
* For example, calling <code>g.append(P1.<jk>class</jk>,P2.<jk>class</jk>).append(P3.<jk>class</jk>,P4.<jk>class</jk>)</code>
* will result in the order <code>P3, P4, P1, P2</code>.
@@ -81,11 +83,13 @@ public final class ParserGroup {
/**
* Constructor.
*
- * @param propertyStore The modifiable properties that were used to initialize the parsers.
- * A snapshot of these will be made so that we can clone and modify this group.
- * @param parsers The parsers defined in this group.
- * The order is important because they will be tried in reverse order (e.g. newer first) in which they will be tried
- * to match against media types.
+ * @param propertyStore
+ * The modifiable properties that were used to initialize the parsers.
+ * A snapshot of these will be made so that we can clone and modify this group.
+ * @param parsers
+ * The parsers defined in this group.
+ * The order is important because they will be tried in reverse order (e.g. newer first) in which they will be
+ * tried to match against media types.
*/
public ParserGroup(PropertyStore propertyStore, Parser[] parsers) {
this.propertyStore = PropertyStore.create(propertyStore);
@@ -161,6 +165,7 @@ public final class ParserGroup {
/**
* Returns the media types that all parsers in this group can handle
+ *
* <p>
* Entries are ordered in the same order as the parsers in the group.
*
@@ -172,6 +177,8 @@ public final class ParserGroup {
/**
* Returns a copy of the property store that was used to create the parsers in this group.
+ *
+ * <p>
* This method returns a new factory each time so is somewhat expensive.
*
* @return A new copy of the property store passed in to the constructor.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java
index 27335a6..8bed46a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java
@@ -40,6 +40,7 @@ public class ParserGroupBuilder {
/**
* Create an empty parser group using the specified property store for settings.
+ *
* <p>
* Note: Modifying the specified property store externally will also modify it here.
*
@@ -96,6 +97,7 @@ public class ParserGroupBuilder {
/**
* Creates a new {@link ParserGroup} object using a snapshot of the settings defined in this builder.
+ *
* <p>
* This method can be called multiple times to produce multiple parser groups.
*
@@ -870,9 +872,11 @@ public class ParserGroupBuilder {
/**
* Specifies the classloader to use when resolving classes from strings for all parsers in this group.
+ *
* <p>
- * Can be used for resolving class names when the classes being created are in a different
- * classloader from the Juneau code.
+ * Can be used for resolving class names when the classes being created are in a different classloader from the
+ * Juneau code.
+ *
* <p>
* If <jk>null</jk>, the system classloader will be used to resolve classes.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java
index a870043..75d39bb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java
@@ -23,21 +23,23 @@ public class ParserListener {
/**
* Gets called when an unknown bean property is detected in a document.
+ *
* <p>
* This method only gets called if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting is <jk>true</jk>.
* Otherwise, the parser will throw a {@link ParseException}.
*
* @param <T> The class type of the bean.
- * @param session The parser session.
- * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through
- * {@link ParserSession#getInputAsString()}.
+ * @param session
+ * The parser session.
+ * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through
+ * {@link ParserSession#getInputAsString()}.
* @param propertyName The property name encountered in the document.
* @param beanClass The bean class.
* @param bean The bean.
- * @param line The line number where the unknown property was found (-1 if parser doesn't support line/column
- * indicators).
- * @param col The column number where the unknown property was found (-1 if parser doesn't support line/column
- * indicators).
+ * @param line
+ * The line number where the unknown property was found (-1 if parser doesn't support line/column indicators).
+ * @param col
+ * The column number where the unknown property was found (-1 if parser doesn't support line/column indicators).
*/
public <T> void onUnknownBeanProperty(ParserSession session, String propertyName, Class<T> beanClass, T bean, int line, int col) {
onError(session, null,
@@ -50,8 +52,8 @@ public class ParserListener {
* Called when an error occurs during parsing but is ignored.
*
* @param session The parsers session.
- * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through
- * {@link ParserSession#getInputAsString()}.
+ * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through
+ * {@link ParserSession#getInputAsString()}.
* @param t The throwable that was thrown by the getter method.
* @param msg The error message.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java
index c15e65f..daa1593 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java
@@ -18,11 +18,14 @@ import org.apache.juneau.internal.*;
/**
* Similar to a {@link java.io.PushbackReader} with a pushback buffer of 1 character.
+ *
* <p>
* Code is optimized to work with a 1 character buffer.
+ *
* <p>
- * Additionally keeps track of current line and column number, and provides the ability to set
- * mark points and capture characters from the previous mark point.
+ * Additionally keeps track of current line and column number, and provides the ability to set mark points and capture
+ * characters from the previous mark point.
+ *
* <p>
* <b>Warning:</b> Not thread safe.
*/
@@ -87,6 +90,8 @@ public class ParserReader extends Reader {
/**
* Reads a single character.
+ *
+ * <p>
* Note that this method does NOT process extended unicode characters (i.e. characters above 0x10000), but rather
* returns them as two <jk>char</jk>s.
* Use {@link #readCodePoint()} to ensure proper handling of extended unicode.
@@ -207,16 +212,15 @@ public class ParserReader extends Reader {
}
/**
- * Start buffering the calls to read() so that the text can be gathered from the mark
- * point on calling {@code getFromMarked()}.
+ * Start buffering the calls to read() so that the text can be gathered from the mark point on calling {@code getFromMarked()}.
*/
public final void mark() {
iMark = iCurrent;
}
-
/**
* Peeks the next character in the stream.
+ *
* <p>
* This is equivalent to doing a {@code read()} followed by an {@code unread()}.
*
@@ -232,6 +236,7 @@ public class ParserReader extends Reader {
/**
* Same as {@link #peek()} but skips over any whitespace characters.
+ *
* <p>
* This is equivalent to doing a {@code read()} followed by an {@code unread()}.
*
@@ -292,8 +297,7 @@ public class ParserReader extends Reader {
}
/**
- * Returns the contents of the reusable character buffer as a string, and
- * resets the buffer for next usage.
+ * Returns the contents of the reusable character buffer as a string, and resets the buffer for next usage.
*
* @return The contents of the reusable character buffer as a string.
*/
@@ -302,11 +306,10 @@ public class ParserReader extends Reader {
}
/**
- * Same as {@link #getMarked()} except allows you to specify offsets
- * into the buffer.
+ * Same as {@link #getMarked()} except allows you to specify offsets into the buffer.
+ *
* <p>
- * For example, to return the marked string, but trim the first and last characters,
- * call the following:
+ * For example, to return the marked string, but trim the first and last characters, call the following:
* <p class='bcode'>
* getFromMarked(1, -1);
* </p>
@@ -337,6 +340,8 @@ public class ParserReader extends Reader {
/**
* Trims off the last character in the marking buffer.
+ *
+ * <p>
* Useful for removing escape characters from sequences.
*
* @return This object (for method chaining).
@@ -361,6 +366,8 @@ public class ParserReader extends Reader {
/**
* Replaces the last character in the marking buffer with the specified character.
+ *
+ * <p>
* <code>offset</code> must be at least <code>1</code> for normal characters, and <code>2</code> for extended
* unicode characters in order for the replacement to fit into the buffer.
*
@@ -402,6 +409,8 @@ public class ParserReader extends Reader {
/**
* Subclasses can override this method to provide additional filtering.
+ *
+ * <p>
* Default implementation simply calls the same method on the underlying reader.
*/
@Override /* Reader */
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java
index 40d6114..9265799 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java
@@ -27,6 +27,7 @@ import org.apache.juneau.http.*;
/**
* Session object that lives for the duration of a single use of {@link Parser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -48,37 +49,41 @@ public class ParserSession extends BeanSession {
/**
* Create a new session using properties specified in the context.
*
- * @param ctx The context creating this session object.
- * The context contains all the configuration settings for this object.
- * @param input The input.
- * <br>For character-based parsers, this 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 (or whatever the encoding specified by
- * {@link ParserContext#PARSER_inputStreamCharset}).
- * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by
- * {@link ParserContext#PARSER_inputStreamCharset}).
- * <li>{@link File} containing system encoded text (or whatever the encoding specified by
- * {@link ParserContext#PARSER_fileCharset}).
- * </ul>
- * <br>For byte-based parsers, this can be any of the following types:
- * <ul>
- * <li><jk>null</jk>
- * <li>{@link InputStream}
- * <li><code><jk>byte</jk>[]</code>
- * <li>{@link File}
- * </ul>
- *
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @param ctx
+ * The context creating this session object.
+ * The context contains all the configuration settings for this object.
+ * @param input
+ * The input.
+ * <br>For character-based parsers, this 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 (or whatever the encoding specified by
+ * {@link ParserContext#PARSER_inputStreamCharset}).
+ * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by
+ * {@link ParserContext#PARSER_inputStreamCharset}).
+ * <li>{@link File} containing system encoded text (or whatever the encoding specified by
+ * {@link ParserContext#PARSER_fileCharset}).
+ * </ul>
+ * <br>For byte-based parsers, this can be any of the following types:
+ * <ul>
+ * <li><jk>null</jk>
+ * <li>{@link InputStream}
+ * <li><code><jk>byte</jk>[]</code>
+ * <li>{@link File}
+ * </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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public ParserSession(ParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale,
@@ -106,6 +111,8 @@ public class ParserSession extends BeanSession {
/**
* Wraps the specified input object inside an input stream.
+ *
+ * <p>
* Subclasses can override this method to implement their own input streams.
*
* @return The input object wrapped in an input stream, or <jk>null</jk> if the object is null.
@@ -150,6 +157,8 @@ public class ParserSession extends BeanSession {
/**
* Wraps the specified input object inside a reader.
+ *
+ * <p>
* Subclasses can override this method to implement their own readers.
*
* @return The input object wrapped in a Reader, or <jk>null</jk> if the object is null.
@@ -248,6 +257,7 @@ public class ParserSession extends BeanSession {
/**
* Returns the Java method that invoked this parser.
+ *
* <p>
* When using the REST API, this is the Java method invoked by the REST call.
* Can be used to access annotations defined on the method or class.
@@ -260,6 +270,8 @@ public class ParserSession extends BeanSession {
/**
* Returns the outer object used for instantiating top-level non-static member classes.
+ *
+ * <p>
* When using the REST API, this is the servlet object.
*
* @return The outer object.
@@ -336,8 +348,8 @@ public class ParserSession extends BeanSession {
* @param m The map to convert to a bean.
* @param pMeta The current bean property being parsed.
* @param eType The current expected type being parsed.
- * @return The converted bean, or the same map if the <js>"_type"</js> entry wasn't found or didn't resolve to a
- * bean.
+ * @return
+ * The converted bean, or the same map if the <js>"_type"</js> entry wasn't found or didn't resolve to a bean.
*/
public final Object cast(ObjectMap m, BeanPropertyMeta pMeta, ClassMeta<?> eType) {
@@ -407,8 +419,9 @@ public class ParserSession extends BeanSession {
* @param beanMap The bean that doesn't have the expected property.
* @param line The line number where the property was found. <code>-1</code> if line numbers are not available.
* @param col The column number where the property was found. <code>-1</code> if column numbers are not available.
- * @throws ParseException Automatically thrown if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting
- * on this parser is <jk>false</jk>
+ * @throws ParseException
+ * Automatically thrown if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting on this parser is
+ * <jk>false</jk>
* @param <T> The class type of the bean map that doesn't have the expected property.
*/
public <T> void onUnknownProperty(String propertyName, BeanMap<T> beanMap, int line, int col) throws ParseException {
@@ -425,6 +438,7 @@ public class ParserSession extends BeanSession {
/**
* Returns the input to this parser as a plain string.
+ *
* <p>
* This method only returns a value if {@link BeanContext#BEAN_debug} is enabled.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/PartParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/PartParser.java b/juneau-core/src/main/java/org/apache/juneau/parser/PartParser.java
index d50d62c..76844a4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/PartParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/PartParser.java
@@ -16,13 +16,14 @@ import org.apache.juneau.*;
import org.apache.juneau.urlencoding.*;
/**
- * Interface used to convert HTTP headers, query parameters, form-data parameters, and URI
- * path variables to POJOs
+ * Interface used to convert HTTP headers, query parameters, form-data parameters, and URI path variables to POJOs
+ *
* <p>
- * By default, the {@link UrlEncodingParser} class implements this interface so that it can be used to parse
- * these HTTP parts.
+ * By default, the {@link UrlEncodingParser} class implements this interface so that it can be used to parse these HTTP
+ * parts.
* However, the interface is provided to allow custom parsing of these objects by providing your own implementation
* class.
+ *
* <p>
* Implementations must include a no-arg constructor.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java b/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java
index 39aa2b3..9d9c710 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java
@@ -19,7 +19,7 @@ import org.apache.juneau.annotation.*;
* Subclass of {@link Parser} for characters-based parsers.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* This class is typically the parent class of all character-based parsers.
* It has 1 abstract method to implement...
* <ul>
@@ -27,8 +27,9 @@ import org.apache.juneau.annotation.*;
* </ul>
*
* <h6 class='topic'>@Consumes annotation</h6>
- * <p>
+ *
* The media types that this parser can handle is specified through the {@link Consumes @Consumes} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()} method.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
index c0cc95c..c25c2a0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
@@ -20,25 +20,27 @@ import org.apache.juneau.parser.*;
import org.apache.juneau.transform.*;
/**
- * Parsers HTTP plain text request bodies into <a class="doclink"
- * href="../../../../overview-summary.html#Core.PojoCategories">Group 5</a> POJOs.
+ * Parsers HTTP plain text request bodies into <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">Group 5</a>
+ * POJOs.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/plain</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/plain</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Essentially just converts plain text to POJOs via static <code>fromString()</code> or <code>valueOf()</code>, or
* through constructors that take a single string argument.
+ *
* <p>
* Also parses objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>} transform
* defined on it.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link ParserContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
index 4f9dd12..2dd95b6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
@@ -21,20 +21,22 @@ import org.apache.juneau.transform.*;
* Serializes POJOs to plain text using just the <code>toString()</code> method on the serialized object.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/plain</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/plain</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Essentially converts POJOs to plain text using the <code>toString()</code> method.
+ *
* <p>
* Also serializes objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>}
* transform defined on it.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link SerializerContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java
index 5dd7b25..1fd6673 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java
@@ -21,8 +21,7 @@ import java.lang.annotation.*;
import org.apache.juneau.serializer.*;
/**
- * Annotation applied to Java method arguments of interface proxies to denote that they are the HTTP body of the
- * request.
+ * Annotation applied to Java method arguments of interface proxies to denote that they are the HTTP body of the request.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -33,6 +32,7 @@ import org.apache.juneau.serializer.*;
* String myProxyMethod(<ja>@Body</ja> MyPojo pojo);
* }
* </p>
+ *
* <p>
* The argument can be any of the following types:
* <ul class='spaced-list'>
@@ -48,6 +48,7 @@ import org.apache.juneau.serializer.*;
* <li>
* <code>NameValuePairs</code> - Converted to a URL-encoded FORM post.
* </ul>
+ *
* <p>
* The annotation can also be applied to a bean property field or getter when the argument is annotated with
* {@link RequestBean @RequestBean}:
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java
index 7f7f6e3..4a5fbb4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java
@@ -62,6 +62,7 @@ import org.apache.juneau.urlencoding.*;
*
* }
* </p>
+ *
* <p>
* The annotation can also be applied to a bean property field or getter when the argument is annotated with
* {@link RequestBean @RequestBean}:
@@ -113,12 +114,11 @@ import org.apache.juneau.urlencoding.*;
* Reader getReader();
* }
* </p>
+ *
* <p>
* The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name.
* Only one should be used.
- * <br>
- * The following annotations are fully equivalent:
- * <p>
+ * <br>The following annotations are fully equivalent:
* <p class='bcode'>
* <ja>@FormData</ja>(name=<js>"foo"</js>)
*
@@ -141,11 +141,14 @@ public @interface FormData {
/**
* The form post parameter name.
+ *
* <p>
* Note that {@link #name()} and {@link #value()} are synonyms.
+ *
* <p>
* The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the
* form data parameter name.
+ *
* <p>
* A blank value (the default) has the following behavior:
* <ul class='spaced-list'>
@@ -192,6 +195,7 @@ public @interface FormData {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -199,6 +203,7 @@ public @interface FormData {
/**
* Skips this value if it's an empty string or empty collection/array.
+ *
* <p>
* Note that <jk>null</jk> values are already ignored.
*/
@@ -206,9 +211,11 @@ public @interface FormData {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java
index 36849d2..91a1171 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java
@@ -53,9 +53,11 @@ public @interface FormDataIfNE {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java
index e7c4f18..751cc0f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java
@@ -51,6 +51,7 @@ import org.apache.juneau.urlencoding.*;
* String myProxyMethod4(<ja>@Header</ja> MyBean myBean);
* }
* </p>
+ *
* <p>
* The annotation can also be applied to a bean property field or getter when the argument is annotated with
* {@link RequestBean @RequestBean}:
@@ -97,11 +98,11 @@ import org.apache.juneau.urlencoding.*;
* MyBean getBean();
* }
* </p>
+ *
* <p>
* The {@link #name()} and {@link #value()} elements are synonyms for specifying the header name.
* Only one should be used.
* <br>The following annotations are fully equivalent:
- * <p>
* <p class='bcode'>
* <ja>@Header</ja>(name=<js>"Foo"</js>)
*
@@ -124,11 +125,14 @@ public @interface Header {
/**
* The HTTP header name.
+ *
* <p>
* A blank value (the default) indicates to reuse the bean property name when used on a request bean property.
+ *
* <p>
* The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the
* header name.
+ *
* <p>
* A blank value (the default) has the following behavior:
* <ul class='spaced-list'>
@@ -176,6 +180,7 @@ public @interface Header {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -183,6 +188,7 @@ public @interface Header {
/**
* Skips this value if it's an empty string or empty collection/array.
+ *
* <p>
* Note that <jk>null</jk> values are already ignored.
*/
@@ -190,9 +196,11 @@ public @interface Header {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java
index b039ff0..7e34ba3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java
@@ -53,9 +53,11 @@ public @interface HeaderIfNE {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java
index bb8c08c..cc86b04 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java
@@ -49,6 +49,7 @@ import org.apache.juneau.urlencoding.*;
* String myProxyMethod4(<ja>@Path</ja> MyBean myBean);
* }
* </p>
+ *
* <p>
* The annotation can also be applied to a bean property field or getter when the argument is annotated with
* {@link RequestBean @RequestBean}:
@@ -95,11 +96,11 @@ import org.apache.juneau.urlencoding.*;
* MyBean getMyBean();
* }
* </p>
+ *
* <p>
* The {@link #name()} and {@link #value()} elements are synonyms for specifying the path variable name.
* Only one should be used.
* <br>The following annotations are fully equivalent:
- * <p>
* <p class='bcode'>
* <ja>@Path</ja>(name=<js>"foo"</js>)
*
@@ -122,11 +123,14 @@ public @interface Path {
/**
* The path parameter name.
+ *
* <p>
* Note that {@link #name()} and {@link #value()} are synonyms.
+ *
* <p>
* The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the
* path variable name.
+ *
* <p>
* A blank value (the default) has the following behavior:
* <ul class='spaced-list'>
@@ -171,6 +175,7 @@ public @interface Path {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -178,9 +183,11 @@ public @interface Path {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java
index a43f4e5..88b7db5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java
@@ -61,6 +61,7 @@ import org.apache.juneau.urlencoding.*;
* String myProxyMethod6(<ja>@Query</ja> Reader reader);
* }
* </p>
+ *
* <p>
* The annotation can also be applied to a bean property field or getter when the argument is annotated with
* {@link RequestBean @RequestBean}:
@@ -112,6 +113,7 @@ import org.apache.juneau.urlencoding.*;
* Reader getReader();
* }
* </p>
+ *
* <p>
* The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name.
* Only one should be used.
@@ -138,11 +140,14 @@ public @interface Query {
/**
* The query parameter name.
+ *
* <p>
* Note that {@link #name()} and {@link #value()} are synonyms.
+ *
* <p>
* The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the
* query parameter name.
+ *
* <p>
* A blank value (the default) has the following behavior:
* <ul class='spaced-list'>
@@ -189,6 +194,7 @@ public @interface Query {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -196,6 +202,7 @@ public @interface Query {
/**
* Skips this value if it's an empty string or empty collection/array.
+ *
* <p>
* Note that <jk>null</jk> values are already ignored.
*/
@@ -203,9 +210,11 @@ public @interface Query {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java
index be70654..14dcf06 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java
@@ -53,9 +53,11 @@ public @interface QueryIfNE {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation,
* then on the client which by default is {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java
index fd9f8e2..906f992 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java
@@ -20,6 +20,7 @@ import java.lang.annotation.*;
/**
* Annotation applied to Java methods on interface proxy classes.
+ *
* <p>
* The return type on the Java method can be any of the following:
* <ul>
@@ -49,6 +50,7 @@ public @interface RemoteMethod {
/**
* The path to the REST service for this Java method relative to the parent proxy interface URL.
+ *
* <p>
* The default value is the Java method name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface/myMethod"</js>)
* if {@link Remoteable#methodPaths() @Remoteable.methodPaths()} is <js>"NAME"</js>, or the Java method signature
@@ -59,12 +61,14 @@ public @interface RemoteMethod {
/**
* Defines the HTTP method to use for REST calls.
+ *
* <p>
* Possible values:
* <ul>
* <li><js>"POST"</js> (default) - Parameters are serialized using the serializer registered with the RestClient.
* <li><js>"GET"</js> - Parameters are serialized using the UrlEncodingSerializer registered with the RestClient.
* </ul>
+ *
* <p>
* The default value is <js>"POST"</js>.
*/
@@ -72,6 +76,7 @@ public @interface RemoteMethod {
/**
* The value the remoteable method returns.
+ *
* <p>
* Possible values:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java
index 394c6ba..ee8447f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java
@@ -49,9 +49,9 @@ public class RemoteMethodArg {
* @param name2 The argument name pulled from value().
* @param index The zero-based index of the argument on the Java method.
* @param skipIfNE The value is skipped if it's null/empty.
- * @param serializer The class to use for serializing headers, query parameters, form-data parameters, and
- * path variables.
- * If {@link UrlEncodingSerializer}, then the url-encoding serializer defined on the client will be used.
+ * @param serializer
+ * The class to use for serializing headers, query parameters, form-data parameters, and path variables.
+ * If {@link UrlEncodingSerializer}, then the url-encoding serializer defined on the client will be used.
*/
protected RemoteMethodArg(String name, String name2, int index, boolean skipIfNE, Class<? extends PartSerializer> serializer) {
this.name = name.isEmpty() ? name2 : name;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java
index 73e8b8c..4cb1964 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java
@@ -36,9 +36,11 @@ public @interface Remoteable {
/**
* The absolute or relative path of the REST service.
+ *
* <p>
* When a relative path is specified, it's relative to the root-url defined on the <code>RestClient</code> used
* to instantiate the interface.
+ *
* <p>
* When no path is specified, the path is assumed to be the class name (e.g.
* <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
@@ -47,6 +49,7 @@ public @interface Remoteable {
/**
* Identifies which methods on the interface should be exposed through the proxy.
+ *
* <p>
* The options are:
* <ul>
@@ -61,6 +64,7 @@ public @interface Remoteable {
/**
* Defines the methodology to use for the path names of the methods when not explicitly defined via
* {@link RemoteMethod#path() @RemoteMethod.path()}.
+ *
* <p>
* The options are:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java
index 5931ff8..82a17d8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java
@@ -21,9 +21,10 @@ import java.util.*;
/**
* Contains the meta-data about a remoteable interface.
+ *
* <p>
- * Captures the information in {@link Remoteable @Remoteable} and {@link RemoteMethod @RemoteMethod}
- * annotations for caching and reuse.
+ * Captures the information in {@link Remoteable @Remoteable} and {@link RemoteMethod @RemoteMethod} annotations for
+ * caching and reuse.
*
* <h6 class='topic'>Additional Information</h6>
* <ul class='doctree'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java
index 0495438..3568dd5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java
@@ -21,6 +21,7 @@ import java.util.*;
/**
* Contains the meta-data about a Java method on a remoteable interface.
+ *
* <p>
* Captures the information in {@link RemoteMethod @RemoteMethod} annotations for caching and reuse.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/remoteable/RequestBean.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RequestBean.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RequestBean.java
index 605f8b1..c0d0b13 100644
--- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RequestBean.java
+++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RequestBean.java
@@ -97,9 +97,11 @@ public @interface RequestBean {
/**
* Specifies the {@link PartSerializer} class used for serializing values to strings.
+ *
* <p>
* The default value defaults to the using the part serializer defined on the client which by default is
* {@link UrlEncodingSerializer}.
+ *
* <p>
* This annotation is provided to allow values to be custom serialized.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java b/juneau-core/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
index c181a02..9b86b70 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
* Subclass of {@link Serializer} for byte-based serializers.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* This class is typically the parent class of all byte-based serializers.
* It has 1 abstract method to implement...
* <ul>
@@ -31,8 +31,9 @@ import org.apache.juneau.annotation.*;
* </ul>
*
* <h6 class='topic'>@Produces annotation</h6>
- * <p>
+ *
* The media types that this serializer can produce is specified through the {@link Produces @Produces} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()}
* and {@link #getResponseContentType()} methods.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/PartSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/PartSerializer.java b/juneau-core/src/main/java/org/apache/juneau/serializer/PartSerializer.java
index 9b5f21b..940d6b0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/PartSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/PartSerializer.java
@@ -19,6 +19,7 @@ import org.apache.juneau.urlencoding.*;
/**
* Interface used to convert POJOs to simple strings in HTTP headers, query parameters, form-data parameters, and URI
* path variables.
+ *
* <p>
* By default, the {@link UrlEncodingSerializer} class implements this interface so that it can be used to serialize
* these HTTP parts.
@@ -35,6 +36,7 @@ import org.apache.juneau.urlencoding.*;
* <li>{@link RequestBean#serializer()}
* <li><code>RestClientBuilder.partSerializer(Class)</code>
* </ul>
+ *
* <p>
* Implementations must include a no-arg constructor.
*/
@@ -43,6 +45,7 @@ public interface PartSerializer {
/**
* Converts the specified value to a string that can be used as an HTTP header value, query parameter value,
* form-data parameter, or URI path variable.
+ *
* <p>
* Returned values should NOT be URL-encoded. This will happen automatically.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/serializer/Serializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/Serializer.java b/juneau-core/src/main/java/org/apache/juneau/serializer/Serializer.java
index 70bbd4f..ac46f35 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/Serializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/Serializer.java
@@ -28,14 +28,16 @@ import org.apache.juneau.soap.*;
* Parent class for all Juneau serializers.
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Base serializer class that serves as the parent class for all serializers.
+ *
* <p>
* Subclasses should extend directly from {@link OutputStreamSerializer} or {@link WriterSerializer}.
*
* <h6 class='topic'>@Produces annotation</h6>
- * <p>
+ *
* The media types that this serializer can produce is specified through the {@link Produces @Produces} annotation.
+ *
* <p>
* However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()}
* and {@link #getResponseContentType()} methods.
@@ -83,11 +85,14 @@ public abstract class Serializer extends CoreObject {
/**
* Serializes a POJO to the specified output stream or writer.
+ *
* <p>
* This method should NOT close the context object.
- * @param session The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale,
- * TimeZone, MediaType, UriContext)}.
- * If <jk>null</jk>, session is created using {@link #createSession(Object)}.
+ *
+ * @param session
+ * The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale, TimeZone,
+ * MediaType, UriContext)}.
+ * If <jk>null</jk>, session is created using {@link #createSession(Object)}.
* @param o The object to serialize.
* @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed.
*/
@@ -95,13 +100,13 @@ public abstract class Serializer extends CoreObject {
/**
* Shortcut method for serializing objects directly to either a <code>String</code> or <code><jk>byte</jk>[]</code>
- * depending on the serializer type.
- * <p>
+ * depending on the serializer type.
*
* @param o The object to serialize.
- * @return The serialized object.
- * <br>Character-based serializers will return a <code>String</code>
- * <br>Stream-based serializers will return a <code><jk>byte</jk>[]</code>
+ * @return
+ * The serialized object.
+ * <br>Character-based serializers will return a <code>String</code>
+ * <br>Stream-based serializers will return a <code><jk>byte</jk>[]</code>
* @throws SerializeException If a problem occurred trying to convert the output.
*/
public abstract Object serialize(Object o) throws SerializeException;
@@ -113,9 +118,10 @@ public abstract class Serializer extends CoreObject {
/**
* Serialize the specified object using the specified session.
*
- * @param session The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale,
- * TimeZone, MediaType, UriContext)}.
- * If <jk>null</jk>, session is created using {@link #createSession(Object)}.
+ * @param session
+ * The serializer session object return by {@link #createSession(Object, ObjectMap, Method, Locale, TimeZone,
+ * MediaType, UriContext)}.
+ * If <jk>null</jk>, session is created using {@link #createSession(Object)}.
* @param o The object to serialize.
* @throws SerializeException If a problem occurred trying to convert the output.
*/
@@ -136,22 +142,24 @@ public abstract class Serializer extends CoreObject {
/**
* Serializes a POJO to the specified output stream or writer.
+ *
* <p>
* Equivalent to calling <code>serializer.serialize(o, out, <jk>null</jk>);</code>
*
* @param o The object to serialize.
- * @param output The output object.
- * <br>Character-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link Writer}
- * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
- * <li>{@link File} - Output will be written as system-default encoded stream.
- * </ul>
- * <br>Stream-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link OutputStream}
- * <li>{@link File}
- * </ul>
+ * @param output
+ * The output object.
+ * <br>Character-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link Writer}
+ * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
+ * <li>{@link File} - Output will be written as system-default encoded stream.
+ * </ul>
+ * <br>Stream-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link OutputStream}
+ * <li>{@link File}
+ * </ul>
* @throws SerializeException If a problem occurred trying to convert the output.
*/
public final void serialize(Object o, Object output) throws SerializeException {
@@ -161,32 +169,38 @@ public abstract class Serializer extends CoreObject {
/**
* Create the session object that will be passed in to the serialize method.
+ *
* <p>
* It's up to implementers to decide what the session object looks like, although typically it's going to be a
* subclass of {@link SerializerSession}.
*
- * @param output The output object.
- * <br>Character-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link Writer}
- * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
- * <li>{@link File} - Output will be written as system-default encoded stream.
- * </ul>
- * <br>Stream-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link OutputStream}
- * <li>{@link File}
- * </ul>
+ * @param output
+ * The output object.
+ * <br>Character-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link Writer}
+ * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
+ * <li>{@link File} - Output will be written as system-default encoded stream.
+ * </ul>
+ * <br>Stream-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link OutputStream}
+ * <li>{@link File}
+ * </ul>
* @param op Optional additional properties.
- * @param javaMethod Java method that invoked this serializer.
- * When using the REST API, this is the Java method invoked by the REST call.
- * Can be used to access annotations defined on the method or class.
- * @param locale The session locale.
- * 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.
+ * @param javaMethod
+ * Java method that invoked this serializer.
+ * When using the REST API, this is the Java method invoked by the REST call.
+ * Can be used to access annotations defined on the method or class.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
- * @param uriContext The URI context.
+ * @param uriContext
+ * The URI context.
* Identifies the current request URI used for resolution of URIs to absolute or root-relative form.
* @return The new session.
*/
@@ -197,21 +211,23 @@ public abstract class Serializer extends CoreObject {
/**
* Create a basic session object without overriding properties or specifying <code>javaMethod</code>.
+ *
* <p>
* Equivalent to calling <code>createSession(<jk>null</jk>, <jk>null</jk>)</code>.
*
- * @param output The output object.
- * <br>Character-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link Writer}
- * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
- * <li>{@link File} - Output will be written as system-default encoded stream.
- * </ul>
- * <br>Stream-based serializers can handle the following output class types:
- * <ul>
- * <li>{@link OutputStream}
- * <li>{@link File}
- * </ul>
+ * @param output
+ * The output object.
+ * <br>Character-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link Writer}
+ * <li>{@link OutputStream} - Output will be written as UTF-8 encoded stream.
+ * <li>{@link File} - Output will be written as system-default encoded stream.
+ * </ul>
+ * <br>Stream-based serializers can handle the following output class types:
+ * <ul>
+ * <li>{@link OutputStream}
+ * <li>{@link File}
+ * </ul>
* @return The new session.
*/
protected SerializerSession createSession(Object output) {
@@ -220,8 +236,10 @@ public abstract class Serializer extends CoreObject {
/**
* Converts the contents of the specified object array to a list.
+ *
* <p>
* Works on both object and primitive arrays.
+ *
* <p>
* In the case of multi-dimensional arrays, the outgoing list will contain elements of type n-1 dimension.
* i.e. if {@code type} is <code><jk>int</jk>[][]</code> then {@code list} will have entries of type
@@ -245,6 +263,7 @@ public abstract class Serializer extends CoreObject {
/**
* Returns the media types handled based on the value of the {@link Produces} annotation on the serializer class.
+ *
* <p>
* This method can be overridden by subclasses to determine the media types programmatically.
*
@@ -265,17 +284,20 @@ public abstract class Serializer extends CoreObject {
/**
* Optional method that specifies HTTP request headers for this serializer.
+ *
* <p>
* For example, {@link SoapXmlSerializer} needs to set a <code>SOAPAction</code> header.
+ *
* <p>
* This method is typically meaningless if the serializer is being used stand-alone (i.e. outside of a REST server
* or client).
*
- * @param properties Optional run-time properties (the same that are passed to
- * {@link WriterSerializer#doSerialize(SerializerSession, Object)}.
- * Can be <jk>null</jk>.
- * @return The HTTP headers to set on HTTP requests.
- * Can be <jk>null</jk>.
+ * @param properties
+ * Optional run-time properties (the same that are passed to {@link WriterSerializer#doSerialize(SerializerSession, Object)}.
+ * Can be <jk>null</jk>.
+ * @return
+ * The HTTP headers to set on HTTP requests.
+ * Can be <jk>null</jk>.
*/
public ObjectMap getResponseHeaders(ObjectMap properties) {
return ObjectMap.EMPTY_MAP;
@@ -284,11 +306,13 @@ public abstract class Serializer extends CoreObject {
/**
* Optional method that returns the response <code>Content-Type</code> for this serializer if it is different from
* the matched media type.
+ *
* <p>
* This method is specified to override the content type for this serializer.
* For example, the {@link org.apache.juneau.json.JsonSerializer.Simple} class returns that it handles media type
* <js>"text/json+simple"</js>, but returns <js>"text/json"</js> as the actual content type.
* This allows clients to request specific 'flavors' of content using specialized <code>Accept</code> header values.
+ *
* <p>
* This method is typically meaningless if the serializer is being used stand-alone (i.e. outside of a REST server
* or client).
[05/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 d4c4f94..8183a52 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
@@ -24,6 +24,8 @@ import org.apache.juneau.parser.*;
/**
* Provides the ability to perform standard REST operations (GET, PUT, POST, DELETE) against nodes in a POJO model.
+ *
+ * <p>
* Nodes in the POJO model are addressed using URLs.
*
* <p>
@@ -139,6 +141,7 @@ public final class PojoRest {
/**
* Create a new instance of a REST interface over the specified object.
+ *
* <p>
* Uses {@link BeanContext#DEFAULT} for working with Java beans.
*
@@ -150,6 +153,7 @@ public final class PojoRest {
/**
* Create a new instance of a REST interface over the specified object.
+ *
* <p>
* The parser is used as the bean context.
*
@@ -197,8 +201,9 @@ public final class PojoRest {
/**
* Retrieves the element addressed by the URL.
*
- * @param url The URL of the element to retrieve.
- * If null or blank, returns the root.
+ * @param url
+ * The URL of the element to retrieve.
+ * If null or blank, returns the root.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The addressed element, or null if that element does not exist in the tree.
*/
@@ -209,14 +214,15 @@ public final class PojoRest {
/**
* Retrieves the element addressed by the URL as the specified object type.
+ *
* <p>
* Will convert object to the specified type per {@link BeanSession#convertToType(Object, ClassMeta)}.
*
* @param type The specified object type.
- * @param url The URL of the element to retrieve.
- * If null or blank, returns the root.
+ * @param url
+ * The URL of the element to retrieve.
+ * If null or blank, returns the root.
* @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) {
@@ -225,12 +231,14 @@ public final class PojoRest {
/**
* Retrieves the element addressed by the URL as the specified object type.
+ *
* <p>
* Will convert object to the specified type per {@link BeanSession#convertToType(Object, ClassMeta)}.
*
* @param type The specified object type.
- * @param url The URL of the element to retrieve.
- * If null or blank, returns the root.
+ * @param url
+ * The URL of the element to retrieve.
+ * 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.
@@ -244,6 +252,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link String}.
+ *
* <p>
* Shortcut for <code>get(String.<jk>class</jk>, key)</code>.
*
@@ -256,6 +265,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link String}.
+ *
* <p>
* Shortcut for <code>get(String.<jk>class</jk>, key, defVal)</code>.
*
@@ -269,6 +279,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to an {@link Integer}.
+ *
* <p>
* Shortcut for <code>get(Integer.<jk>class</jk>, key)</code>.
*
@@ -282,6 +293,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to an {@link Integer}.
+ *
* <p>
* Shortcut for <code>get(Integer.<jk>class</jk>, key, defVal)</code>.
*
@@ -296,6 +308,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Long}.
+ *
* <p>
* Shortcut for <code>get(Long.<jk>class</jk>, key)</code>.
*
@@ -309,6 +322,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Long}.
+ *
* <p>
* Shortcut for <code>get(Long.<jk>class</jk>, key, defVal)</code>.
*
@@ -323,6 +337,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Boolean}.
+ *
* <p>
* Shortcut for <code>get(Boolean.<jk>class</jk>, key)</code>.
*
@@ -336,6 +351,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Boolean}.
+ *
* <p>
* Shortcut for <code>get(Boolean.<jk>class</jk>, key, defVal)</code>.
*
@@ -350,6 +366,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Map}.
+ *
* <p>
* Shortcut for <code>get(Map.<jk>class</jk>, key)</code>.
*
@@ -363,6 +380,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Map}.
+ *
* <p>
* Shortcut for <code>get(Map.<jk>class</jk>, key, defVal)</code>.
*
@@ -377,6 +395,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link List}.
+ *
* <p>
* Shortcut for <code>get(List.<jk>class</jk>, key)</code>.
*
@@ -390,6 +409,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link List}.
+ *
* <p>
* Shortcut for <code>get(List.<jk>class</jk>, key, defVal)</code>.
*
@@ -404,6 +424,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link Map}.
+ *
* <p>
* Shortcut for <code>get(ObjectMap.<jk>class</jk>, key)</code>.
*
@@ -417,6 +438,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link ObjectMap}.
+ *
* <p>
* Shortcut for <code>get(ObjectMap.<jk>class</jk>, key, defVal)</code>.
*
@@ -431,6 +453,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link ObjectList}.
+ *
* <p>
* Shortcut for <code>get(ObjectList.<jk>class</jk>, key)</code>.
*
@@ -444,6 +467,7 @@ public final class PojoRest {
/**
* Returns the specified entry value converted to a {@link ObjectList}.
+ *
* <p>
* Shortcut for <code>get(ObjectList.<jk>class</jk>, key, defVal)</code>.
*
@@ -460,37 +484,41 @@ public final class PojoRest {
* Executes the specified method with the specified parameters on the specified object.
*
* @param url The URL of the element to retrieve.
- * @param method The method signature.
- * <p>
- * Can be any of the following formats:
- * <ul class='spaced-list'>
- * <li>
- * Method name only. e.g. <js>"myMethod"</js>.
- * <li>
- * Method name with class names. e.g. <js>"myMethod(String,int)"</js>.
- * <li>
- * Method name with fully-qualified class names. e.g. <js>"myMethod(java.util.String,int)"</js>.
- * </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.
- * These will automatically be converted to the appropriate object type if possible.
- * This must be an array, like a JSON array.
+ * @param method
+ * The method signature.
+ * <p>
+ * Can be any of the following formats:
+ * <ul class='spaced-list'>
+ * <li>
+ * Method name only. e.g. <js>"myMethod"</js>.
+ * <li>
+ * Method name with class names. e.g. <js>"myMethod(String,int)"</js>.
+ * <li>
+ * Method name with fully-qualified class names. e.g. <js>"myMethod(java.util.String,int)"</js>.
+ * </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.
+ * 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 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>
+ * @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>
* @throws InvocationTargetException If the underlying constructor throws an exception.
* @throws ParseException If the input contains a syntax error or is malformed.
* @throws NoSuchMethodException
@@ -530,11 +558,13 @@ public final class PojoRest {
/**
* Sets/replaces the element addressed by the URL.
+ *
* <p>
* This method expands the POJO model as necessary to create the new element.
*
- * @param url The URL of the element to create.
- * If <jk>null</jk> or blank, the root itself is replaced with the specified value.
+ * @param url
+ * The URL of the element to create.
+ * If <jk>null</jk> or blank, the root itself is replaced with the specified value.
* @param val The value being set. Value can be of any type.
* @return The previously addressed element, or <jk>null</jk> the element did not previously exist.
*/
@@ -544,10 +574,13 @@ public final class PojoRest {
/**
* Adds a value to a list element in a POJO model.
+ *
* <p>
* The URL is the address of the list being added to.
+ *
* <p>
* If the list does not already exist, it will be created.
+ *
* <p>
* This method expands the POJO model as necessary to create the new element.
*
@@ -561,8 +594,9 @@ public final class PojoRest {
* </ul>
* </ul>
*
- * @param url The URL of the element being added to.
- * If <jk>null</jk> or blank, the root itself (assuming it's one of the types specified above) is added to.
+ * @param url
+ * The URL of the element being 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.
*/
@@ -572,11 +606,13 @@ public final class PojoRest {
/**
* Remove an element from a POJO model.
+ *
* <p>
* 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.
+ * @param url
+ * The URL of the element being deleted.
+ * If <jk>null</jk> or blank, the root itself is deleted.
* @return The removed element, or null if that element does not exist.
*/
public Object delete(String url) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 7de95ff..77ec174 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
@@ -19,8 +19,10 @@ import org.apache.juneau.*;
/**
* Generic exception thrown from the {@link PojoRest} class.
+ *
* <p>
* Typically, this is a user-error, such as trying to address a non-existent node in the tree.
+ *
* <p>
* The status code is an HTTP-equivalent code. It will be one of the following:
* <ul class='spaced-list'>
@@ -55,6 +57,7 @@ public final class PojoRestException extends FormattedRuntimeException {
/**
* The HTTP-equivalent status code.
+ *
* <p>
* See above for details.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 6cdf495..c8c41ed 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
@@ -25,6 +25,7 @@ import org.apache.juneau.utils.IOPipe.*;
/**
* Utility class for running operating system processes.
+ *
* <p>
* Similar to {@link java.lang.ProcessBuilder} but with additional features.
*/
@@ -41,6 +42,8 @@ public class ProcBuilder {
/**
* Creates a process builder with the specified arguments.
+ *
+ * <p>
* Equivalent to calling <code>ProcessBuilder.create().command(args);</code>
*
* @param args The command-line arguments.
@@ -61,6 +64,8 @@ public class ProcBuilder {
/**
* Command arguments.
+ *
+ * <p>
* Arguments can be collections or arrays and will be automatically expanded.
*
* @param args The command-line arguments.
@@ -72,6 +77,8 @@ public class ProcBuilder {
/**
* Command arguments if the specified matcher matches.
+ *
+ * <p>
* Can be used for specifying OS-specific commands.
*
* <h5 class='section'>Example:</h5>
@@ -96,6 +103,8 @@ public class ProcBuilder {
/**
* Append to the command arguments.
+ *
+ * <p>
* Arguments can be collections or arrays and will be automatically expanded.
*
* @param args The command-line arguments.
@@ -107,6 +116,8 @@ public class ProcBuilder {
/**
* Append to the command arguments if the specified matcher matches.
+ *
+ * <p>
* Arguments can be collections or arrays and will be automatically expanded.
*
* @param m The matcher.
@@ -131,6 +142,8 @@ public class ProcBuilder {
/**
* Use by-lines mode.
+ *
+ * <p>
* Flushes output after every line of input.
*
* @return This object (for method chaining).
@@ -142,6 +155,8 @@ public class ProcBuilder {
/**
* Pipe output to the specified writer.
+ *
+ * <p>
* The method can be called multiple times to write to multiple writers.
*
* @param w The writer to pipe to.
@@ -165,6 +180,8 @@ public class ProcBuilder {
/**
* Pipe output to the specified writer, including the command and return code.
+ *
+ * <p>
* The method can be called multiple times to write to multiple writers.
*
* @param w The writer to pipe to.
@@ -179,6 +196,8 @@ public class ProcBuilder {
/**
* Pipe output to the specified writer, including the command and return code.
+ *
+ * <p>
* The method can be called multiple times to write to multiple writers.
* Don't close the writer afterwards.
*
@@ -262,6 +281,8 @@ public class ProcBuilder {
/**
* Sets the maximum allowed return code on the process call.
+ *
+ * <p>
* If the return code exceeds this value, an IOException is returned on the {@link #run()} command.
* The default value is '0'.
*
@@ -327,6 +348,8 @@ public class ProcBuilder {
/**
* Destroys the underlying process.
+ *
+ * <p>
* This method is only needed if the {@link #getScanner()} method was used.
*/
private void close() {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 3fd9100..a252c97 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
@@ -60,20 +60,25 @@ public class SearchArgs {
/**
* Adds search terms to this builder.
+ *
* <p>
* The search terms are a comma-delimited list of key/value pairs of column-names and search tokens.
+ *
* <p>
* For example:
* <p class='bcode'>
* builder.search(<js>"column1=foo*, column2=bar baz"</js>);
* </p>
+ *
* <p>
* It's up to implementers to decide the syntax and meaning of the search terms.
+ *
* <p>
* Whitespace is trimmed from column names and search tokens.
*
- * @param searchTerms The search terms string.
- * Can be <jk>null</jk>.
+ * @param searchTerms
+ * The search terms string.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder search(String searchTerms) {
@@ -91,6 +96,7 @@ public class SearchArgs {
/**
* Adds a search term to this builder.
+ *
* <p>
* It's up to implementers to decide the syntax and meaning of the search term.
*
@@ -105,20 +111,25 @@ public class SearchArgs {
/**
* Specifies the list of columns to view.
+ *
* <p>
* The columns argument is a simple comma-delimited list of column names.
+ *
* <p>
* For example:
* <p class='bcode'>
* builder.view(<js>"column1, column2"</js>);
* </p>
+ *
* <p>
* Whitespace is trimmed from column names.
+ *
* <p>
* Empty view columns imply view all columns.
*
- * @param columns The columns being viewed.
- * Can be <jk>null</jk>.
+ * @param columns
+ * The columns being viewed.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder view(String columns) {
@@ -129,6 +140,7 @@ public class SearchArgs {
/**
* Specifies the list of columns to view.
+ *
* <p>
* Empty view columns imply view all columns.
*
@@ -161,8 +173,9 @@ public class SearchArgs {
* <p>
* Whitespace is trimmed from column names.
*
- * @param sortArgs The columns to sort by.
- * Can be <jk>null</jk>.
+ * @param sortArgs
+ * The columns to sort by.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder sort(String sortArgs) {
@@ -181,8 +194,9 @@ public class SearchArgs {
* <p>
* Note that the order of the sort is important.
*
- * @param sortArgs The columns to sort by.
- * Can be <jk>null</jk>.
+ * @param sortArgs
+ * The columns to sort by.
+ * Can be <jk>null</jk>.
* @return This object (for method chaining).
*/
public Builder sort(Collection<String> sortArgs) {
@@ -211,8 +225,9 @@ 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.
+ * @param limit
+ * The number of rows to return.
+ * If <code><=0</code>, all rows should be returned.
* @return This object (for method chaining).
*/
public Builder limit(int limit) {
@@ -222,6 +237,7 @@ public class SearchArgs {
/**
* Specifies whether case-insensitive search should be used.
+ *
* <p>
* The default is <jk>false</jk>.
*
@@ -235,6 +251,7 @@ public class SearchArgs {
/**
* Construct the {@link SearchArgs} object.
+ *
* <p>
* This method can be called multiple times to construct new objects.
*
@@ -247,8 +264,10 @@ public class SearchArgs {
/**
* The query search terms.
+ *
* <p>
* The search terms are key/value pairs consisting of column-names and search tokens.
+ *
* <p>
* It's up to implementers to decide the syntax and meaning of the search term.
*
@@ -260,6 +279,7 @@ public class SearchArgs {
/**
* The view columns.
+ *
* <p>
* The view columns are the list of columns that should be displayed.
* An empty list implies all columns should be displayed.
@@ -272,9 +292,10 @@ public class SearchArgs {
/**
* The sort columns.
+ *
* <p>
* The sort columns are key/value pairs consisting of column-names and direction flags
- * (<jk>false</jk> = ascending, <jk>true</jk> = descending).
+ * (<jk>false</jk> = ascending, <jk>true</jk> = descending).
*
* @return An unmodifiable ordered map of sort columns and directions.
*/
@@ -285,8 +306,9 @@ public class SearchArgs {
/**
* The first-row position.
*
- * @return The zero-indexed row number of the first row to display.
- * Default is <code>0</code>
+ * @return
+ * The zero-indexed row number of the first row to display.
+ * Default is <code>0</code>
*/
public int getPosition() {
return position;
@@ -295,8 +317,9 @@ 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.
+ * @return
+ * The number of rows to return in the result.
+ * Default is <code>0</code> which means return all rows.
*/
public int getLimit() {
return limit;
@@ -304,11 +327,13 @@ public class SearchArgs {
/**
* The ignore-case flag.
+ *
* <p>
* 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>.
+ * @return
+ * The number of rows to return in the result.
+ * Default is <jk>false</jk>.
*/
public boolean isIgnoreCase() {
return ignoreCase;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/utils/StringMessage.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/utils/StringMessage.java b/juneau-core/src/main/java/org/apache/juneau/utils/StringMessage.java
index 1a553d1..329d58a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/utils/StringMessage.java
+++ b/juneau-core/src/main/java/org/apache/juneau/utils/StringMessage.java
@@ -22,6 +22,7 @@ import org.apache.juneau.http.*;
/**
* An encapsulated MessageFormat-style string and arguments.
+ *
* <p>
* Useful for delayed serialization of arguments for logging.
* Message string will not be constructed until the <code>toString()</code> method is called.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 7198b26..0cf0b28 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
@@ -21,8 +21,10 @@ import org.apache.juneau.serializer.*;
/**
* A serializer/object pair used for delayed object serialization.
+ *
* <p>
* Useful in certain conditions such as logging when you don't want to needlessly serialize objects.
+ *
* <p>
* Instances of this method are created by the {@link WriterSerializer#toStringObject(Object)} method.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 9d6d6f9..5637136 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
@@ -19,6 +19,7 @@ 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
* 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 dc775e6..a3a85dc 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
@@ -16,9 +16,10 @@ 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
- * re-mappings 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> {
@@ -27,6 +28,7 @@ public final class Namespace implements Comparable<Namespace> {
/**
* Constructor.
+ *
* <p>
* Use this constructor when the long name and short name are the same value.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 396cbb3..214eff5 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
@@ -21,6 +21,7 @@ import org.apache.juneau.parser.*;
/**
* Factory class for getting unique instances of {@link Namespace} objects.
+ *
* <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
@@ -52,6 +53,7 @@ public final class NamespaceFactory {
/**
* Converts the specified object into a {@link Namespace} object.
+ *
* <p>
* Can be any of following types:
* <ul>
@@ -84,6 +86,7 @@ public final class NamespaceFactory {
/**
* Converts the specified object into an array of {@link Namespace} object.
+ *
* <p>
* Can be any of following types:
* <ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 ad489fa..b99f5c5 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
@@ -229,6 +229,7 @@ public class XmlBeanMeta extends BeanMetaExtended {
/**
* Returns the format of the inner XML content of this bean.
+ *
* <p>
* Can be one of the following:
* <ul>
@@ -250,9 +251,10 @@ 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").
+ *
+ * <p>
+ * 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").
*
* @param fieldName The bean property name.
* @return The property metadata.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 ad34afb..5eb1d4a 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
@@ -48,6 +48,7 @@ public class XmlBeanPropertyMeta extends BeanPropertyMetaExtended {
/**
* Returns the XML namespace associated with this bean property.
+ *
* <p>
* Namespace is determined in the following order:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 395bc80..d1c42a5 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
@@ -56,8 +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;
@@ -83,6 +83,7 @@ public class XmlClassMeta extends ClassMetaExtended {
/**
* Returns the XML namespace associated with this class.
+ *
* <p>
* Namespace is determined in the following order:
* <ol>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 b26f025..36b7376 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
@@ -22,13 +22,14 @@ import org.apache.juneau.serializer.*;
* Serializes POJOs to HTTP responses as XML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/xml</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/xml</code>
*
* <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.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 c4f4d35..3d57a16 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
@@ -33,15 +33,15 @@ import org.apache.juneau.xml.annotation.*;
* Parses text generated by the {@link XmlSerializer} class back into a POJO model.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Content-Type</code> types: <code>text/xml</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* See the {@link XmlSerializer} class for a description of Juneau-generated XML.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link XmlParserContext}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 d6b287d..b27de19 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
@@ -56,16 +56,18 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Enable validation.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParserBuilder.validating"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* 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.
@@ -85,13 +87,14 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> XML reporter.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParserBuilder.reporter"</js>
* <li><b>Data type:</b> {@link XMLReporter}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Associates an {@link XMLReporter} with this parser.
*
@@ -99,6 +102,7 @@ public class XmlParserBuilder extends ParserBuilder {
* <ul>
* <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.
@@ -118,15 +122,17 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> XML resolver.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParserBuilder.resolver"</js>
* <li><b>Data type:</b> {@link XMLResolver}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <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.
@@ -146,15 +152,17 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> XML event allocator.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParserBuilder.eventAllocator"</js>
* <li><b>Data type:</b> {@link XMLEventAllocator}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <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.
@@ -174,16 +182,17 @@ public class XmlParserBuilder extends ParserBuilder {
/**
* <b>Configuration property:</b> Preserve root element during generalized parsing.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParserBuilder.preserveRootElement"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
*
* Example:
* <table class='styled'>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 fdeea43..bc8496e 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
@@ -20,9 +20,11 @@ import org.apache.juneau.parser.*;
/**
* Configurable properties on the {@link XmlParser} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -43,13 +45,14 @@ public class XmlParserContext extends ParserContext {
/**
* <b>Configuration property:</b> Enable validation.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParser.validating"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If <jk>true</jk>, XML document will be validated.
* See {@link XMLInputFactory#IS_VALIDATING} for more info.
@@ -58,13 +61,14 @@ public class XmlParserContext extends ParserContext {
/**
* <b>Configuration property:</b> XML reporter.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParser.reporter"</js>
* <li><b>Data type:</b> {@link XMLReporter}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Associates an {@link XMLReporter} with this parser.
*
@@ -77,13 +81,14 @@ public class XmlParserContext extends ParserContext {
/**
* <b>Configuration property:</b> XML resolver.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParser.resolver"</js>
* <li><b>Data type:</b> {@link XMLResolver}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Associates an {@link XMLResolver} with this parser.
*/
@@ -91,13 +96,14 @@ public class XmlParserContext extends ParserContext {
/**
* <b>Configuration property:</b> XML event allocator.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParser.eventAllocator"</js>
* <li><b>Data type:</b> {@link XMLEventAllocator}
* <li><b>Default:</b> <jk>null</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Associates an {@link XMLEventAllocator} with this parser.
*/
@@ -105,16 +111,18 @@ public class XmlParserContext extends ParserContext {
/**
* <b>Configuration property:</b> Preserve root element during generalized parsing.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlParser.preserveRootElement"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
+ *
* <p>
* Example:
* <table class='styled'>
@@ -141,6 +149,7 @@ public class XmlParserContext extends ParserContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 c903421..5d3f2d9 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
@@ -30,6 +30,7 @@ import org.apache.juneau.xml.annotation.*;
/**
* Session object that lives for the duration of a single use of {@link XmlParser}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -47,24 +48,30 @@ public class XmlParserSession extends ParserSession {
/**
* 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.
- * @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>
- * @param op The override properties.
- * These override any context properties defined in the context.
+ * @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>
+ * @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.
* @param outer The outer object for instantiating top-level non-static inner classes.
- * @param locale The session locale.
- * 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.
+ * @param locale
+ * The session locale.
+ * 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.
* @param mediaType The session media type (e.g. <js>"application/json"</js>).
*/
public XmlParserSession(XmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer,
@@ -128,6 +135,7 @@ public class XmlParserSession extends ParserSession {
/**
* Decodes and trims the specified string.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
*
@@ -146,6 +154,7 @@ public class XmlParserSession extends ParserSession {
/**
* Returns the name of the current XML element.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
*
@@ -159,6 +168,7 @@ public class XmlParserSession extends ParserSession {
/**
* Returns the name of the specified attribute on the current XML element.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
*
@@ -173,6 +183,7 @@ public class XmlParserSession extends ParserSession {
/**
* Returns the value of the specified attribute on the current XML element.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
*
@@ -187,8 +198,10 @@ public class XmlParserSession extends ParserSession {
/**
* Returns the text content of the current XML element.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
+ *
* <p>
* Leading and trailing whitespace (unencoded) will be trimmed from the result.
*
@@ -203,14 +216,17 @@ public class XmlParserSession extends ParserSession {
/**
* Returns the content of the current CHARACTERS node.
+ *
* <p>
* Any <js>'_x####_'</js> sequences in the string will be decoded.
+ *
* <p>
* Leading and trailing whitespace (unencoded) will be trimmed from the result.
*
* @param r The reader to read the element text from.
- * @param trim If <jk>true</jk>, trim the contents of the text node BEFORE decoding escape sequences.
- * Typically <jk>true</jk> for {@link XmlFormat#MIXED_PWS} and {@link XmlFormat#TEXT_PWS}.
+ * @param trim
+ * If <jk>true</jk>, trim the contents of the text node BEFORE decoding escape sequences.
+ * Typically <jk>true</jk> for {@link XmlFormat#MIXED_PWS} and {@link XmlFormat#TEXT_PWS}.
* @return The decoded text. <jk>null</jk> if the text consists of the sequence <js>'_x0000_'</js>.
* @throws XMLStreamException
*/
@@ -236,6 +252,7 @@ public class XmlParserSession extends ParserSession {
/**
* Takes the element being read from the XML stream reader and reconstructs it as XML.
+ *
* <p>
* Used when reconstructing bean properties of type {@link XmlFormat#XMLTEXT}.
*
@@ -258,6 +275,8 @@ public class XmlParserSession extends ParserSession {
/**
* Parses the current element as text.
+ *
+ * <p>
* Note that this is different than {@link #getText(XMLStreamReader)} since it assumes that we're pointing to a
* whitespace element.
*
@@ -291,6 +310,7 @@ public class XmlParserSession extends ParserSession {
/**
* Returns <jk>true</jk> if the current element is a whitespace element.
+ *
* <p>
* For the XML parser, this always returns <jk>false</jk>.
* However, the HTML parser defines various whitespace elements such as <js>"br"</js> and <js>"sp"</js>.
@@ -304,6 +324,7 @@ public class XmlParserSession extends ParserSession {
/**
* Parses the current whitespace element.
+ *
* <p>
* For the XML parser, this always returns <jk>null</jk> since there is no concept of a whitespace element.
* However, the HTML parser defines various whitespace elements such as <js>"br"</js> and <js>"sp"</js>.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 edab0e4..6667123 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
@@ -19,13 +19,14 @@ import org.apache.juneau.serializer.*;
* Serializes POJO metadata to HTTP responses as XML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/xml+schema</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/xml</code>
*
* <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.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 ab93ce9..b34c836 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
@@ -37,17 +37,18 @@ import org.w3c.dom.ls.*;
* Serializes POJO metadata to HTTP responses as XML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/xml+schema</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/xml</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* Produces the XML-schema representation of the XML produced by the {@link XmlSerializer} class with the same properties.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link XmlSerializerContext}
@@ -97,9 +98,10 @@ 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)}.
- * Can be <jk>null</jk>.
+ * @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.
* @throws Exception If a problem was detected in the XML-Schema output produced by this serializer.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 8d75f98..702107d 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
@@ -33,14 +33,16 @@ import org.apache.juneau.xml.annotation.*;
* Serializes POJO models to XML.
*
* <h5 class='section'>Media types:</h5>
- * <p>
+ *
* Handles <code>Accept</code> types: <code>text/xml</code>
+ *
* <p>
* Produces <code>Content-Type</code> types: <code>text/xml</code>
*
* <h5 class='section'>Description:</h5>
- * <p>
+ *
* See the {@link JsonSerializer} class for details on how Java models map to JSON.
+ *
* <p>
* For example, the following JSON...
* <p class='bcode'>
@@ -81,6 +83,7 @@ import org.apache.juneau.xml.annotation.*;
* <xt><height></xt>62.4<xt></height></xt>
* <xt><fico_x0020_score></xt> &gt; 640<xt></fico_x0020_score></xt>
* <xt></object></xt>
+ *
* <p>
* An additional "add-json-properties" mode is also provided to prevent loss of JSON data types...
* <p class='bcode'>
@@ -100,16 +103,19 @@ import org.apache.juneau.xml.annotation.*;
* <xt><height</xt> <xa>_type</xa>=<xs>'number'</xs><xt>></xt>62.4<xt></height></xt>
* <xt><fico_x0020_score</xt> <xa>_type</xa>=<xs>'string'</xs><xt>></xt> &gt; 640<xt></fico_x0020_score></xt>
* <xt></object></xt>
+ * </p>
+ *
* <p>
* 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.
*
* <h5 class='section'>Configurable properties:</h5>
- * <p>
+ *
* This class has the following properties associated with it:
* <ul>
* <li>{@link XmlSerializerContext}
@@ -117,7 +123,7 @@ import org.apache.juneau.xml.annotation.*;
* </ul>
*
* <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
+ *
* The following direct subclasses are provided for convenience:
* <ul>
* <li>{@link Sq} - Default serializer, single quotes.
@@ -353,8 +359,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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 af35156..0a5cf30 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
@@ -53,13 +53,14 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Enable support for XML namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.enableNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If not enabled, XML output will not contain any namespaces regardless of any other settings.
*
@@ -88,21 +89,25 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Auto-detect namespace usage.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.autoDetectNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <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.
+ *
* <p>
* 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.
*
@@ -129,15 +134,17 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Add namespace URLs to the root element.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.addNamespaceUrisToRoot"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
+ *
* <p>
* This setting is ignored if {@link XmlSerializerContext#XML_enableNamespaces} is not enabled.
*
@@ -157,13 +164,14 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Default namespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.defaultNamespace"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"{juneau:'http://www.apache.org/2013/Juneau'}"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the default namespace URI for this document.
*
@@ -183,13 +191,14 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> XMLSchema namespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.xsNamespace"</js>
* <li><b>Data type:</b> {@link Namespace}
* <li><b>Default:</b> <code>{name:<js>'xs'</js>,uri:<js>'http://www.w3.org/2001/XMLSchema'</js>}</code>
* <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.
@@ -210,13 +219,14 @@ public class XmlSerializerBuilder extends SerializerBuilder {
/**
* <b>Configuration property:</b> Default namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.namespaces"</js>
* <li><b>Data type:</b> <code>Set<{@link Namespace}></code>
* <li><b>Default:</b> empty set
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The default list of namespaces associated with this serializer.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 450ad36..afdad46 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
@@ -17,9 +17,11 @@ import org.apache.juneau.serializer.*;
/**
* Configurable properties on the {@link XmlSerializer} class.
+ *
* <p>
* Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
* passed into the constructor.
+ *
* <p>
* See {@link PropertyStore} for more information about context properties.
*
@@ -40,13 +42,14 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Enable support for XML namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.enableNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* If not enabled, XML output will not contain any namespaces regardless of any other settings.
*/
@@ -54,21 +57,25 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Auto-detect namespace usage.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.autoDetectNamespaces"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>true</jk>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <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.
+ *
* <p>
* 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.
*
@@ -83,15 +90,17 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Add namespace URLs to the root element.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.addNamespaceUrisToRoot"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
+ *
* <p>
* This setting is ignored if {@link #XML_enableNamespaces} is not enabled.
*/
@@ -99,13 +108,14 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Default namespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.defaultNamespace"</js>
* <li><b>Data type:</b> <code>String</code>
* <li><b>Default:</b> <js>"{juneau:'http://www.apache.org/2013/Juneau'}"</js>
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* Specifies the default namespace URI for this document.
*/
@@ -113,13 +123,14 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> XMLSchema namespace.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.xsNamespace"</js>
* <li><b>Data type:</b> {@link Namespace}
* <li><b>Default:</b> <code>{name:<js>'xs'</js>,uri:<js>'http://www.w3.org/2001/XMLSchema'</js>}</code>
* <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.
@@ -128,13 +139,14 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Default namespaces.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.namespaces"</js>
* <li><b>Data type:</b> <code>Set<{@link Namespace}></code>
* <li><b>Default:</b> empty set
* <li><b>Session-overridable:</b> <jk>true</jk>
* </ul>
+ *
* <p>
* The default list of namespaces associated with this serializer.
*/
@@ -142,19 +154,21 @@ public class XmlSerializerContext extends SerializerContext {
/**
* <b>Configuration property:</b> Add <js>"_type"</js> properties when needed.
- * <p>
+ *
* <ul>
* <li><b>Name:</b> <js>"XmlSerializer.addBeanTypeProperties"</js>
* <li><b>Data type:</b> <code>Boolean</code>
* <li><b>Default:</b> <jk>false</jk>
* <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.
* 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.
+ *
* <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}.
@@ -177,6 +191,7 @@ public class XmlSerializerContext extends SerializerContext {
/**
* Constructor.
+ *
* <p>
* Typically only called from {@link PropertyStore#getContext(Class)}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 76588c4..3033b17 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
@@ -28,6 +28,7 @@ import org.apache.juneau.serializer.*;
/**
* Session object that lives for the duration of a single use of {@link XmlSerializer}.
+ *
* <p>
* This class is NOT thread safe. It is meant to be discarded after one-time use.
*/
@@ -50,19 +51,24 @@ 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.
+ * @param ctx
+ * The context creating this session 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.
+ * @param op
+ * The override properties.
+ * 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.
- * @param timeZone The session timezone.
- * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param locale
+ * The session locale.
+ * 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.
* @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.
+ * @param uriContext
+ * The URI context.
+ * 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) {
@@ -186,6 +192,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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 2b1160e..0331315 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
@@ -175,9 +175,9 @@ public final class XmlUtils {
* @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}.
- * If <jk>true</jk>, leading and trailing whitespace characters will be encoded.
+ * Specifies whether we're in preserve-whitespace mode.
+ * (e.g. {@link XmlFormat#MIXED_PWS} or {@link XmlFormat#TEXT_PWS}.
+ * If <jk>true</jk>, leading and trailing whitespace characters will be encoded.
* @return The same writer passed in.
* @throws IOException Thrown from the writer.
*/
@@ -309,8 +309,9 @@ public final class XmlUtils {
*
* @param w The writer to send the output to.
* @param o The object being encoded.
- * @param trim Trim the text before serializing it.
- * If <jk>true</jk>, leading and trailing whitespace characters will be encoded.
+ * @param trim
+ * Trim the text before serializing it.
+ * If <jk>true</jk>, leading and trailing whitespace characters will be encoded.
* @return The same writer passed in.
* @throws IOException Thrown from the writer.
*/
@@ -478,6 +479,8 @@ 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.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 93d6248..509b6a2 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
@@ -135,6 +135,8 @@ public class XmlWriter extends SerializerWriter {
/**
* Closes a tag.
+ *
+ * <p>
* Shortcut for <code>append(<js>'>'</js>);</code>
*
* @return This object (for method chaining).
@@ -147,6 +149,8 @@ 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).
@@ -534,8 +538,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/f400b0c0/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 596151d..3d6fa02 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
@@ -19,8 +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>
@@ -37,6 +39,7 @@ 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.
*
@@ -47,9 +50,9 @@ 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>
* <p class='bcode'>
* <xt><object></xt>
* <xt><children></xt>
@@ -58,9 +61,9 @@ public @interface Xml {
* <xt></children></xt>
* <xt></object></xt>
* </p>
+ *
* <p>
* With the annotations, serializing this bean as XML produces the following...
- * </p>
* <p class='bcode'>
* <xt><object></xt>
* <xt><children></xt>
@@ -74,6 +77,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
@@ -82,6 +86,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} with the same name through the {@link XmlSchema#xmlNs()} annotation on the package.
@@ -90,6 +95,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} with the
* same name through the {@link XmlSchema#xmlNs()} annotation on the package.
@@ -120,9 +126,9 @@ public @interface Xml {
* <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>
* <p class='bcode'>
* <xt><object</xt> <xa>href</xa>=<js>'http://foo'</js><xt>></xt>
* <xt><f1></xt>123<xt></f1></xt>
@@ -132,9 +138,9 @@ public @interface Xml {
* <xt></children></xt>
* <xt></object></xt>
* </p>
+ *
* <p>
* With the annotations, serializing this bean as XML produces the following...
- * </p>
* <p class='bcode'>
* <xt><object</xt> <xa>f1</xa>=<js>'123'</js><xt>></xt>
* <xt><href></xt>http://foo<xt></href></xt>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 690f0ac..f536b7c 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
@@ -19,8 +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.
*/
@@ -28,8 +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>.
*/
@@ -37,8 +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.
@@ -49,8 +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.
*/
@@ -58,11 +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.
@@ -71,10 +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.
*/
@@ -82,6 +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.
*/
@@ -89,10 +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.
*/
@@ -104,12 +122,14 @@ public enum XmlFormat {
TEXT_PWS,
/**
- * Same as {@link #TEXT} except the content is expected to be fully-formed XML that will
- * get serialized as-is.
+ * 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.
*/
@@ -117,6 +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.
*/
@@ -124,15 +145,17 @@ 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 serialized with an end tag (e.g. "<p></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
+ * serialized with an end tag (e.g. "<p></p>").
*/
VOID;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
index d42412c..e7f565c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/annotation/XmlNs.java
@@ -18,6 +18,7 @@ import java.lang.annotation.*;
/**
* Namespace name/URL mapping pair.
+ *
* <p>
* Used to identify a namespace/URI pair on a {@link XmlSchema#xmlNs()} annotation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/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 04a9def..d5f707c 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
@@ -28,6 +28,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.
@@ -36,6 +37,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} value.
@@ -44,9 +46,11 @@ 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()} annotation.
+ *
* <p>
* Inherited by child packages.
*
@@ -66,6 +70,7 @@ 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'>
[02/11] incubator-juneau git commit: Clean up javadocs
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestLogger.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestLogger.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestLogger.java
index bc577e8..c307e11 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestLogger.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestLogger.java
@@ -26,9 +26,11 @@ import org.apache.juneau.rest.annotation.*;
/**
* Logging utility class.
+ *
* <p>
* Subclasses can override these methods to tailor logging of HTTP requests.
* Subclasses MUST implement a no-arg public constructor.
+ *
* <p>
* RestLoggers are associated with servlets/resources in one of the following ways:
* <ul>
@@ -40,6 +42,7 @@ public abstract class RestLogger {
/**
* Returns the Java logger used for logging.
+ *
* <p>
* Subclasses can provide their own logger.
* The default implementation returns the logger created using <code>Logger.getLogger(getClass())</code>.
@@ -50,6 +53,7 @@ public abstract class RestLogger {
/**
* Log a message to the logger.
+ *
* <p>
* Subclasses can override this method if they wish to log messages using a library other than Java Logging
* (e.g. Apache Commons Logging).
@@ -63,6 +67,7 @@ public abstract class RestLogger {
/**
* Log a message.
+ *
* <p>
* Equivalent to calling <code>log(level, <jk>null</jk>, msg, args);</code>
*
@@ -75,8 +80,8 @@ public abstract class RestLogger {
}
/**
- * Same as {@link #log(Level, String, Object...)} excepts runs the arguments through
- * {@link JsonSerializer#DEFAULT_LAX_READABLE}.
+ * Same as {@link #log(Level, String, Object...)} excepts runs the arguments through {@link JsonSerializer#DEFAULT_LAX_READABLE}.
+ *
* <p>
* Serialization of arguments do not occur if message is not logged, so it's safe to use this method from within
* debug log statements.
@@ -98,13 +103,15 @@ public abstract class RestLogger {
/**
* Callback method for logging errors during HTTP requests.
+ *
* <p>
* Typically, subclasses will override this method and log errors themselves.
+ *
* <p>
* The default implementation simply logs errors to the <code>RestServlet</code> logger.
+ *
* <p>
* Here's a typical implementation showing how stack trace hashing can be used to reduce log file sizes...
- * </p>
* <p class='bcode'>
* <jk>protected void</jk> onError(HttpServletRequest req, HttpServletResponse res, RestException e, <jk>boolean</jk> noTrace) {
* String qs = req.getQueryString();
@@ -148,8 +155,10 @@ public abstract class RestLogger {
/**
* Returns <jk>true</jk> if the specified exception should be logged.
+ *
* <p>
* Subclasses can override this method to provide their own logic for determining when exceptions are logged.
+ *
* <p>
* The default implementation will return <jk>false</jk> if <js>"noTrace=true"</js> is passed in the query string
* or <code>No-Trace: true</code> is specified in the header.
@@ -167,12 +176,13 @@ public abstract class RestLogger {
/**
* Returns <jk>true</jk> if a stack trace should be logged for this exception.
+ *
* <p>
* Subclasses can override this method to provide their own logic for determining when stack traces are logged.
+ *
* <p>
* The default implementation will only log a stack trace if {@link RestException#getOccurrence()} returns
* <code>1</code> and the exception is not one of the following:
- * </p>
* <ul>
* <li>{@link HttpServletResponse#SC_UNAUTHORIZED}
* <li>{@link HttpServletResponse#SC_FORBIDDEN}
@@ -206,6 +216,7 @@ public abstract class RestLogger {
/**
* NO-OP logger.
+ *
* <p>
* Disables all logging.
*
@@ -224,6 +235,7 @@ public abstract class RestLogger {
/**
* Default logger.
+ *
* <p>
* Logs all messages to the logger returned by <code>Logger.<jsm>getLogger</jsm>(getClass().getName())</code>
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcher.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcher.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcher.java
index 612d9d1..4967193 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcher.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcher.java
@@ -16,14 +16,17 @@ import org.apache.juneau.rest.annotation.*;
/**
* Class used for defining method-level matchers using the {@link RestMethod#matchers()} annotation.
+ *
* <p>
* Matchers are used to allow multiple Java methods to handle requests assigned to the same URL path pattern, but
* differing based on some request attribute, such as a specific header value.
* For example, matchers can be used to provide two different methods for handling requests from two different client
* versions.
+ *
* <p>
* Java methods with matchers associated with them are always attempted before Java methods without matchers.
* This allows a 'default' method to be defined to handle requests where no matchers match.
+ *
* <p>
* When multiple matchers are specified on a method, only one matcher is required to match.
* This is opposite from the {@link RestMethod#guards()} annotation, where all guards are required to match in order to
@@ -64,6 +67,7 @@ public abstract class RestMatcher {
/**
* Returns <jk>true</jk> if this matcher is required to match in order for the method to be invoked.
+ *
* <p>
* If <jk>false</jk>, then only one of the matchers must match.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
index 5678d1d..9469226 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestMatcherReflecting.java
@@ -16,6 +16,7 @@ import java.lang.reflect.*;
/**
* Subclass of {@link RestMatcher} that gives access to the servlet/resource and Java method it's applied to.
+ *
* <p>
* Essentially the same as {@link RestMatcher} except has a constructor where the Java method is passed in so that you
* can access annotations defined on it to tailor the behavior of the matcher.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestParam.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestParam.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestParam.java
index 840f9f7..1002013 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestParam.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestParam.java
@@ -18,8 +18,10 @@ import org.apache.juneau.rest.annotation.*;
/**
* REST java method parameter resolver.
+ *
* <p>
* Used to resolve instances of classes being passed to Java REST methods.
+ *
* <p>
* This class is associated with REST classes via the {@link RestResource#paramResolvers()} annotation and
* {@link RestConfig#addParamResolvers(Class...)} method.
@@ -34,8 +36,9 @@ public abstract class RestParam {
* Constructor.
*
* @param paramType The Swagger parameter type.
- * @param name The parameter name.
- * Can be <jk>null</jk> if parameter doesn't have a name (e.g. the request body).
+ * @param name
+ * The parameter name.
+ * Can be <jk>null</jk> if parameter doesn't have a name (e.g. the request body).
* @param type The object type to convert the parameter to.
*/
protected RestParam(RestParamType paramType, String name, Type type) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
index 9a2f9d2..161c578 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -42,8 +42,10 @@ import org.apache.juneau.utils.*;
/**
* Represents an HTTP request for a REST resource.
+ *
* <p>
* Equivalent to {@link HttpServletRequest} except with some additional convenience methods.
+ *
* <p>
* For reference, given the URL <js>"http://localhost:9080/contextRoot/servletPath/foo?bar=baz#qux"</js>, the
* following methods return the following values....
@@ -57,6 +59,7 @@ import org.apache.juneau.utils.*;
* <tr><td>{@code getRequestURL()}</td><td>{@code http://localhost:9080/contextRoot/servletPath/foo}</td></tr>
* <tr><td>{@code getServletPath()}</td><td>{@code /servletPath}</td></tr>
* </table>
+ *
* <p>
* Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this
* class.
@@ -241,6 +244,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Retrieve the properties active for this request.
+ *
* <p>
* These properties can be modified by the request.
*
@@ -362,9 +366,11 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Equivalent to {@link #getParameterMap()}, but only looks for query parameters in the URL, not form posts.
+ *
* <p>
* This method can be used to retrieve query parameters without triggering the underlying servlet API to load and
* parse the request body.
+ *
* <p>
* This object is modifiable.
*
@@ -455,9 +461,11 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the HTTP body content as a {@link Reader}.
+ *
* <p>
* If {@code allowHeaderParams} init parameter is true, then first looks for {@code &body=xxx} in the URL query
* string.
+ *
* <p>
* Automatically handles GZipped input streams.
*/
@@ -468,6 +476,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the HTTP body content as an {@link InputStream}.
+ *
* <p>
* Automatically handles GZipped input streams.
*
@@ -490,6 +499,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the URI context of the request.
+ *
* <p>
* The URI context contains all the information about the URI of the request, such as the servlet URI, context
* path, etc...
@@ -536,6 +546,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized servlet title.
+ *
* <p>
* Equivalent to calling {@link RestInfoProvider#getTitle(RestRequest)} with this object.
*
@@ -547,6 +558,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized servlet description.
+ *
* <p>
* Equivalent to calling {@link RestInfoProvider#getDescription(RestRequest)} with this object.
*
@@ -558,6 +570,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized method summary.
+ *
* <p>
* Equivalent to calling {@link RestInfoProvider#getMethodSummary(String, RestRequest)} with this object.
*
@@ -569,6 +582,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized method description.
+ *
* <p>
* Equivalent to calling {@link RestInfoProvider#getMethodDescription(String, RestRequest)} with this object.
*
@@ -603,6 +617,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the method of this request.
+ *
* <p>
* If <code>allowHeaderParams</code> init parameter is <jk>true</jk>, then first looks for
* <code>&method=xxx</code> in the URL query string.
@@ -614,6 +629,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the HTTP 1.1 method name of the request as an enum.
+ *
* <p>
* Note that non-RFC2616 method names resolve as {@link HttpMethod#OTHER}.
*
@@ -634,9 +650,11 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns <jk>true</jk> if <code>&plainText=true</code> was specified as a URL parameter.
+ *
* <p>
* This indicates that the <code>Content-Type</code> of the output should always be set to <js>"text/plain"</js>
* to make it easy to render in a browser.
+ *
* <p>
* This feature is useful for debugging.
*
@@ -668,6 +686,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the servlet handling the request.
+ *
* <p>
* Can be used to access servlet-init parameters or annotations during requests, such as in calls to
* {@link RestGuard#guard(RestRequest, RestResponse)}..
@@ -680,6 +699,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the java method handling the request.
+ *
* <p>
* Can be used to access the method name or method annotations during requests, such as in calls to
* {@link RestGuard#guard(RestRequest, RestResponse)}.
@@ -732,8 +752,9 @@ public final class RestRequest extends HttpServletRequestWrapper {
* classpath.
*
* @param name The name of the resource (i.e. the value normally passed to {@link Class#getResourceAsStream(String)}.
- * @param resolveVars If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter} variables will be
- * resolved by the variable resolver returned by {@link #getVarResolverSession()}.
+ * @param resolveVars
+ * If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter} variables will be
+ * resolved by the variable resolver returned by {@link #getVarResolverSession()}.
* @param mediaType The value to set as the <js>"Content-Type"</js> header for this object.
* @return A new reader resource, or <jk>null</jk> if resource could not be found.
* @throws IOException
@@ -753,8 +774,9 @@ public final class RestRequest extends HttpServletRequestWrapper {
* constructed using {@link RestConfig#addMimeTypes(String...)} to determine the media type.
*
* @param name The name of the resource (i.e. the value normally passed to {@link Class#getResourceAsStream(String)}.
- * @param resolveVars If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter} variables will be
- * resolved by the variable resolver returned by {@link #getVarResolverSession()}.
+ * @param resolveVars
+ * If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter} variables will be
+ * resolved by the variable resolver returned by {@link #getVarResolverSession()}.
* @return A new reader resource, or <jk>null</jk> if resource could not be found.
* @throws IOException
*/
@@ -776,8 +798,9 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the config file associated with the servlet.
*
- * @return The config file associated with the servlet, or <jk>null</jk> if servlet does not have a config file
- * associated with it.
+ * @return
+ * The config file associated with the servlet, or <jk>null</jk> if servlet does not have a config file
+ * associated with it.
*/
public ConfigFile getConfigFile() {
if (cf == null)
@@ -788,8 +811,9 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized swagger associated with the servlet.
*
- * @return The swagger associated with the servlet.
- * Never <jk>null</jk>.
+ * @return
+ * The swagger associated with the servlet.
+ * Never <jk>null</jk>.
*/
public Swagger getSwagger() {
if (swagger == null)
@@ -800,8 +824,9 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the widgets used for resolving <js>"$W{...}"</js> string variables.
*
- * @return The widgets used for resolving <js>"$W{...}"</js> string variables.
- * Never <jk>null</jk>.
+ * @return
+ * The widgets used for resolving <js>"$W{...}"</js> string variables.
+ * Never <jk>null</jk>.
*/
public Map<String,Widget> getWidgets() {
return widgets;
@@ -809,9 +834,11 @@ public final class RestRequest extends HttpServletRequestWrapper {
/**
* Returns the localized Swagger from the file system.
+ *
* <p>
* Looks for a file called <js>"{ServletClass}_{locale}.json"</js> in the same package as this servlet and returns
* it as a parsed {@link Swagger} object.
+ *
* <p>
* Returned objects are cached for later quick-lookup.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResourceResolver.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
index ddbdf18..308eba0 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
@@ -20,8 +20,10 @@ import org.apache.juneau.rest.annotation.*;
/**
* Class used to resolve {@link Class} objects to instances.
+ *
* <p>
* Used to convert classes defined via {@link RestResource#children() @RestResource.children()} into child instances.
+ *
* <p>
* Subclasses can be created to provide customized resource resolution.
* These can be associated with REST resources in one of the following ways:
@@ -30,15 +32,19 @@ import org.apache.juneau.rest.annotation.*;
* <li>{@link RestConfig#setResourceResolver(Class)}/{@link RestConfig#setResourceResolver(RestResourceResolver)}
* methods.
* </ul>
+ *
* <p>
* The default implementation simply instantiates the class using one of the following constructors:
* <ul>
* <li><code><jk>public</jk> T(RestConfig)</code>
* <li><code><jk>public</jk> T()</code>
* </ul>
+ *
+ * <p>
* The former constructor can be used to get access to the {@link RestConfig} object to get access to the
* config file and initialization information or make programmatic modifications to the resource before
* full initialization.
+ *
* <p>
* Non-<code>RestServlet</code> classes can also add the following two methods to get access to the
* {@link RestConfig} and {@link RestContext} objects:
@@ -56,8 +62,10 @@ public class RestResourceResolver {
/**
* Resolves the specified class to a resource object.
+ *
* <p>
* Subclasses can override this method to provide their own custom resolution.
+ *
* <p>
* The default implementation simply creates a new class instance using {@link Class#newInstance()}.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
index e0d2f69..1d85c9e 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java
@@ -34,9 +34,11 @@ import org.apache.juneau.xml.*;
/**
* Represents an HTTP response for a REST resource.
+ *
* <p>
* Essentially an extended {@link HttpServletResponse} with some special convenience methods that allow you to easily
* output POJOs as responses.
+ *
* <p>
* Since this class extends {@link HttpServletResponse}, developers are free to use these convenience methods, or
* revert to using lower level methods like any other servlet response.
@@ -49,6 +51,7 @@ import org.apache.juneau.xml.*;
* .setOutput(<js>"Simple string response"</js>);
* }
* </p>
+ *
* <p>
* Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this
* class.
@@ -151,8 +154,10 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTTP output on the response.
+ *
* <p>
* Calling this method is functionally equivalent to returning the object in the REST Java method.
+ *
* <p>
* Can be of any of the following types:
* <ul>
@@ -161,6 +166,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
* <li> Any serializable type defined in <a class="doclink"
* href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>
* </ul>
+ *
* <p>
* If it's an {@link InputStream} or {@link Reader}, you must also specify the <code>Content-Type</code> using the
* {@link #setContentType(String)} method.
@@ -176,6 +182,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Add a serializer property to send to the serializers to override a default value.
+ *
* <p>
* Can be any value specified in the following classes:
* <ul>
@@ -329,6 +336,8 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Returns the writer to the response body.
+ *
+ * <p>
* This methods bypasses any specified encoders and returns a regular unbuffered writer.
* Use the {@link #getNegotiatedWriter()} method if you want to use the matched encoder (if any).
*/
@@ -339,6 +348,8 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Convenience method meant to be used when rendering directly to a browser with no buffering.
+ *
+ * <p>
* Sets the header <js>"x-content-type-options=nosniff"</js> so that output is rendered immediately on IE and Chrome
* without any buffering for content-type sniffing.
*
@@ -394,6 +405,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Redirects to the specified URI.
+ *
* <p>
* Relative URIs are always interpreted as relative to the context root.
* This is similar to how WAS handles redirect requests, and is different from how Tomcat handles redirect requests.
@@ -427,11 +439,14 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML page title.
+ *
* <p>
* The format of this value is plain text.
+ *
* <p>
* It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added
* to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -441,11 +456,13 @@ public final class RestResponse extends HttpServletResponseWrapper {
* <li><code>{servletClass}.title</code> resource bundle value.
* <li><code>info/title</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(title)</code> annotation to specify the
@@ -453,10 +470,12 @@ public final class RestResponse extends HttpServletResponseWrapper {
* However, this annotation is provided in cases where you want the page title to be different that the one
* shown in the swagger document.
* </ul>
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#title() @HtmlDoc.title()} annotation.
*
- * @param value The HTML page title.
+ * @param value
+ * The HTML page title.
* Object will be converted to a string using {@link Object#toString()}.
* <p>
* <ul class='doctree'>
@@ -472,11 +491,14 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML page description.
+ *
* <p>
* The format of this value is plain text.
+ *
* <p>
* It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then
* added to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -488,11 +510,13 @@ public final class RestResponse extends HttpServletResponseWrapper {
* <li><code>{servletClass}.description</code> resource bundle value.
* <li><code>info/description</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(description)</code> or
@@ -500,10 +524,12 @@ public final class RestResponse extends HttpServletResponseWrapper {
* However, this annotation is provided in cases where you want the text to be different that the values shown
* in the swagger document.
* </ul>
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#description() @HtmlDoc.description()} annotation.
*
- * @param value The HTML page description.
+ * @param value
+ * The HTML page description.
* Object will be converted to a string using {@link Object#toString()}.
* <p>
* <ul class='doctree'>
@@ -519,19 +545,25 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML page branding in the header section of the page generated by the default HTML doc template.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* This is arbitrary HTML that can be added to the header section to provide basic custom branding on the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#branding() @HtmlDoc.branding()} annotation.
*
- * @param value The HTML page branding.
- * Object will be converted to a string using {@link Object#toString()}.
+ * @param value
+ * The HTML page branding.
+ * Object will be converted to a string using {@link Object#toString()}.
* @return This object (for method chaining).
*/
public RestResponse setHtmlBranding(Object value) {
@@ -540,29 +572,36 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML header section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The page header normally contains the title and description, but this value can be used to override the contents
* to be whatever you want.
+ *
* <p>
* When a value is specified, the {@link #setHtmlTitle(Object)} and {@link #setHtmlDescription(Object)} values will
* be ignored.
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no header.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#header() @HtmlDoc.header()} annotation.
*
- * @param value The HTML header section contents.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML header section contents.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlHeader(Object value) {
@@ -571,28 +610,35 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the links in the HTML nav section.
+ *
* <p>
* The format of this value is a lax-JSON map of key/value pairs where the keys are the link text and the values are
* relative (to the servlet) or absolute URLs.
+ *
* <p>
* The page links are positioned immediately under the title and text.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This field can also use URIs of any support type in {@link UriResolver}.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#links() @HtmlDoc.links()} annotation.
*
- * @param value The HTML nav section links links.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML nav section links links.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlLinks(Object value) {
@@ -602,29 +648,37 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML nav section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The nav section of the page contains the links.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* When a value is specified, the {@link #setHtmlLinks(Object)} value will be ignored.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#nav() @HtmlDoc.nav()} annotation.
*
- * @param value The HTML nav section contents.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML nav section contents.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlNav(Object value) {
@@ -634,25 +688,31 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML aside section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The aside section typically floats on the right side of the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#aside() @HtmlDoc.aside()} annotation.
*
- * @param value The HTML aside section contents.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to waste
- * string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML aside section contents.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to waste
+ * string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlAside(Object value) {
@@ -662,25 +722,31 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML footer section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The footer section typically floats on the bottom of the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#footer() @HtmlDoc.footer()} annotation.
*
- * @param value The HTML footer section contents.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML footer section contents.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlFooter(Object value) {
@@ -690,23 +756,28 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the HTML CSS style section contents.
+ *
* <p>
* The format of this value is CSS.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#css() @HtmlDoc.css()} annotation.
*
- * @param value The HTML CSS style section contents.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The HTML CSS style section contents.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlCss(Object value) {
@@ -716,26 +787,32 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Sets the CSS URL in the HTML CSS style section.
+ *
* <p>
* The format of this value is a URL.
+ *
* <p>
* Specifies the URL to the stylesheet to add as a link in the style tag in the header.
+ *
* <p>
* The format of this value is CSS.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols defined
* by {@link UriResolver}.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#cssUrl() @HtmlDoc.cssUrl()} annotation.
*
- * @param value The CSS URL in the HTML CSS style section.
- * Object will be converted to a string using {@link Object#toString()}.
- * <p>
- * <ul class='doctree'>
- * <li class='info'>
- * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
- * waste string concatenation cycles on non-HTML views.
- * </ul>
+ * @param value
+ * The CSS URL in the HTML CSS style section.
+ * Object will be converted to a string using {@link Object#toString()}.
+ * <p>
+ * <ul class='doctree'>
+ * <li class='info'>
+ * <b>Tip:</b> Use {@link StringMessage} to generate value with delayed serialization so as not to
+ * waste string concatenation cycles on non-HTML views.
+ * </ul>
* @return This object (for method chaining).
*/
public RestResponse setHtmlCssUrl(Object value) {
@@ -745,6 +822,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Shorthand method for forcing the rendered HTML content to be no-wrap.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#nowrap() @HtmlDoc.nowrap()} annotation.
*
@@ -758,6 +836,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Specifies the text to display when serializing an empty array or collection.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#noResultsMessage() @HtmlDoc.noResultsMessage()}
* annotation.
@@ -772,9 +851,11 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Specifies the template class to use for rendering the HTML page.
+ *
* <p>
* By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom
* renderer or subclasses from the basic class to have full control over how the page is rendered.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#template() @HtmlDoc.template()} annotation.
*
@@ -788,9 +869,11 @@ public final class RestResponse extends HttpServletResponseWrapper {
/**
* Specifies the template class to use for rendering the HTML page.
+ *
* <p>
* By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom
* renderer or subclasses from the basic class to have full control over how the page is rendered.
+ *
* <p>
* This is the programmatic equivalent to the {@link HtmlDoc#template() @HtmlDoc.template()} annotation.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
index 37db4e0..52ab73c 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
@@ -28,6 +28,7 @@ import org.apache.juneau.utils.*;
/**
* Servlet implementation of a REST resource.
+ *
* <p>
* Refer to <a class="doclink" href="package-summary.html#TOC">REST Servlet API</a> for information about using this
* class.
@@ -76,14 +77,18 @@ public abstract class RestServlet extends HttpServlet {
/**
* Resource initialization method.
+ *
* <p>
* Identical to {@link Servlet#init(ServletConfig)} except the config object provides access to the external config
* file, configuration properties, and variable resolver defined for this resource.
+ *
* <p>
* Classes can also use {@link HttpServlet#init()} and {@link RestServlet#getServletConfig()} as well to perform
* initialization.
+ *
* <p>
* Note that if you override this method, you must first call <code><jk>super</jk>.init(servletConfig)</code>!
+ *
* <p>
* Resource classes that don't extend from {@link RestServlet} can add this method to their class to get access to
* the config object.
@@ -102,8 +107,10 @@ public abstract class RestServlet extends HttpServlet {
/**
* Convenience method if you want to perform initialization on your resource after all configuration settings
* have been made.
+ *
* <p>
* This allows you to get access to the {@link RestContext} object during initialization.
+ *
* <p>
* The default implementation does nothing.
*
@@ -128,6 +135,7 @@ public abstract class RestServlet extends HttpServlet {
/**
* The main service method.
+ *
* <p>
* Subclasses can optionally override this method if they want to tailor the behavior of requests.
*/
@@ -156,9 +164,11 @@ public abstract class RestServlet extends HttpServlet {
/**
* Returns the read-only context object that contains all the configuration information about this resource.
+ *
* <p>
* This object is <jk>null</jk> during the call to {@link #init(RestConfig)} but is populated by the time
* {@link #init()} is called.
+ *
* <p>
* Resource classes that don't extend from {@link RestServlet} can add the following method to their class to get
* access to this context object:
@@ -174,10 +184,13 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method for listening for successful completion of requests.
+ *
* <p>
* Subclasses can override this method for gathering performance statistics.
+ *
* <p>
* The default implementation does nothing.
+ *
* <p>
* Resources that don't extend from {@link RestServlet} can implement an equivalent method by overriding the
* {@link RestCallHandler#onSuccess(RestRequest, RestResponse, long)} method.
@@ -190,9 +203,11 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method that gets invoked right before the REST Java method is invoked.
+ *
* <p>
* Subclasses can override this method to override request headers or set request-duration properties before the
* Java method is invoked.
+ *
* <p>
* Resources that don't extend from {@link RestServlet} can implement an equivalent method by overriding the
* {@link RestCallHandler#onPreCall(RestRequest)} method.
@@ -205,9 +220,11 @@ public abstract class RestServlet extends HttpServlet {
/**
* Callback method that gets invoked right after the REST Java method is invoked, but before the serializer is
* invoked.
+ *
* <p>
* Subclasses can override this method to override request and response headers, or set/override properties used by
* the serializer.
+ *
* <p>
* Resources that don't extend from {@link RestServlet} can implement an equivalent method by overriding the
* {@link RestCallHandler#onPostCall(RestRequest,RestResponse)} method.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
index d5348e9..dc5f7ed 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
@@ -28,9 +28,9 @@ import org.apache.juneau.xml.*;
/**
* Subclass of {@link RestServlet} with default serializers and parsers defined.
+ *
* <p>
* Supports the following request <code>Accept</code> header values with the resulting response <code>Content-Type</code>:
- * </p>
* <table class='styled'>
* <tr>
* <th>Accept</th>
@@ -126,18 +126,22 @@ import org.apache.juneau.xml.*;
* <td>{@link PlainTextParser}</td>
* </tr>
* </table>
+ *
* <p>
* It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this could cause security
* issues.
* Use caution when using this particular parser as it could inadvertently cause code execution security holes.
+ *
* <p>
* The list of serializers and parsers can be appended to using the
- * {@link RestResource#serializers() @RestResource.serializers()} and
- * {@link RestResource#parsers() @RestResource.parsers()} annotations on subclasses.
+ * {@link RestResource#serializers() @RestResource.serializers()} and
+ * {@link RestResource#parsers() @RestResource.parsers()} annotations on subclasses.
+ *
* <p>
* This subclass also provides a default OPTIONS page by implementing a {@link #getOptions(RestRequest)} that returns a
* POJO consisting of beans describing the class.
* <img class='bordered' src='doc-files/OptionsPage.png'>
+ *
* <p>
* The OPTIONS page can be modified or augmented by overriding this method and providing your own data.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletGroupDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletGroupDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletGroupDefault.java
index 0864d54..7376453 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletGroupDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletGroupDefault.java
@@ -17,9 +17,11 @@ import org.apache.juneau.rest.labels.*;
/**
* Specialized subclass of {@link RestServletDefault} for showing "group" pages.
+ *
* <p>
* Group pages consist of simple lists of child resource URLs and their labels.
* They're meant to be used as jumping-off points for child resources.
+ *
* <p>
* Child resources are specified using the {@link RestResource#children()} annotation.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java
index 0d3dddb..8c72906 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestUtils.java
@@ -90,6 +90,7 @@ public final class RestUtils {
/**
* Efficiently trims the path info part from a request URI.
+ *
* <p>
* The result is the URI of the servlet itself.
*
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java b/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java
index ebfa1be..420248a 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/StreamResource.java
@@ -24,10 +24,12 @@ import org.apache.juneau.rest.response.*;
/**
* Represents the contents of a byte stream file with convenience methods for adding HTTP response headers.
+ *
* <p>
* The purpose of this class is to maintain an in-memory reusable byte array of a streamed resource for the fastest
* possible streaming.
* Therefore, this object is designed to be reused and thread-safe.
+ *
* <p>
* This class is handled special by the {@link StreamableHandler} class.
* This allows these objects to be returned as responses by REST methods.
@@ -42,16 +44,17 @@ public class StreamResource implements Streamable {
* Constructor.
*
* @param mediaType The resource media type.
- * @param contents The resource contents.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code><jk>byte</jk>[]</code>
- * <li><code>InputStream</code>
- * <li><code>Reader</code> - Converted to UTF-8 bytes.
- * <li><code>File</code>
- * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
- * </ul>
+ * @param contents
+ * The resource contents.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code><jk>byte</jk>[]</code>
+ * <li><code>InputStream</code>
+ * <li><code>Reader</code> - Converted to UTF-8 bytes.
+ * <li><code>File</code>
+ * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
+ * </ul>
* @throws IOException
*/
public StreamResource(MediaType mediaType, Object...contents) throws IOException {
@@ -63,16 +66,17 @@ public class StreamResource implements Streamable {
*
* @param mediaType The resource media type.
* @param headers The HTTP response headers for this streamed resource.
- * @param contents The resource contents.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code><jk>byte</jk>[]</code>
- * <li><code>InputStream</code>
- * <li><code>Reader</code> - Converted to UTF-8 bytes.
- * <li><code>File</code>
- * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
- * </ul>
+ * @param contents
+ * The resource contents.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code><jk>byte</jk>[]</code>
+ * <li><code>InputStream</code>
+ * <li><code>Reader</code> - Converted to UTF-8 bytes.
+ * <li><code>File</code>
+ * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
+ * </ul>
* @throws IOException
*/
public StreamResource(MediaType mediaType, Map<String,Object> headers, Object...contents) throws IOException {
@@ -137,19 +141,21 @@ public class StreamResource implements Streamable {
/**
* Specifies the contents for this resource.
+ *
* <p>
* This method can be called multiple times to add more content.
*
- * @param contents The resource contents.
- * <br>If multiple contents are specified, the results will be concatenated.
- * <br>Contents can be any of the following:
- * <ul>
- * <li><code><jk>byte</jk>[]</code>
- * <li><code>InputStream</code>
- * <li><code>Reader</code> - Converted to UTF-8 bytes.
- * <li><code>File</code>
- * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
- * </ul>
+ * @param contents
+ * The resource contents.
+ * <br>If multiple contents are specified, the results will be concatenated.
+ * <br>Contents can be any of the following:
+ * <ul>
+ * <li><code><jk>byte</jk>[]</code>
+ * <li><code>InputStream</code>
+ * <li><code>Reader</code> - Converted to UTF-8 bytes.
+ * <li><code>File</code>
+ * <li><code>CharSequence</code> - Converted to UTF-8 bytes.
+ * </ul>
* @return This object (for method chaining).
*/
public Builder contents(Object...contents) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java b/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java
index 41bc08d..2ed259e 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/UrlPathPattern.java
@@ -21,6 +21,7 @@ import org.apache.juneau.rest.annotation.*;
/**
* A parsed path pattern constructed from a {@link RestMethod#path()} value.
+ *
* <p>
* Handles aspects of matching and precedence ordering.
*/
@@ -77,8 +78,9 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> {
* Returns a non-<jk>null</jk> value if the specified path matches this pattern.
*
* @param path The path to match against.
- * @return An array of values matched against <js>"{var}"</js> variable in the pattern, or an empty array if the
- * pattern matched but no vars were present, or <jk>null</jk> if the specified path didn't match the pattern.
+ * @return
+ * An array of values matched against <js>"{var}"</js> variable in the pattern, or an empty array if the
+ * pattern matched but no vars were present, or <jk>null</jk> if the specified path didn't match the pattern.
*/
protected String[] match(String path) {
@@ -111,6 +113,8 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> {
/**
* Comparator for this object.
+ *
+ * <p>
* The comparator is designed to order URL pattern from most-specific to least-specific.
* For example, the following patterns would be ordered as follows:
* <ol>
@@ -161,6 +165,8 @@ public final class UrlPathPattern implements Comparable<UrlPathPattern> {
/**
* Returns this path pattern as the compiled regular expression.
+ *
+ * <p>
* Useful for debugging.
*
* @return The path pattern.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java
index 2022bf6..5457265 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Body.java
@@ -29,9 +29,9 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"POST"</js>)
* <jk>public void</jk> doPostPerson(RestRequest req, RestResponse res) {
@@ -39,10 +39,10 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* {@link Reader Readers} and {@link InputStream InputStreams} can also be specified as content parameters.
* When specified, any registered parsers are bypassed.
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"POST"</js>)
* <jk>public void</jk> doPostPerson(<ja>@Header</ja>(<js>"Content-Type"</js>) String mediaType, <ja>@Body</ja> InputStream input) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java
index 1cfa491..95405b0 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/FormData.java
@@ -31,9 +31,9 @@ import org.apache.juneau.rest.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"POST"</js>)
* <jk>public void</jk> doPost(RestRequest req, RestResponse res) {
@@ -45,10 +45,11 @@ import org.apache.juneau.rest.*;
* </p>
*
* <h6 class='topic'>Important note concerning FORM posts</h6>
- * <p>
+ *
* This annotation should not be combined with the {@link Body @Body} annotation or {@link RestRequest#getBody()} method
* for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet
* API to parse the body content as key-value pairs resulting in empty content.
+ *
* <p>
* The {@link Query @Query} annotation can be used to retrieve a URL parameter in the URL string without triggering the
* servlet to drain the body content.
@@ -66,6 +67,7 @@ public @interface FormData {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
@@ -73,11 +75,13 @@ public @interface FormData {
/**
* Specify <jk>true</jk> if using multi-part parameters to represent collections and arrays.
+ *
* <p>
- * Normally, we expect single parameters to be specified in UON notation for representing
- * collections of values (e.g. <js>"key=(1,2,3)"</js>.
- * This annotation allows the use of multi-part parameters to represent collections
- * (e.g. <js>"key=1&key=2&key=3"</js>.
+ * Normally, we expect single parameters to be specified in UON notation for representing collections of values
+ * (e.g. <js>"key=(1,2,3)"</js>.
+ * This annotation allows the use of multi-part parameters to represent collections (e.g.
+ * <js>"key=1&key=2&key=3"</js>.
+ *
* <p>
* This setting should only be applied to Java parameters of type array or Collection.
*/
@@ -85,6 +89,7 @@ public @interface FormData {
/**
* The expected format of the request parameter.
+ *
* <p>
* Possible values:
* <ul class='spaced-list'>
@@ -99,9 +104,10 @@ public @interface FormData {
* <js>"INHERIT"</js> (default) - Inherit from the {@link RestContext#REST_paramFormat} property on the
* servlet method or class.
* </ul>
+ *
* <p>
* Note that the parameter value <js>"(foo)"</js> is interpreted as <js>"(foo)"</js> when using plain mode, but
- * <js>"foo"</js> when using UON mode.
+ * <js>"foo"</js> when using UON mode.
*/
String format() default "INHERIT";
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java
index 150c2fb..76078cc 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasFormData.java
@@ -22,6 +22,7 @@ import org.apache.juneau.rest.*;
/**
* Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify whether or not
* the request has the specified multipart form POST parameter.
+ *
* <p>
* Note that this can be used to detect the existence of a parameter when it's not set to a particular value.
*
@@ -32,9 +33,9 @@ import org.apache.juneau.rest.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"POST"</js>)
* <jk>public void</jk> doPost(RestRequest req) {
@@ -42,6 +43,7 @@ import org.apache.juneau.rest.*;
* ...
* }
* </p>
+ *
* <p>
* The following table shows the behavioral differences between <code>@HasFormData</code> and <code>@FormData</code>...
* <table class='styled'>
@@ -73,10 +75,11 @@ import org.apache.juneau.rest.*;
* </table>
*
* <h6 class='topic'>Important note concerning FORM posts</h6>
- * <p>
+ *
* This annotation should not be combined with the {@link Body @Body} annotation or {@link RestRequest#getBody()} method
* for <code>application/x-www-form-urlencoded POST</code> posts, since it will trigger the underlying servlet API to
* parse the body content as key-value pairs, resulting in empty content.
+ *
* <p>
* The {@link HasQuery @HasQuery} annotation can be used to check for the existing of a URL parameter in the URL string
* without triggering the servlet to drain the body content.
@@ -94,6 +97,7 @@ public @interface HasFormData {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java
index d874a95..f355ebd 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HasQuery.java
@@ -22,6 +22,7 @@ import org.apache.juneau.rest.*;
/**
* Identical to {@link HasFormData @HasFormData}, but only checks the existing of the parameter in the URL string, not
* URL-encoded form posts.
+ *
* <p>
* Unlike {@link HasFormData @HasFormData}, using this annotation does not result in the servlet reading the contents
* of URL-encoded form posts.
@@ -35,9 +36,9 @@ import org.apache.juneau.rest.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>)
* <jk>public void</jk> doGet(RestRequest req) {
@@ -59,6 +60,7 @@ public @interface HasQuery {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java
index 6f0ee4f..d7758b1 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Header.java
@@ -28,9 +28,9 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>)
* <jk>public void</jk> doPostPerson(RestRequest req, RestResponse res) {
@@ -52,6 +52,7 @@ public @interface Header {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
index ec2fe87..8b4fbb9 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
@@ -18,12 +18,15 @@ import org.apache.juneau.rest.*;
/**
* Contains all the configurable annotations for the {@link HtmlDocSerializer}.
+ *
* <p>
* Used with {@link RestResource#htmldoc()} and {@link RestMethod#htmldoc()} to customize the HTML view of serialized
* POJOs.
+ *
* <p>
* All annotations specified here have no effect on any serializers other than {@link HtmlDocSerializer} and is
* provided as a shorthand method of for specifying configuration properties.
+ *
* <p>
* For example, the following two methods for defining the HTML document title are considered equivalent:
* <p class='bcode'>
@@ -39,6 +42,7 @@ import org.apache.juneau.rest.*;
* )
* )
* </p>
+ *
* <p>
* The purpose of these annotation is to populate the HTML document view which by default consists of the following
* structure:
@@ -75,11 +79,14 @@ public @interface HtmlDoc {
/**
* Sets the HTML page title in the header section of the page generated by the default HTML doc template.
+ *
* <p>
* The format of this value is HTML (phrasing content only).
+ *
* <p>
* It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added
* to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -89,11 +96,13 @@ public @interface HtmlDoc {
* <li><code>{servletClass}.title</code> resource bundle value.
* <li><code>info/title</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(title)</code> annotation to specify the
@@ -104,6 +113,7 @@ public @interface HtmlDoc {
* The entire header section can be rendered with arbitrary HTML using {@link #header()}.
* This annotation is ignored when the {@link #header()} annotation is specified.
* </ul>
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlTitle(String)}/{@link RestResponse#setHtmlTitle(Object)} methods.
@@ -112,11 +122,14 @@ public @interface HtmlDoc {
/**
* Sets the HTML page subtitle in the header section of the page generated by the default HTML doc template.
+ *
* <p>
* The format of this value is HTML (phrasing content only).
+ *
* <p>
* It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then
* added to the <code><xt><header></code> section on the page.
+ *
* <p>
* If not specified, the page title is pulled from one of the following locations:
* <ol>
@@ -128,11 +141,13 @@ public @interface HtmlDoc {
* <li><code>{servletClass}.description</code> resource bundle value.
* <li><code>info/description</code> entry in swagger file.
* </ol>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
- * <p>
+ *
* <ul class='doctree'>
* <li class='info'>
* In most cases, you'll simply want to use the <code>@RestResource(description)</code> or
@@ -143,6 +158,7 @@ public @interface HtmlDoc {
* The entire header section can be rendered with arbitrary HTML using {@link #header()}.
* This annotation is ignored when the {@link #header()} annotation is specified.
* </ul>
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlDescription(String)}/{@link RestResponse#setHtmlDescription(Object)} methods.
@@ -151,14 +167,19 @@ public @interface HtmlDoc {
/**
* Sets the HTML page branding in the header section of the page generated by the default HTML doc template.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* This is arbitrary HTML that can be added to the header section to provide basic custom branding on the page.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlBranding(String)}/{@link RestResponse#setHtmlBranding(Object)} methods.
@@ -167,8 +188,10 @@ public @interface HtmlDoc {
/**
* Sets the HTML header section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The page header normally contains the title and description, but this value can be used to override the contents
* to be whatever you want.
@@ -181,12 +204,16 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* When a value is specified, the {@link #title()} and {@link #description()} values will be ignored.
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no header.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlHeader(String)}/{@link RestResponse#setHtmlHeader(Object)} methods.
@@ -195,9 +222,11 @@ public @interface HtmlDoc {
/**
* Sets the links in the HTML nav section.
+ *
* <p>
* The format of this value is a lax-JSON map of key/value pairs where the keys are the link text and the values are
* relative (to the servlet) or absolute URLs.
+ *
* <p>
* The page links are positioned immediately under the title and text.
*
@@ -209,12 +238,16 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* This field can also use URIs of any support type in {@link UriResolver}.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlLinks(String)}/{@link RestResponse#setHtmlLinks(Object)} methods.
@@ -223,10 +256,13 @@ public @interface HtmlDoc {
/**
* Sets the HTML nav section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The nav section of the page contains the links.
+ *
* <p>
* The format of this value is HTML.
*
@@ -238,12 +274,16 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* When a value is specified, the {@link #links()} value will be ignored.
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlNav(String)}/{@link RestResponse#setHtmlNav(Object)} methods.
@@ -252,8 +292,10 @@ public @interface HtmlDoc {
/**
* Sets the HTML aside section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The aside section typically floats on the right side of the page.
*
@@ -265,10 +307,13 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlAside(String)}/{@link RestResponse#setHtmlAside(Object)} methods.
@@ -277,8 +322,10 @@ public @interface HtmlDoc {
/**
* Sets the HTML footer section contents.
+ *
* <p>
* The format of this value is HTML.
+ *
* <p>
* The footer section typically floats on the bottom of the page.
*
@@ -290,10 +337,13 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlFooter(String)}/{@link RestResponse#setHtmlFooter(Object)} methods.
@@ -302,6 +352,7 @@ public @interface HtmlDoc {
/**
* Sets the HTML CSS style section contents.
+ *
* <p>
* The format of this value is CSS.
*
@@ -313,10 +364,13 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+ *
* <p>
* A value of <js>"NONE"</js> can be used to force no value.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlCss(String)}/{@link RestResponse#setHtmlCss(Object)} methods.
@@ -325,10 +379,13 @@ public @interface HtmlDoc {
/**
* Sets the CSS URL in the HTML CSS style section.
+ *
* <p>
* The format of this value is a URL.
+ *
* <p>
* Specifies the URL to the stylesheet to add as a link in the style tag in the header.
+ *
* <p>
* The format of this value is CSS.
*
@@ -340,9 +397,11 @@ public @interface HtmlDoc {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols defined
* by {@link UriResolver}.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlCssUrl(String)}/{@link RestResponse#setHtmlCssUrl(Object)} methods.
@@ -351,6 +410,7 @@ public @interface HtmlDoc {
/**
* Shorthand method for forcing the rendered HTML content to be no-wrap.
+ *
* <p>
* This only applies to the rendered data portion of the page.
*/
@@ -363,9 +423,11 @@ public @interface HtmlDoc {
/**
* Specifies the template class to use for rendering the HTML page.
+ *
* <p>
* By default, uses {@link HtmlDocTemplateBasic} to render the contents, although you can provide your own custom
* renderer or subclasses from the basic class to have full control over how the page is rendered.
+ *
* <p>
* The programmatic equivalent to this annotation are the
* {@link RestConfig#setHtmlTemplate(Class)}/{@link RestResponse#setHtmlTemplate(Class)} methods.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java
index 30e014a..921b0bc 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Messages.java
@@ -23,6 +23,7 @@ import org.apache.juneau.utils.*;
/**
* Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the
* resource bundle for the request locale.
+ *
* <p>
* Parameter type must be either {@link ResourceBundle} or {@link MessageBundle}.
*
@@ -33,9 +34,9 @@ import org.apache.juneau.utils.*;
* <jk>return</jk> messages.getString(<js>"myLocalizedMessage"</js>);
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>)
* <jk>public</jk> String doGet(RestRequest req) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java
index 327a70c..3af46e2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Method.java
@@ -20,6 +20,7 @@ import java.lang.annotation.*;
/**
* Annotation that can be applied to a parameter of a {@link RestMethod} annotated method to identify it as the HTTP
* method.
+ *
* <p>
* Typically used for HTTP method handlers of type <js>"*"</js> (i.e. handle all requests).
*
@@ -30,9 +31,9 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* This is functionally equivalent to the following code...
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"*"</js>)
* <jk>public void</jk> doAnything(RestRequest req, RestResponse res) {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
index b63fd8b..8aaa396 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
@@ -19,8 +19,10 @@ public @interface MethodSwagger {
/**
* Optional external documentation information for the exposed API.
+ *
* <p>
* Used to populate the Swagger external documentation field.
+ *
* <p>
* A simplified JSON string with the following fields:
* <p class='bcode'>
@@ -29,6 +31,7 @@ public @interface MethodSwagger {
* url: string
* }
* </p>
+ *
* <p>
* The default value pulls the description from the <code>(className.?)[javaMethodName].externalDocs</code> entry in
* the servlet resource bundle.
@@ -43,8 +46,10 @@ public @interface MethodSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/externalDocs</code>.
*/
@@ -52,11 +57,14 @@ public @interface MethodSwagger {
/**
* Optional tagging information for the exposed API.
+ *
* <p>
* Used to populate the Swagger tags field.
+ *
* <p>
* A comma-delimited list of tags for API documentation control.
* Tags can be used for logical grouping of operations by resources or any other qualifier.
+ *
* <p>
* The default value pulls the description from the <code>(className.?)[javaMethodName].tags</code> entry in the
* servlet resource bundle.
@@ -70,8 +78,10 @@ public @interface MethodSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/tags</code>.
*/
@@ -79,8 +89,10 @@ public @interface MethodSwagger {
/**
* Optional deprecated flag for the exposed API.
+ *
* <p>
* Used to populate the Swagger deprecated field.
+ *
* <p>
* The default value pulls the description from the <code>(className.?)[javaMethodName].deprecated</code> entry in
* the servlet resource bundle.
@@ -94,8 +106,10 @@ public @interface MethodSwagger {
* )
* )
* </p>
+ *
* <p>
* This field can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/deprecated</code>.
*/
@@ -103,6 +117,7 @@ public @interface MethodSwagger {
/**
* Optional parameter descriptions.
+ *
* <p>
* This annotation is provided for documentation purposes and is used to populate the method <js>"parameters"</js>
* column on the Swagger page.
@@ -122,6 +137,8 @@ public @interface MethodSwagger {
* )
* )
* </p>
+ *
+ * <p>
* This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in
* this case the strings are internationalized.
* <p class='bcode'>
@@ -130,11 +147,15 @@ public @interface MethodSwagger {
* <jk>MyClass.myMethod.req.query.b.description</jk> = <js>The 'b' parameter</js>
* <jk>MyClass.myMethod.req.body.description</jk> = <js>The HTTP content</js>
* <jk>MyClass.myMethod.req.header.d.description</jk> = <js>The 'D' header</js>
+ * </p>
+ *
* <p>
* As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support
* English), and use resource bundles if you need to support localization.
+ *
* <p>
* These annotations can contain variables (e.g. "$L{my.localized.variable}").
+ *
* <p>
* Corresponds to the swagger field <code>/paths/{path}/{method}/parameters</code>.
*/
@@ -142,6 +163,7 @@ public @interface MethodSwagger {
/**
* Optional output description.
+ *
* <p>
* This annotation is provided for documentation purposes and is used to populate the method <js>"responses"</js>
* column on the Swagger page.
@@ -164,15 +186,20 @@ public @interface MethodSwagger {
* )
* )
* </p>
+ *
+ * <p>
* This is functionally equivalent to specifying the following keys in the resource bundle for the class, except in
* this case the strings are internationalized.
* <p class='bcode'>
* <jk>MyClass.myMethod.res.200.description</jk> = <js>OK</js>
* <jk>MyClass.myMethod.res.302.description</jk> = <js>Thing wasn't found here</js>
* <jk>MyClass.myMethod.res.302.header.Location.description</jk> = <js>The place to find the thing</js>
+ * </p>
+ *
* <p>
* As a general rule, use annotations when you don't care about internationalization (i.e. you only want to support
* English), and use resource bundles if you need to support localization.
+ *
* <p>
* These annotations can contain variables (e.g. "$L{my.localized.variable}").
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
index 3c1d935..834bf74 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
@@ -44,6 +44,7 @@ public @interface Parameter {
/**
* The location of the parameter.
+ *
* <p>
* Possible values are:
* <ul>
@@ -58,6 +59,7 @@ public @interface Parameter {
/**
* The name of the parameter (e.g. <js>"Content-Range"</js>).
+ *
* <p>
* Parameter names are case sensitive.
* If <code>in</code> is <js>"path"</js>, the name field MUST correspond to the associated path segment from the
@@ -71,11 +73,13 @@ public @interface Parameter {
/**
* Parameter description (e.g. <js>"Indicates the range returned when Range header is present in the request"</js>).
+ *
* <p>
* A brief description of the parameter.
* This could contain examples of use.
* <a class="doclink" href="https://help.github.com/articles/github-flavored-markdown">GFM syntax</a> can be used
* for rich text representation.
+ *
* <p>
* The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
* (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or
@@ -85,6 +89,7 @@ public @interface Parameter {
/**
* Determines whether this parameter is mandatory.
+ *
* <p>
* If the parameter is <code>in</code> <js>"path"</js>, this property is required and its value MUST be <jk>true</jk>.
* Otherwise, the property MAY be included and its default value is <jk>false</jk>.
@@ -93,11 +98,12 @@ public @interface Parameter {
/**
* The schema defining the type used for the body parameter.
+ *
* <p>
* Only applicable for <code>in</code> of type <js>"body"</js>.
+ *
* <p>
- * The schema is a JSON object specified <a class="doclink"
- * href="http://swagger.io/specification/#schemaObject">here</a>.
+ * The schema is a JSON object specified <a class="doclink" href="http://swagger.io/specification/#schemaObject">here</a>.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
@@ -116,6 +122,7 @@ public @interface Parameter {
/**
* The type of the parameter.
+ *
* <p>
* The value MUST be one of <js>"string"</js>, <js>"number"</js>, <js>"integer"</js>, <js>"boolean"</js>,
* <js>"array"</js> or <js>"file"</js>.
@@ -126,6 +133,7 @@ public @interface Parameter {
/**
* The extending format for the previously mentioned <code>type</code>.
+ *
* <p>
* See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further
* details.
@@ -134,6 +142,7 @@ public @interface Parameter {
/**
* Sets the ability to pass empty-valued parameters.
+ *
* <p>
* This is valid only for either <code>query</code> or <code>formData</code> parameters and allows you to send a
* parameter with a name only or an empty value.
@@ -143,6 +152,7 @@ public @interface Parameter {
/**
* Required if <code>type</code> is <js>"array"</js>.
+ *
* <p>
* Describes the type of items in the array.
*
@@ -159,6 +169,7 @@ public @interface Parameter {
* )
* <jk>public void</jk> doAnything() {
* </p>
+ *
* <p>
* See <a class="doclink" href="http://swagger.io/specification/#itemsObject">Items Object</a> for further details.
*/
@@ -166,6 +177,7 @@ public @interface Parameter {
/**
* Determines the format of the array if type array is used.
+ *
* <p>
* Possible values are:
* <ul>
@@ -183,6 +195,7 @@ public @interface Parameter {
/**
* Declares the value of the parameter that the server will use if none is provided.
+ *
* <p>
* For example a "count" to control the number of results per page might default to 100 if not supplied by the
* client in the request.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java
index 9a09497..212f290 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/Path.java
@@ -29,12 +29,12 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* The <ja>@Path</ja> annotation is optional if the parameters are specified immediately following the
* <code>RestRequest</code> and <code>RestResponse</code> parameters, and are specified in the same order as the
* variables in the URL path pattern.
* The following example is equivalent to the previous example.
- * </p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{foo}/{bar}/{baz}/*"</js>)
* <jk>public void</jk> doGet(RestRequest req, RestResponse res,
@@ -42,12 +42,12 @@ import java.lang.annotation.*;
* ...
* }
* </p>
+ *
* <p>
* If the order of parameters is not the default order shown above, the attribute names must be specified (since
* parameter names are lost during compilation).
* The following example is equivalent to the previous example, except the parameter order has been switched, requiring
* the use of the <ja>@Path</ja> annotations.
- * <p>
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{foo}/{bar}/{baz}/*"</js>)
* <jk>public void</jk> doGet(RestRequest req, RestResponse res,
@@ -55,8 +55,9 @@ import java.lang.annotation.*;
* ...
* }
* </p>
- * You can also use <code>{#}</code> notation to specify path parameters without specifying names.
+ *
* <p>
+ * You can also use <code>{#}</code> notation to specify path parameters without specifying names.
* <p class='bcode'>
* <ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/myurl/{0}/{1}/{2}/*"</js>)
* <jk>public void</jk> doGet(RestRequest req, RestResponse res,
@@ -73,6 +74,7 @@ public @interface Path {
/**
* URL path variable name.
+ *
* <p>
* Optional if the attributes are specified in the same order as in the URL path pattern.
*/
@@ -80,6 +82,7 @@ public @interface Path {
/**
* A synonym for {@link #name()}.
+ *
* <p>
* Allows you to use shortened notation if you're only specifying the name.
*/