This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 57a207799 Update new docs
57a207799 is described below
commit 57a20779934448152ecb9a2aab69d4942e4de071
Author: James Bognar <[email protected]>
AuthorDate: Tue Sep 16 14:39:03 2025 -0400
Update new docs
---
juneau-docs-poc/docs/topics/01.01.Overview.md | 1 -
.../docs/topics/02.02.Marshallers-test.md | 50 --------
.../docs/topics/02.02.Marshallers-test2.md | 50 --------
juneau-docs-poc/docs/topics/02.02.Marshallers.md | 50 ++++----
.../docs/topics/02.03.SerializersAndParsers.md | 34 +++---
.../docs/topics/02.04.01.BeanAnnotation.md | 14 +--
.../docs/topics/02.04.02.BeanpAnnotation.md | 18 +--
.../docs/topics/02.04.03.BeancAnnotation.md | 8 +-
.../docs/topics/02.04.04.BeanIgnoreAnnotation.md | 3 +-
.../docs/topics/02.04.05.NamePropertyAnnotation.md | 5 +-
.../topics/02.04.06.ParentPropertyAnnotation.md | 2 +-
.../docs/topics/02.04.07.PojoBuilders.md | 35 ++----
.../docs/topics/02.04.08.BypassSerialization.md | 8 +-
juneau-docs-poc/docs/topics/02.04.BeanContexts.md | 10 +-
.../docs/topics/02.05.JavaBeansSupport.md | 42 ++++---
.../topics/02.06.HttpPartSerializersParsers.md | 22 ++--
.../docs/topics/02.07.ContextSettings.md | 28 +++--
.../docs/topics/02.08.ContextAnnotations.md | 59 ++++-----
juneau-docs-poc/docs/topics/02.09.JsonMap.md | 48 ++++----
.../docs/topics/02.10.ComplexDataTypes.md | 21 ++--
.../docs/topics/02.11.01.DefaultSwaps.md | 39 +++---
juneau-docs-poc/docs/topics/02.11.02.AutoSwaps.md | 43 +++----
.../docs/topics/02.11.03.PerMediaTypeSwaps.md | 24 ++--
.../docs/topics/02.11.04.OneWaySwaps.md | 19 ++-
.../docs/topics/02.11.05.SwapAnnotation.md | 16 +--
.../docs/topics/02.11.06.TemplatedSwaps.md | 5 +-
.../docs/topics/02.11.07.SurrogateClasses.md | 15 +--
.../docs/topics/02.11.SerializerSetsParserSets.md | 1 -
juneau-docs-poc/docs/topics/02.12.Swaps.md | 20 +---
.../docs/topics/02.13.01.BeanSubTypes.md | 8 +-
.../topics/02.13.DynamicallyAppliedAnnotations.md | 132 +++++++--------------
.../docs/topics/02.14.BeanDictionaries.md | 66 +++++------
juneau-docs-poc/docs/topics/02.15.VirtualBeans.md | 15 ++-
juneau-docs-poc/docs/topics/02.16.Recursion.md | 18 ++-
.../docs/topics/02.17.ParsingIntoGenericModels.md | 1 -
.../docs/topics/02.18.ReadingContinuousStreams.md | 43 +++----
.../docs/topics/02.19.MarshallingUris.md | 47 ++------
.../docs/topics/02.20.JacksonComparison.md | 52 +++-----
.../docs/topics/02.21.01.SvlVariables.md | 117 +++++++-----------
juneau-docs-poc/src/css/custom.css | 79 ++++--------
40 files changed, 485 insertions(+), 783 deletions(-)
diff --git a/juneau-docs-poc/docs/topics/01.01.Overview.md
b/juneau-docs-poc/docs/topics/01.01.Overview.md
index 22ce234d2..ceaa49a5f 100644
--- a/juneau-docs-poc/docs/topics/01.01.Overview.md
+++ b/juneau-docs-poc/docs/topics/01.01.Overview.md
@@ -51,7 +51,6 @@ version through the following repository:
</snapshots>
</pluginRepository>
</pluginRepositories>
-
```
Each of the components are also packaged as stand-alone OSGi modules.
diff --git a/juneau-docs-poc/docs/topics/02.02.Marshallers-test.md
b/juneau-docs-poc/docs/topics/02.02.Marshallers-test.md
deleted file mode 100644
index d5985116b..000000000
--- a/juneau-docs-poc/docs/topics/02.02.Marshallers-test.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: "Marshallers"
----
-
-[Marshallers](../apidocs/org/apache/juneau/marshaller/Marshaller.html) are
simple pairings of a
[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html)
-and [Parser](../apidocs/org/apache/juneau/parser/Parser.html) with convenience
methods for serializing and parsing POJOs.
-- [Marshaller](../apidocs/org/apache/juneau/marshaller/Marshaller.html)
-`T` \{@link oaj.marshaller.Marshaller#read(Object,Class) read(Object,Class)\}
-- [CharMarshaller](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html)
-- `String`
[write(Object)](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html#write(Object))
-- [Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)
-- [Html](../apidocs/org/apache/juneau/marshaller/Html.html)
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- [OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)
-- [Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)
-- [Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)
-- [UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)
--
[StreamMarshaller](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html)
-- `byte[]`
[write(Object)](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html#write(Object))
-- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-##### Examples:
-// Using instance.
-Json json = new Json();
-MyPojo myPojo = json.read(string, MyPojo.class);
-String string = json.write(myPojo);
-// Using DEFAULT instance.
-MyPojo myPojo = Json.DEFAULT.read(string, MyPojo.class);
-String string = Json.DEFAULT.write(myPojo);
-Juneau comes with the following predefined marshallers:
-- [Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)
-- [Html](../apidocs/org/apache/juneau/marshaller/Html.html)
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-- [OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)
-- [Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)
-- [Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)
-- [UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)
-Each predefined marshaller also includes static convenience from/to methods to
make it even easier to
-perform marshalling on POJOs:
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- `String`
*[of(Object)](../apidocs/org/apache/juneau/marshaller/Json.html#of(Object))*
-`T` *\{@link oaj.marshaller.Json#to(Object,Class) to(Object,Class)\}*
-##### Examples:
-// Using shortcut static methods.
-MyPojo myPojo = Json.to(jsonString, MyPojo.class);
-String json = Json.of(myPojo);
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.02.Marshallers-test2.md
b/juneau-docs-poc/docs/topics/02.02.Marshallers-test2.md
deleted file mode 100644
index d5985116b..000000000
--- a/juneau-docs-poc/docs/topics/02.02.Marshallers-test2.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: "Marshallers"
----
-
-[Marshallers](../apidocs/org/apache/juneau/marshaller/Marshaller.html) are
simple pairings of a
[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html)
-and [Parser](../apidocs/org/apache/juneau/parser/Parser.html) with convenience
methods for serializing and parsing POJOs.
-- [Marshaller](../apidocs/org/apache/juneau/marshaller/Marshaller.html)
-`T` \{@link oaj.marshaller.Marshaller#read(Object,Class) read(Object,Class)\}
-- [CharMarshaller](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html)
-- `String`
[write(Object)](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html#write(Object))
-- [Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)
-- [Html](../apidocs/org/apache/juneau/marshaller/Html.html)
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- [OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)
-- [Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)
-- [Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)
-- [UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)
--
[StreamMarshaller](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html)
-- `byte[]`
[write(Object)](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html#write(Object))
-- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-##### Examples:
-// Using instance.
-Json json = new Json();
-MyPojo myPojo = json.read(string, MyPojo.class);
-String string = json.write(myPojo);
-// Using DEFAULT instance.
-MyPojo myPojo = Json.DEFAULT.read(string, MyPojo.class);
-String string = Json.DEFAULT.write(myPojo);
-Juneau comes with the following predefined marshallers:
-- [Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)
-- [Html](../apidocs/org/apache/juneau/marshaller/Html.html)
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-- [OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)
-- [Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)
-- [Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)
-- [UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)
-Each predefined marshaller also includes static convenience from/to methods to
make it even easier to
-perform marshalling on POJOs:
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- `String`
*[of(Object)](../apidocs/org/apache/juneau/marshaller/Json.html#of(Object))*
-`T` *\{@link oaj.marshaller.Json#to(Object,Class) to(Object,Class)\}*
-##### Examples:
-// Using shortcut static methods.
-MyPojo myPojo = Json.to(jsonString, MyPojo.class);
-String json = Json.of(myPojo);
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.02.Marshallers.md
b/juneau-docs-poc/docs/topics/02.02.Marshallers.md
index 109abdf41..af45963f9 100644
--- a/juneau-docs-poc/docs/topics/02.02.Marshallers.md
+++ b/juneau-docs-poc/docs/topics/02.02.Marshallers.md
@@ -5,16 +5,16 @@ title: "Marshallers"
[Marshallers](../apidocs/org/apache/juneau/marshaller/Marshaller.html) are
simple pairings of a
[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html)
and [Parser](../apidocs/org/apache/juneau/parser/Parser.html) with convenience
methods for serializing and parsing POJOs.
+<tree>
<java-abstract-class>[Marshaller](../apidocs/org/apache/juneau/marshaller/Marshaller.html)</java-abstract-class>
-><java-method>`T`
[read(Object,Class<T>)](../apidocs/org/apache/juneau/marshaller/Marshaller.html#read)</java-method>
->><java-abstract-class>[CharMarshaller](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html)</java-abstract-class>
->>><java-method>`String`
[write(Object)](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html#write)</java-method>
->>>><javac-class>[Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)</javac-class> <javac-class>[Html](../apidocs/org/apache/juneau/marshaller/Html.html)</javac-class> <javac-class>[Json](../apidocs/org/apache/juneau/marshaller/Json.html)</javac-class> <javac-class>[OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)</javac-class> <javac-class>[PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)</javac-class>
[...]
-
->><java-abstract-class>[StreamMarshaller](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html)</java-abstract-class>
->>><java-method>`byte[]`
[write(Object)](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html#write)</java-method>
->>>><javac-class>[MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)</javac-class>
-
+<node-1><java-method>`T`
[read(Object,Class<T>)](../apidocs/org/apache/juneau/marshaller/Marshaller.html#read)</java-method></node-1>
+<node-2><java-abstract-class>[CharMarshaller](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html)</java-abstract-class></node-2>
+<node-3><java-method>`String`
[write(Object)](../apidocs/org/apache/juneau/marshaller/CharMarshaller.html#write)</java-method></node-3>
+<node-4><javac-class>[Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)</javac-class> <javac-class>[Html](../apidocs/org/apache/juneau/marshaller/Html.html)</javac-class> <javac-class>[Json](../apidocs/org/apache/juneau/marshaller/Json.html)</javac-class> <javac-class>[OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)</javac-class> <javac-class>[PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)</javac-class>&n
[...]
+<node-2><java-abstract-class>[StreamMarshaller](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html)</java-abstract-class></node-2>
+<node-3><java-method>`byte[]`
[write(Object)](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html#write)</java-method></node-3>
+<node-4><javac-class>[MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)</javac-class></node-4>
+</tree>
:::tip Examples
@@ -32,34 +32,34 @@ String string = Json.DEFAULT.write(myPojo);
```
:::
-
Juneau comes with the following predefined marshallers:
-- [Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)
-- [Html](../apidocs/org/apache/juneau/marshaller/Html.html)
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-- [OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)
-- [Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)
-- [Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)
-- [UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)
+
+<java-class>[Csv](../apidocs/org/apache/juneau/marshaller/Csv.html)</java-class>
+<java-class>[Html](../apidocs/org/apache/juneau/marshaller/Html.html)</java-class>
+<java-class>[Json](../apidocs/org/apache/juneau/marshaller/Json.html)</java-class>
+<java-class>[MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)</java-class>
+<java-class>[OpenApi](../apidocs/org/apache/juneau/marshaller/OpenApi.html)</java-class>
+<java-class>[PlainText](../apidocs/org/apache/juneau/marshaller/PlainText.html)</java-class>
+<java-class>[Json5](../apidocs/org/apache/juneau/marshaller/Json5.html)</java-class>
+<java-class>[Uon](../apidocs/org/apache/juneau/marshaller/Uon.html)</java-class>
+<java-class>[UrlEncoding](../apidocs/org/apache/juneau/marshaller/UrlEncoding.html)</java-class>
+<java-class>[Xml](../apidocs/org/apache/juneau/marshaller/Xml.html)</java-class>
Each predefined marshaller also includes static convenience from/to methods to
make it even easier to
perform marshalling on POJOs:
-- [Json](../apidocs/org/apache/juneau/marshaller/Json.html)
-- `String`
*[of(Object)](../apidocs/org/apache/juneau/marshaller/Json.html#of(Object))*
-`T` *\{@link oaj.marshaller.Json#to(Object,Class) to(Object,Class)\}*
+<tree>
+<java-class>[Json](../apidocs/org/apache/juneau/marshaller/Json.html)</java-class>
+<node-1><java-method>`String`
[of(Object)](../apidocs/org/apache/juneau/marshaller/Json.html#of(Object))</java-method></node-1>
+<node-1><java-method>`T`
[to(Object,Class)](../apidocs/org/apache/juneau/marshaller/Json.html#to(Object,Class))</java-method></node-1>
+</tree>
:::tip Examples
-
```java
// Using shortcut static methods.
MyPojo myPojo = Json.to(jsonString, MyPojo.class);
String json = Json.of(myPojo);
-
```
:::
diff --git a/juneau-docs-poc/docs/topics/02.03.SerializersAndParsers.md
b/juneau-docs-poc/docs/topics/02.03.SerializersAndParsers.md
index 8bbce5770..ea469ecf5 100644
--- a/juneau-docs-poc/docs/topics/02.03.SerializersAndParsers.md
+++ b/juneau-docs-poc/docs/topics/02.03.SerializersAndParsers.md
@@ -4,11 +4,14 @@ title: "Serializers and Parsers"
One of the goals of Juneau was to make serialization as simple as possible.
In a single line of code, you should be able to serialize and parse most POJOs.
+
Despite this simplicity, Juneau provides lots of extensibility and
configuration properties for tailoring how
POJOs are serialized and parsed.
+
The built-in serializers in Juneau are fast, efficient, and highly
configurable.
They work by serializing POJOs directly to streams instead of using
intermediate Document Object Model
objects.
+
In most cases, you can serialize objects in one line of code by using one of
the default serializers:
```java
@@ -22,42 +25,38 @@ public class Person {
Person person = new Person();
// Produces:
-// "{\"name\":\"John Smith\",\"age\":21}"
+// "{\"name\":\"John Smith\",\"age\":21}"
String json = JsonSerializer.DEFAULT.serialize(person);
// Produces:
-// "{name:'John Smith',age:21}"
+// "{name:'John Smith',age:21}"
String json = Json5Serializer.DEFAULT.serialize(person);
// Produces:
-//
-// John Smith
-// 21
-//
+// John Smith
+// 21
String xml = XmlSerializer.DEFAULT.serialize(person);
// Produces:
-//
-// keyvalue
-// nameJohn Smith
-// age21
+// keyvalue
+// nameJohn Smith
+// age21
//
String html = HtmlSerializer.DEFAULT.serialize(person);
// Produces:
-// "(name='John Smith',age=21)"
+// "(name='John Smith',age=21)"
String uon = UonSerializer.DEFAULT.serialize(person);
// Produces:
-// "name='John+Smith'&age=21"
+// "name='John+Smith'&age=21"
String urlencoding = UrlEncodingSerializer.DEFAULT.serialize(person);
// Produces:
-// 82 A4 6E 61 6D 65 AA 4A 6F 68 6E 20 53 6D 69 74 68 A3 61 67 65 15
+// 82 A4 6E 61 6D 65 AA 4A 6F 68 6E 20 53 6D 69 74 68 A3 61 67 65 15
byte[] bytes = MsgPackSerializer.DEFAULT.serialize(person);
```
-
In addition to the default serializers, customized serializers can be created
using various built-in options:
```java
@@ -74,14 +73,15 @@ JsonSerializer serializer =
JsonSerializer.DEFAULT.copy().sq().build();
String json = serializer.serialize(someObject);
```
-
Default serialization support is provided for Java primitives, `Maps`,
`Collections`,
beans, and arrays.
Extensible support for other data types such as `Calendars`, `Dates`,
`Iterators` is available through the use of POJO swaps (described later).
+
Parsers work by parsing input directly into POJOs instead of having to create
intermediate Document Object
Models.
This allows them to parse input with minimal object creation.
+
Like the serializers, you can often parse objects in one line of code by using
one of the default parsers:
```java
@@ -119,7 +119,6 @@ List list = parser.parse(json, LinkedList.class,
Integer.class);
int[] ints = parser.parse(json, int[].class);
```
-
The parsers can also be used to populating existing bean and collection
objects:
```java
@@ -142,16 +141,15 @@ Map map = new TreeMap();
parser.parseIntoMap(json, map, String.class, Person.class);
```
-
In the example above, we're parsing "lax" JSON (single quotes, unquoted
attributes).
The JSON parser can handle any valid JSON syntax (such as quoted or unquoted
attributes, single or double
quotes).
It can also handle JSON fragments and embedded Javascript comments.
+
Many of the JSON examples provided will use lax syntax which is easier to read
since we don't have to deal
with escapes.
:::info See Also
-
[ImageSerializer](../apidocs/org/apache/juneau/examples/serializer/ImageSerializer.html)
- Example of a custom serializer.
- [ImageParser](../apidocs/org/apache/juneau/examples/parser/ImageParser.html)
- Example of a custom parser.
-
:::
diff --git a/juneau-docs-poc/docs/topics/02.04.01.BeanAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.01.BeanAnnotation.md
index 1e4ff6c61..715cbd6b6 100644
--- a/juneau-docs-poc/docs/topics/02.04.01.BeanAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.01.BeanAnnotation.md
@@ -4,6 +4,7 @@ title: "@Bean Annotation"
The [@Bean](../apidocs/org/apache/juneau/annotation/Bean.html) annotation is
used to tailor how beans are
interpreted by the framework.
+
Bean property inclusion and ordering on a bean class can be done using the
[@Bean(properties|p)](../apidocs/org/apache/juneau/annotation/Bean.html#properties())
annotation.
@@ -14,7 +15,6 @@ Bean property inclusion and ordering on a bean class can be
done using the
public class Address { ... }
```
-
Bean properties can be excluded using the
[@Bean(excludeProperties|xp)](../apidocs/org/apache/juneau/annotation/Bean.html#excludeProperties())
annotation.
@@ -25,7 +25,6 @@ annotation.
public class Address { ... }
```
-
Bean properties can be sorted alphabetically using
[@Bean(sort)](../apidocs/org/apache/juneau/annotation/Bean.html#sort())
```java
@@ -35,9 +34,9 @@ Bean properties can be sorted alphabetically using
[@Bean(sort)](../apidocs/org/
public class MyBean { ... }
```
-
The
[@Bean(propertyNamer)](../apidocs/org/apache/juneau/annotation/Bean.html#propertyNamer())
annotation
is used to provide customized naming of properties.
+
Property namers are used to transform bean property names from standard form
to some other form.
For example, the
[PropertyNamerDLC](../apidocs/org/apache/juneau/PropertyNamerDLC.html) will
convert property names to
dashed-lowercase, and these will be used as attribute names in JSON and
element names in XML.
@@ -48,7 +47,6 @@ dashed-lowercase, and these will be used as attribute names
in JSON and element
public class MyBean { ... }
```
-
The
[@Bean(interfaceClass)](../apidocs/org/apache/juneau/annotation/Bean.html#interfaceClass)
annotation is used
to limit properties on beans to specific interface classes.
When specified, only the list of properties defined on the interface class
will be used during
@@ -72,13 +70,14 @@ String result = Json5.of(a1);
assertEquals("{f0:'f0'}", result); // Note f1 is not serialized.
```
-
Note that this annotation can be used on the parent class so that it filters
to all child classes.
Or can be set individually on the child classes.
+
The
[@Bean(stopClass)](../apidocs/org/apache/juneau/annotation/Bean.html#stopClass)
annotation is another
way to limit which properties are serialized (except from the opposite
direction).
-It's identical in purpose to the stop class specified by \{@link
java.beans.Introspector#getBeanInfo(Class, Class)\}.
+It's identical in purpose to the stop class specified by
[Introspector.getBeanInfo(Class,Class)](TODO.md).
Any properties in the stop class or in its base classes will be ignored during
analysis.
+
For example, in the following class hierarchy, instances of `C3` will include
property
`p3` but not `p1` or `p2`.
@@ -97,7 +96,6 @@ public class C3 extends C2 {
}
```
-
The
[@Bean(interceptor)](../apidocs/org/apache/juneau/annotation/Bean.html#interceptor())
annotation
and [BeanInterceptor](../apidocs/org/apache/juneau/swap/BeanInterceptor.html)
class can be used to perform interception
and inline handling of bean getter and setter calls.
@@ -129,7 +127,6 @@ public class Address {
}
```
-
The [@Bean(on)](../apidocs/org/apache/juneau/annotation/Bean.html#on()) and
[@Bean(onClass)](../apidocs/org/apache/juneau/annotation/Bean.html#onClass())
annotations can be used to programmatically attach @Bean annotations to
classes.
@@ -142,5 +139,4 @@ JsonSerializer serializer = JsonSerializer
.create()
.applyAnnotations(MyAnnotatedClass.class)
.build();
-
```
diff --git a/juneau-docs-poc/docs/topics/02.04.02.BeanpAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.02.BeanpAnnotation.md
index 9c5543a3e..af5e33dfd 100644
--- a/juneau-docs-poc/docs/topics/02.04.02.BeanpAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.02.BeanpAnnotation.md
@@ -4,6 +4,7 @@ title: "@Beanp Annotation"
The [@Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html) annotation is
used to tailor how
individual bean properties are interpreted by the framework.
+
The [@Beanp(name)](../apidocs/org/apache/juneau/annotation/Beanp.html#name())
annotation
is used to override the name of the bean property.
@@ -14,7 +15,6 @@ public class MyBean {
}
```
-
The [@Name](../apidocs/org/apache/juneau/annotation/Name.html) annotation is a
shortcut for specifying a bean property name:
```java
@@ -24,7 +24,6 @@ public class MyBean {
}
```
-
If the
[beanFieldVisibility](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanFieldVisibility(Visibility))
setting on the bean context excludes this field
(e.g. the visibility is set to the default of PUBLIC but the field is
PROTECTED), this annotation
can be used to force the field to be identified as a property.
@@ -36,13 +35,13 @@ public class MyBean {
}
```
-
The bean property named "*" is the designated "dynamic property" which allows
for "extra" bean
properties not otherwise defined.
This is similar in concept to the Jackson @JsonGetterAll and @JsonSetterAll
annotations but generalized for all supported marshall languages.
The primary purpose is for backwards compatibility in parsing newer streams
with addition
information into older beans.
+
The following shows various ways of using dynamic bean properties.
```java
@@ -82,7 +81,6 @@ public class BeanWithDynaGetterOnly {
}
```
-
Similar rules apply for value types and swaps.
The property values optionally can be any serializable type or use swaps.
@@ -106,13 +104,14 @@ public class BeanWithDynaFieldWithSwappedValues {
}
```
-
Note that if you're not interested in these additional properties, you can
also use the
[ignoreUnknownBeanProperties](../apidocs/org/apache/juneau/BeanContext/Builder.html#ignoreUnknownBeanProperties())
setting to ignore values
that don't fit into existing properties.
+
The
[@Beanp(value)](../apidocs/org/apache/juneau/annotation/Beanp.html#value())
annotation
is a synonym for
[@Beanp(name)](../apidocs/org/apache/juneau/annotation/Beanp.html#name()).
Use it in cases where you're only specifying a name so that you can shorten
your annotation.
+
The following annotations are equivalent:
```java
@@ -121,13 +120,13 @@ The following annotations are equivalent:
@Beanp("foo")
```
-
The [@Beanp(type)](../apidocs/org/apache/juneau/annotation/Beanp.html#type())
annotation
is used to identify a specialized class type for a generalized property.
Normally the type is inferred through reflection of the field type or getter
return type.
However, you'll want to specify this value if you're parsing beans where the
bean property class
is an interface or abstract class to identify the bean type to instantiate.
Otherwise, you may cause an
[InstantiationException](../apidocs/java/lang/InstantiationException.html) when
trying to set these fields.
+
This property must denote a concrete class with a no-arg constructor.
```java
@@ -139,7 +138,6 @@ public class MyBean {
}
```
-
The
[@Beanp(params)](../apidocs/org/apache/juneau/annotation/Beanp.html#params())
annotation
is for bean properties of type map or collection.
It's used to identify the class types of the contents of the bean property
object when
@@ -154,19 +152,17 @@ public class MyBean {
}
```
-
The
[@Beanp(properties)](../apidocs/org/apache/juneau/annotation/Beanp.html#properties())
annotation is used to limit which child properties are rendered by the
serializers.
+
It can be used on any of the following bean property types:
- Beans - Only render the specified properties of the bean.
- Maps - Only render the specified entries in the map.
- Bean/Map arrays - Same but applied to each element in the array.
- Bean/Map collections - Same but applied to each element in the collection.
-
```java
public class MyClass {
-
// Only render 'f1' when serializing this bean property.
@Beanp(properties={"f1"})
public MyChildClass x1 = new MyChildClass();
@@ -181,7 +177,6 @@ public class MyChildClass {
String json = Json.of(new MyClass());
```
-
The
[@Beanp(format)](../apidocs/org/apache/juneau/annotation/Beanp.html#format())
annotation specifies a String format for converting a bean property value to a
formatted string.
@@ -189,5 +184,4 @@ annotation specifies a String format for converting a bean
property value to a f
// Serialize a float as a string with 2 decimal places.
@Beanp(format="$%.2f")
public float price;
-
```
diff --git a/juneau-docs-poc/docs/topics/02.04.03.BeancAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.03.BeancAnnotation.md
index 2689f4d2c..0d3387d71 100644
--- a/juneau-docs-poc/docs/topics/02.04.03.BeancAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.03.BeancAnnotation.md
@@ -4,8 +4,10 @@ title: "@Beanc Annotation"
The [@Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html) annotation is
used to
map constructor arguments to property names on bean with read-only properties.
+
Since method parameter names are lost during compilation, this annotation
essentially redefines
them so that they are available at runtime.
+
The definition of a read-only bean is a bean with properties with only
getters, like shown below:
```java
@@ -33,7 +35,6 @@ public class Person {
}
```
-
```java
// Parsing into a read-only bean.
String json = "{name:'John Smith',age:45}";
@@ -42,8 +43,8 @@ String name = person.getName(); // "John Smith"
int age = person.getAge(); // 45
```
-
Beans can also be defined with a combination of read-only and read-write
properties.
+
The [@Name](../apidocs/org/apache/juneau/annotation/Name.html) annotation can
also be used instead of `@Beanc(properties)`:
```java
@@ -54,6 +55,5 @@ public Person(@Name("name") String name, @Name("age") int
age) {
}
```
-
-If neither `@Beanc(properties)` or @Name is used to identify the bean property
names,
+If neither `@Beanc(properties)` or
[@Name](../apidocs/org/apache/juneau/annotation/Name.html) is used to identify
the bean property names,
we will try to use the parameter names if they are available in the bytecode.
diff --git a/juneau-docs-poc/docs/topics/02.04.04.BeanIgnoreAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.04.BeanIgnoreAnnotation.md
index 5ad913bd6..5406b498b 100644
--- a/juneau-docs-poc/docs/topics/02.04.04.BeanIgnoreAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.04.BeanIgnoreAnnotation.md
@@ -4,6 +4,7 @@ title: "@BeanIgnore Annotation"
The [@BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html)
annotation is used to
ignore classes, fields, and methods from being interpreted as beans or bean
components.
+
When applied to classes, objects will be converted to strings even though they
look like beans.
```java
@@ -12,7 +13,6 @@ When applied to classes, objects will be converted to strings
even though they l
public class MyBean {...}
```
-
When applied to fields and getters/setters, they will be ignored as bean
properties.
```java
@@ -26,5 +26,4 @@ public class MyBean {
@BeanIgnore
public String getBar() {...}
}
-
```
diff --git a/juneau-docs-poc/docs/topics/02.04.05.NamePropertyAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.05.NamePropertyAnnotation.md
index 446561412..d352484e9 100644
--- a/juneau-docs-poc/docs/topics/02.04.05.NamePropertyAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.05.NamePropertyAnnotation.md
@@ -4,6 +4,7 @@ title: "@NameProperty Annotation"
The [@NameProperty](../apidocs/org/apache/juneau/annotation/NameProperty.html)
annotation is used to
identify a setter as a method for setting the name of a POJO as it's known by
its parent object.
+
A commonly-used case is when you're parsing a JSON map containing beans where
one of the bean
properties is the key used in the map.
@@ -15,7 +16,6 @@ properties is the key used in the map.
}
```
-
```java
public class Person {
@@ -26,5 +26,4 @@ public class Person {
public char sex;
}
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.04.06.ParentPropertyAnnotation.md
b/juneau-docs-poc/docs/topics/02.04.06.ParentPropertyAnnotation.md
index 785169f78..1298a69fd 100644
--- a/juneau-docs-poc/docs/topics/02.04.06.ParentPropertyAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.04.06.ParentPropertyAnnotation.md
@@ -4,6 +4,7 @@ title: "@ParentProperty Annotation"
The
[@ParentProperty](../apidocs/org/apache/juneau/annotation/ParentProperty.html)
annotation is used to
identify a setter as a method for adding a parent reference to a child object.
+
A commonly-used case is when you're parsing beans and a child bean has a
reference to a parent bean.
```java
@@ -22,5 +23,4 @@ public class Person {
}
```
-
Parsers will automatically set this field for you in the child beans.
diff --git a/juneau-docs-poc/docs/topics/02.04.07.PojoBuilders.md
b/juneau-docs-poc/docs/topics/02.04.07.PojoBuilders.md
index 0a7bf3626..babf2d9bb 100644
--- a/juneau-docs-poc/docs/topics/02.04.07.PojoBuilders.md
+++ b/juneau-docs-poc/docs/topics/02.04.07.PojoBuilders.md
@@ -4,15 +4,16 @@ title: "POJO Builders"
Juneau parsers can use builders to instantiate POJOs.
This is useful in cases where you want to create beans with read-only
properties.
+
Note that while it's possible to do this using the
[@Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html)
annotation, using builders can often be cleaner.
+
A typical builder usage is shown below:
```java
MyBean bean = MyBean.create().foo("foo").bar(123).build();
```
-
The typical code for such a builder using a static inner class is shown below:
```java
@@ -60,37 +61,25 @@ public class MyBean {
}
```
-
The POJO class can be any type including beans.
Builders MUST be beans with one or more writable properties.
-The bean properties themselves do not need to be readable (i.e. getters are
optional).
+ - The bean properties themselves do not need to be readable (i.e. getters are
optional).
+
Builders require two parts:
- A way to detect and instantiate a builder using reflection.
- A way to instantiate a POJO from a builder.
The first can be accomplished through **any** of the following:
-- A static `create()` method on the POJO class that returns a builder instance.
-
-public static Builder create() \{...\}
+- A static `create()` method on the POJO class that returns a builder
instance. `public static Builder create() {...}`
- A public constructor on the POJO class that takes in a single parameter that
implements the [Builder](../apidocs/org/apache/juneau/swap/Builder.html)
interface.
+ - The builder class must have a public no-arg constructor. `public
MyBean(Builder builder) {...}`
+ - A [@Builder](../apidocs/org/apache/juneau/annotation/Builder.html)
annotation on the POJO class to explicitly identify it.`@Builder(Builder.class)
public class MyBean {...}`
+ - The builder class must have a public no-arg constructor.
-The builder class must have a public no-arg constructor.
-public MyBean(Builder builder) \{...\}
-- A [@Builder](../apidocs/org/apache/juneau/annotation/Builder.html)
annotation on the POJO class to explicitly identify it.
-
-The builder class must have a public no-arg constructor.
-@Builder(Builder.class)
-public class MyBean \{...\}
The second can be accomplished through **any** of the following:
-- The existence of a `build()` method on the builder class.
-
-public MyBean build() \{...\}
-- The existence of a public constructor on the POJO class that takes in the
builder instance.
-
-public MyBean(Builder builder) \{...\}
+- The existence of a public constructor on the POJO class that takes in the
builder instance. `public MyBean(Builder builder) {...}`
:::info See Also
-- [Builder](../apidocs/org/apache/juneau/annotation/Builder.html)
-- [Builder](../apidocs/org/apache/juneau/swap/Builder.html)
-
-:::
+-
[org.apache.juneau.annotation.Builder](../apidocs/org/apache/juneau/annotation/Builder.html)
+-
[org.apache.juneau.swap.Builder](../apidocs/org/apache/juneau/swap/Builder.html)
+:::
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.04.08.BypassSerialization.md
b/juneau-docs-poc/docs/topics/02.04.08.BypassSerialization.md
index 858b5a408..a362c83e3 100644
--- a/juneau-docs-poc/docs/topics/02.04.08.BypassSerialization.md
+++ b/juneau-docs-poc/docs/topics/02.04.08.BypassSerialization.md
@@ -16,11 +16,12 @@ public class MyBean {
String json = Json5.of(new MyBean());
```
-
-Note that if you're serializing Readers and InputStreams, it's up to you to
make sure you're producing
+Note that if you're serializing `Readers` and `InputStreams`, it's up to you
to make sure you're producing
valid output (in this case JSON).
+
A more typical scenario where this is useful is by using swaps to convert
POJOs to Readers whose
contents are determined via the
[BeanSession#getMediaType()](../apidocs/org/apache/juneau/BeanSession.html#getMediaType())
method.
+
In the following example, we're customizing the JSON output for a particular
bean type but leaving
all other renditions as-is:
@@ -40,8 +41,9 @@ public class MyBeanSwapSometimes extends ObjectSwap {
}
```
-
+:::warning
Due to the nature of the RDF serializers, Readers and InputStreams are
serialized as literals,
not as RDF text.
This is due to the fact that the RDF serializers use a DOM for serialization
so we don't have
access to the underlying stream.
+:::
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
b/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
index 0becda4d6..f7773ad97 100644
--- a/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
+++ b/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
@@ -4,12 +4,14 @@ title: "Bean Contexts"
At the heart of the marshalling APIs is the [Bean
Context](../apidocs/org/apache/juneau/BeanContext.html) API that provides a
common
framework for marshalling beans and POJOs across all serializers and parsers.
+
All serializers and parsers (and their builders) extend from the bean context
API classes.
+
One important feature of the bean context API is the ability to wrap Java
beans inside maps to allow
properties to be accessed through a Map layer. Although this is used
internally by all the serializers and parsers,
it's often useful to use this feature by itself.
-:::tip Example
+:::tip Example
```java
// Wrap a bean in a map and do some simple get/set calls.
@@ -18,12 +20,10 @@ myBeanMap.put("myProperty", 123);
int myProperty = myBeanMap.get("myProperty", int.class);
```
+:::
The bean context API provides many settings that fine-tune how POJOs should be
handled during marshalling.
-:::
-
:::info See Also
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
-
+-
[org.apache.juneau.BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
:::
diff --git a/juneau-docs-poc/docs/topics/02.05.JavaBeansSupport.md
b/juneau-docs-poc/docs/topics/02.05.JavaBeansSupport.md
index 69ef98bae..e5710689e 100644
--- a/juneau-docs-poc/docs/topics/02.05.JavaBeansSupport.md
+++ b/juneau-docs-poc/docs/topics/02.05.JavaBeansSupport.md
@@ -4,8 +4,9 @@ title: "Java Beans Support"
Out-of-the-box, Juneau supports marshalling of Java beans with standard public
getters and setters, public
fields, and fluent setters (e.g. `withX` naming convention). There are also
many settings and
-annotations that can be used to customize how bean properties are detected.
The following is an example of
-some of the ways to define bean properties:
+annotations that can be used to customize how bean properties are detected.
+
+The following is an example of some of the ways to define bean properties:
```java
public class MyBean {
@@ -51,24 +52,29 @@ public class MyBean {
}
```
-
Several settings exist to allow you to customize how bean properties are
handled by serializers and parsers:
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
--
[beanClassVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanClassVisibility(Visibility))
--
[beanConstructorVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanConstructorVisibility(Visibility))
--
[beanFieldVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanFieldVisibility(Visibility))
--
[beanMethodVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanMethodVisibility(Visibility))
--
[beansRequireDefaultConstructor()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireDefaultConstructor())
--
[beansRequireSerializable()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireSerializable())
--
[beansRequireSettersForGetters()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireSettersForGetters())
--
[disableBeansRequireSomeProperties()](../apidocs/org/apache/juneau/BeanContext/Builder.html#disableBeansRequireSomeProperties())
+
+<tree>
+<java-class>[org.apache.juneau.BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[beanClassVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanClassVisibility(Visibility))</java-method></node-1>
+<node-1><java-method>[beanConstructorVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanConstructorVisibility(Visibility))</java-method></node-1>
+<node-1><java-method>[beanFieldVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanFieldVisibility(Visibility))</java-method></node-1>
+<node-1><java-method>[beanMethodVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanMethodVisibility(Visibility))</java-method></node-1>
+<node-1><java-method>[beansRequireDefaultConstructor()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireDefaultConstructor())</java-method></node-1>
+<node-1><java-method>[beansRequireSerializable()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireSerializable())</java-method></node-1>
+<node-1><java-method>[beansRequireSettersForGetters()](../apidocs/org/apache/juneau/BeanContext/Builder.html#beansRequireSettersForGetters())</java-method></node-1>
+<node-1><java-method>[disableBeansRequireSomeProperties()](../apidocs/org/apache/juneau/BeanContext/Builder.html#disableBeansRequireSomeProperties())</java-method></node-1>
+</tree>
Settings and equivalent annotations are also available to control which
properties are marshalled and how they are ordered.
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
-- \{@link oaj.BeanContext.Builder#beanProperties(Class,String)
beanProperties(Class,String)\}
-- \{@link oaj.BeanContext.Builder#beanPropertiesExcludes(Class,String)
beanPropertiesExcludes(Class,String)\}
-- \{@link oaj.BeanContext.Builder#beanPropertiesReadOnly(Class,String)
beanPropertiesReadOnly(Class,String) \}
-- \{@link oaj.BeanContext.Builder#beanPropertiesWriteOnly(Class,String)
beanPropertiesWriteOnly(Class,String)\}
+
+<tree>
+<java-class>[org.apache.juneau.BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[beanProperties(Class,String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanProperties(Class,String))</java-method></node-1>
+<node-1><java-method>[beanPropertiesExcludes(Class,String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanPropertiesExcludes(Class,String))</java-method></node-1>
+<node-1><java-method>[beanPropertiesReadOnly(Class,String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanPropertiesReadOnly(Class,String))</java-method></node-1>
+<node-1><java-method>[beanPropertiesWriteOnly(Class,String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanPropertiesWriteOnly(Class,String))</java-method></node-1>
+</tree>
It's common to use the
[@Bean(properties|p)](../apidocs/org/apache/juneau/annotation/Bean.html#properties)
annotation to force the ordering
of properties during marshalling. IBM JVMs keep the ordering of fields and
methods in the compiled bytecodebut
@@ -83,9 +89,7 @@ public class MyBean {
}
```
-
:::info See Also
- [TODO: POJO Categories](TODO.md) - Marshalling rules for POJOs.
- [TODO: Bean Dictionaries](TODO.md) - Handling properties with subclassable
types.
-
:::
diff --git a/juneau-docs-poc/docs/topics/02.06.HttpPartSerializersParsers.md
b/juneau-docs-poc/docs/topics/02.06.HttpPartSerializersParsers.md
index 9cb50069a..ff6784829 100644
--- a/juneau-docs-poc/docs/topics/02.06.HttpPartSerializersParsers.md
+++ b/juneau-docs-poc/docs/topics/02.06.HttpPartSerializersParsers.md
@@ -28,8 +28,8 @@ String output = OpenApi.of(HttpPartType.HEADER, schema,
value);
long[][] value = OpenApi.to(HttpPartType.HEADER, schema, output,
long[][].class);
```
-
The
[HttpPartSchema](../apidocs/org/apache/juneau/httppart/HttpPartSchema.html)
class also provides convenience static methods for creation of custom schemas.
+
The equivalent to the schema above can be structured like so:
```java
@@ -39,13 +39,15 @@ import static org.apache.juneau.httppart.HttpPartSchema.*;
HttpPartSchema schema = tArrayPipes(tArrayCsv(tInt64())).build();
```
-
The class hierarchy for the part marshallers are:
--
[HttpPartSerializer](../apidocs/org/apache/juneau/httppart/HttpPartSerializer.html)
--
[SimplePartSerializer](../apidocs/org/apache/juneau/httppart/SimplePartSerializer.html)
- Serializes directly to strings.
-- [UonSerializer](../apidocs/org/apache/juneau/uon/UonSerializer.html) -
Serializes to UON notation.
--
[OpenApiSerializer](../apidocs/org/apache/juneau/oapi/OpenApiSerializer.html) -
Serializes using Open-API schema rules.
-- [HttpPartParser](../apidocs/org/apache/juneau/httppart/HttpPartParser.html)
--
[SimplePartParser](../apidocs/org/apache/juneau/httppart/SimplePartParser.html)
- Parses directly from strings.
-- [UonParser](../apidocs/org/apache/juneau/uon/UonParser.html) - Parses from
UON notation.
-- [OpenApiParser](../apidocs/org/apache/juneau/oapi/OpenApiParser.html) -
Parses using Open-API schema rules.
+
+<tree>
+<java-annotation>[HttpPartSerializer](../apidocs/org/apache/juneau/httppart/HttpPartSerializer.html)</java-annotation>
+<node-1><java-class>[SimplePartSerializer](../apidocs/org/apache/juneau/httppart/SimplePartSerializer.html)</java-class>
- Serializes directly to strings.</node-1>
+<node-2><java-class>[UonSerializer](../apidocs/org/apache/juneau/uon/UonSerializer.html)</java-class>
- Serializes to UON notation.</node-2>
+<node-3><java-class>[OpenApiSerializer](../apidocs/org/apache/juneau/oapi/OpenApiSerializer.html)</java-class>
- Serializes using Open-API schema rules.</node-3>
+<java-annotation>[HttpPartParser](../apidocs/org/apache/juneau/httppart/HttpPartParser.html)</java-annotation>
+<node-1><java-class>[SimplePartParser](../apidocs/org/apache/juneau/httppart/SimplePartParser.html)</java-class>
- Parses directly from strings.</node-1>
+<node-2><java-class>[UonParser](../apidocs/org/apache/juneau/uon/UonParser.html)</java-class>
- Parses from UON notation.</node-2>
+<node-3><java-class>[OpenApiParser](../apidocs/org/apache/juneau/oapi/OpenApiParser.html)</java-class>
- Parses using Open-API schema rules.</node-3>
+</tree>
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.07.ContextSettings.md
b/juneau-docs-poc/docs/topics/02.07.ContextSettings.md
index bb7b52411..d5473ff2a 100644
--- a/juneau-docs-poc/docs/topics/02.07.ContextSettings.md
+++ b/juneau-docs-poc/docs/topics/02.07.ContextSettings.md
@@ -4,6 +4,7 @@ title: "Context Settings"
Serializers and parsers have a wide variety of configurable settings. Their
builders all extend from the
[Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html) class that
allows you to easily construct new instances from scratch or build upon
existing instances.
+
For example, the following code shows how to configure a JSON serializer:
```java
@@ -16,18 +17,21 @@ WriterSerializer serializer = JsonSerializer
.build(); // Create a JsonSerializer
```
-
However, each of the serializers and parsers already contain reusable
instances with common configurations.
+
For example, JSON has the following predefined reusable serializers and
parsers:
-- [JsonSerializer](../apidocs/org/apache/juneau/json/JsonSerializer.html)
-- [DEFAULT](../apidocs/org/apache/juneau/json/JsonSerializer.html#DEFAULT)
--
[DEFAULT_READABLE](../apidocs/org/apache/juneau/json/JsonSerializer.html#DEFAULT_READABLE)
-- [Json5Serializer](../apidocs/org/apache/juneau/json/Json5Serializer.html)
-- [DEFAULT](../apidocs/org/apache/juneau/json/Json5Serializer.html#DEFAULT)
--
[DEFAULT_READABLE](../apidocs/org/apache/juneau/json/Json5Serializer.html#DEFAULT_READABLE)
-- [JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html)
-- [DEFAULT](../apidocs/org/apache/juneau/json/JsonParser.html#DEFAULT)
--
[DEFAULT_STRICT](../apidocs/org/apache/juneau/json/JsonParser.html#DEFAULT_STRICT)
+
+<tree>
+<java-class>[JsonSerializer](../apidocs/org/apache/juneau/json/JsonSerializer.html)</java-class>
+<node-1><java-field>[DEFAULT](../apidocs/org/apache/juneau/json/JsonSerializer.html#DEFAULT)</java-field></node-1>
+<node-1><java-field>[DEFAULT_READABLE](../apidocs/org/apache/juneau/json/JsonSerializer.html#DEFAULT_READABLE)</java-field></node-1>
+<java-class>[Json5Serializer](../apidocs/org/apache/juneau/json/Json5Serializer.html)</java-class>
+<node-1><java-field>[DEFAULT](../apidocs/org/apache/juneau/json/Json5Serializer.html#DEFAULT)</java-field></node-1>
+<node-1><java-field>[DEFAULT_READABLE](../apidocs/org/apache/juneau/json/Json5Serializer.html#DEFAULT_READABLE)</java-field></node-1>
+<java-class>[JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html)</java-class>
+<node-1><java-field>[DEFAULT](../apidocs/org/apache/juneau/json/JsonParser.html#DEFAULT)</java-field></node-1>
+<node-1><java-field>[DEFAULT_STRICT](../apidocs/org/apache/juneau/json/JsonParser.html#DEFAULT_STRICT)</java-field></node-1>
+</tree>
These can be used directly, as follows:
@@ -36,7 +40,6 @@ These can be used directly, as follows:
String json = Json5Serializer.DEFAULT.serialize(myPojo);
```
-
For performance reasons, serializers and parsers are immutable.
However, they can be 'copied' and modified using the `copy()` method.
@@ -48,8 +51,9 @@ WriterSerializer serializer = Json5Serializer.DEFAULT
.build();
```
-
Default values for configurable settings can be set globally using either
system properties or environment variables.
+
For example, the default `useWhitespace` setting can be set by either the
system property "WriterSerializer.useWhitespace"
or environment variable "WRITERSERIALIZER_USEWHITESPACE".
+
The builder setters will identify when default values can be set this way.
diff --git a/juneau-docs-poc/docs/topics/02.08.ContextAnnotations.md
b/juneau-docs-poc/docs/topics/02.08.ContextAnnotations.md
index 2ef66801a..ef0b58474 100644
--- a/juneau-docs-poc/docs/topics/02.08.ContextAnnotations.md
+++ b/juneau-docs-poc/docs/topics/02.08.ContextAnnotations.md
@@ -4,7 +4,8 @@ title: "Context Annotations"
All configurable properties described in the previous section have annotation
equivalents that can be applied on
classes or methods.
-In the section on the REST server API, we describe how to configure
serializers and parsers using @XConfig
+
+In the section on the REST server API, we describe how to configure
serializers and parsers using `@XConfig`
annotations like those shown below:
```java
@@ -22,11 +23,12 @@ public class AddressBookResource extends BasicRestServlet {
}
```
-
Config annotations defined on classes and methods can be applied to
serializers and parsers using the following methods:
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
-- \{@link oaj.BeanContext.Builder#applyAnnotations(Class...)
applyAnnotations(Class...)\}
-- \{@link oaj.BeanContext.Builder#applyAnnotations(Method...)
applyAnnotations(Method...)\}
+<tree>
+<java-class>[org.apache.juneau.BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[applyAnnotations(Class...)](../apidocs/org/apache/juneau/BeanContext/Builder.html#applyAnnotations(Class...))</java-method></node-1>
+<node-1><java-method>[applyAnnotations(Method...)](../apidocs/org/apache/juneau/BeanContext/Builder.html#applyAnnotations(Method...))</java-method></node-1>
+</tree>
The following example shows how annotations defined on a dummy class can be
applied to a serializer:
@@ -39,31 +41,36 @@ WriterSerializer serializer =
JsonSerializer.create().applyAnnotations(DummyClas
String json = serializer.toString(addressBean);
```
-
Config annotations are provided for all serializers and parsers:
-- [BeanConfig](../apidocs/org/apache/juneau/annotation/BeanConfig.html)
-- [CsvConfig](../apidocs/org/apache/juneau/csv/annotation/CsvConfig.html)
-- [HtmlConfig](../apidocs/org/apache/juneau/html/annotation/HtmlConfig.html)
--
[HtmlDocConfig](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html)
-- [JsonConfig](../apidocs/org/apache/juneau/json/annotation/JsonConfig.html)
--
[JsonSchemaConfig](../apidocs/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html)
--
[MsgPackConfig](../apidocs/org/apache/juneau/msgpack/annotation/MsgPackConfig.html)
--
[OpenApiConfig](../apidocs/org/apache/juneau/oapi/annotation/OpenApiConfig.html)
--
[ParserConfig](../apidocs/org/apache/juneau/parser/annotation/ParserConfig.html)
--
[PlainTextConfig](../apidocs/org/apache/juneau/plaintext/annotation/PlainTextConfig.html)
--
[SerializerConfig](../apidocs/org/apache/juneau/serializer/annotation/SerializerConfig.html)
--
[SoapXmlConfig](../apidocs/org/apache/juneau/soap/annotation/SoapXmlConfig.html)
-- [UonConfig](../apidocs/org/apache/juneau/uon/annotation/UonConfig.html)
--
[UrlEncodingConfig](../apidocs/org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html)
-- [XmlConfig](../apidocs/org/apache/juneau/xml/annotation/XmlConfig.html)
+
+<tree>
+<java-class>[BeanConfig](../apidocs/org/apache/juneau/annotation/BeanConfig.html)</java-class>
+<java-class>[CsvConfig](../apidocs/org/apache/juneau/csv/annotation/CsvConfig.html)</java-class>
+<java-class>[HtmlConfig](../apidocs/org/apache/juneau/html/annotation/HtmlConfig.html)</java-class>
+<java-class>[HtmlDocConfig](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html)</java-class>
+<java-class>[JsonConfig](../apidocs/org/apache/juneau/json/annotation/JsonConfig.html)</java-class>
+<java-class>[JsonSchemaConfig](../apidocs/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html)</java-class>
+<java-class>[MsgPackConfig](../apidocs/org/apache/juneau/msgpack/annotation/MsgPackConfig.html)</java-class>
+<java-class>[OpenApiConfig](../apidocs/org/apache/juneau/oapi/annotation/OpenApiConfig.html)</java-class>
+<java-class>[ParserConfig](../apidocs/org/apache/juneau/parser/annotation/ParserConfig.html)</java-class>
+<java-class>[PlainTextConfig](../apidocs/org/apache/juneau/plaintext/annotation/PlainTextConfig.html)</java-class>
+<java-class>[SerializerConfig](../apidocs/org/apache/juneau/serializer/annotation/SerializerConfig.html)</java-class>
+<java-class>[SoapXmlConfig](../apidocs/org/apache/juneau/soap/annotation/SoapXmlConfig.html)</java-class>
+<java-class>[UonConfig](../apidocs/org/apache/juneau/uon/annotation/UonConfig.html)</java-class>
+<java-class>[UrlEncodingConfig](../apidocs/org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html)</java-class>
+<java-class>[XmlConfig](../apidocs/org/apache/juneau/xml/annotation/XmlConfig.html)</java-class>
+</tree>
Annotations normally applied to bean classes/methods/fields/parameters
can also be programmatically attatched to beans by using the "on" or "onClass"
annotation values as seen
on the @Bean annotation in the example above.
-These include:
+
Annotations can also be applied directly to serializers and parsers using the
following method:
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
-- \{@link oaj.BeanContext.Builder#annotations(Annotation...)
annotations(Annotation...)\}
+
+<tree>
+<java-class>[Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[annotations(Annotation...)](../apidocs/org/apache/juneau/BeanContext/Builder.html#annotations(Annotation...))</java-method></node-1>
+</tree>
The following example shows a concrete implementation of an annotation can be
applied to a serializer:
@@ -75,7 +82,6 @@ WriterSerializer serializer =
JsonSerializer.create().annotations(ba).build();
String json = serializer.toString(addressBean); // Will print street,city,state
```
-
Concrete annotation implementations are provided for all annotations.
Any number of matching config or concrete annotations can be applied. They
are applied in the order they are provided
to the context. Therefore any values can be overridden. Config and concrete
annotations also override any class or method
@@ -88,5 +94,4 @@ public class Address {...}
Bean beanAnnotation = new
BeanAnnotation("Address").properties("street,city,state");
WriterSerializer serializer =
JsonSerializer.create().annotations(beanAnnotation).build();
String json = serializer.toString(addressBean); // Will print
street,city,state
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.09.JsonMap.md
b/juneau-docs-poc/docs/topics/02.09.JsonMap.md
index be5ce7f74..46201ce5e 100644
--- a/juneau-docs-poc/docs/topics/02.09.JsonMap.md
+++ b/juneau-docs-poc/docs/topics/02.09.JsonMap.md
@@ -6,33 +6,29 @@ The
[JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html) and [JsonLi
representations of JSON objects and arrays.
These classes can be used to create "unstructured" models for serialization
(as opposed to "structured"
models consisting of beans).
+
If you want to quickly generate JSON/XML/HTML from generic maps/collections,
or parse JSON/XML/HTML into
generic maps/collections, these classes work well.
+
These classes extend directly from the following JCF classes:
--
-[java.util.LinkedHashMap](../apidocs/java/util/LinkedHashMap.html)
--
-[org.apache.juneau.collections.JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html)
--
-[java.util.LinkedList](../apidocs/java/util/LinkedList.html)
--
-[org.apache.juneau.collections.JsonList](../apidocs/org/apache/juneau/collections/JsonList.html)
-The JsonMap and JsonList classes are very similar to the JSONObject and
-JSONArray classes found in other libraries.
-However, the names were chosen because the concepts of Maps and Lists are
already familiar to
+<tree>
+<java-class>[java.util.LinkedHashMap](../apidocs/java/util/LinkedHashMap.html)</java-class>
+<node-1><java-class>[org.apache.juneau.collections.JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html)</java-class></node-1>
+<java-class>[java.util.LinkedList](../apidocs/java/util/LinkedList.html)</java-class>
+<node-1><java-class>[org.apache.juneau.collections.JsonList](../apidocs/org/apache/juneau/collections/JsonList.html)</java-class></node-1>
+</tree>
+
+The [JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html) and
[JsonList](../apidocs/org/apache/juneau/collections/JsonList.html) classes are
very similar to the `JSONObject` and
+`JSONArray` classes found in other libraries.
+However, the names were chosen because the concepts of `Maps` and `Lists` are
already familiar to
Java programmers, and these classes can be used with any of the serializers or
parsers.
-These object can be serialized in one of two ways:
--
-Using the provided \{@link oaj.collections.JsonMap#writeTo(java.io.Writer)\} or
-\{@link oaj.collections.JsonList#writeTo(java.io.Writer)\} methods.
--
-Passing them to one of the
[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html) serialize
methods.
--
-Simply calling the
[JsonMap#asJson()](../apidocs/org/apache/juneau/collections/JsonMap.html#asJson())/[JsonMap#toString()](../apidocs/org/apache/juneau/collections/JsonMap.html#toString())
or
[JsonList#asString()](../apidocs/org/apache/juneau/collections/JsonList.html#asString())/[JsonList#toString()](../apidocs/org/apache/juneau/collections/JsonList.html#toString())
-methods which will serialize it as Simplified JSON.
-Any valid JSON can be parsed into an unstructured model consisting of generic
-[JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html) and
[JsonList](../apidocs/org/apache/juneau/collections/JsonList.html) objects.
-(Any valid XML can also be parsed into an unstructured model)
+
+These object can be serialized in one of three ways:
+- Using the provided
[JsonMap.writeTo(java.io.Writer)](../apidocs/org/apache/juneau/collections/JsonMap.html#writeTo(java.io.Writer))
or
[JsonList.writeTo(java.io.Writer)](../apidocs/org/apache/juneau/collections/JsonList.html#writeTo(java.io.Writer))
methods.
+- Passing them to one of the
[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html) serialize
methods.
+- Simply calling the
[JsonMap#asJson()](../apidocs/org/apache/juneau/collections/JsonMap.html#asJson())/[JsonMap#toString()](../apidocs/org/apache/juneau/collections/JsonMap.html#toString())
or
[JsonList#asString()](../apidocs/org/apache/juneau/collections/JsonList.html#asString())/[JsonList#toString()](../apidocs/org/apache/juneau/collections/JsonList.html#toString())
methods which will serialize it as Simplified JSON.
+
+Any valid JSON can be parsed into an unstructured model consisting of generic
[JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html) and
[JsonList](../apidocs/org/apache/juneau/collections/JsonList.html) objects.
(Any valid XML can also be parsed into an unstructured model)
```java
// Parse an arbitrary JSON document into an unstructered data model
@@ -54,8 +50,7 @@ json = map.toString();
json = map.asJson();
```
-
-The `JsonMap` and `JsonList` classes have many convenience features:
+The [JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html) and
[JsonList](../apidocs/org/apache/juneau/collections/JsonList.html) classes have
many convenience features:
```java
// Convert the map to a bean.
@@ -84,6 +79,5 @@ String xml = map.serializeTo(XmlSerializer.DEFAULT);
map.inner(anotherMap);
```
-
As a general rule, if you do not specify a target type during parsing, or if
the target type cannot be
-determined through reflection, the parsers automatically generate JsonMaps and
JsonLists.
+determined through reflection, the parsers automatically generate `JsonMap`
and `JsonList` objects.
diff --git a/juneau-docs-poc/docs/topics/02.10.ComplexDataTypes.md
b/juneau-docs-poc/docs/topics/02.10.ComplexDataTypes.md
index 585bc1a92..f63b58a13 100644
--- a/juneau-docs-poc/docs/topics/02.10.ComplexDataTypes.md
+++ b/juneau-docs-poc/docs/topics/02.10.ComplexDataTypes.md
@@ -4,9 +4,12 @@ title: "Complex Data Types"
The Juneau parsers have the ability to parse into complex data types that
consist of multidimensional arrays and nested maps and collections
using the methods below:
-- [Parser](../apidocs/org/apache/juneau/parser/Parser.html)
-- \{@link oaj.parser.Parser#parse(Object,Class) parse(Object,Class)\}
-- \{@link oaj.parser.Parser#parse(Object,Type,Type...)
parse(Object,Type,Type...)\}
+
+<tree>
+<java-class>[Parser](../apidocs/org/apache/juneau/parser/Parser.html)</java-class>
+<node-1><java-method>[parse(Object,Class)](../apidocs/org/apache/juneau/parser/Parser.html#parse(Object,Class))</java-method></node-1>
+<node-1><java-method>[parse(Object,Type,Type...)](../apidocs/org/apache/juneau/parser/Parser.html#parse(Object,Type,Type...))</java-method></node-1>
+</tree>
Arrays are simple enough and can be constructed using the first method:
@@ -15,14 +18,14 @@ String json = "[1,2,3]";
int[] array = Json.to(json, int[].class);
```
-
-For data types consisting of nested collections an maps such as `Map>`, you
need to
+For data types consisting of nested collections an maps such as `Map`, you
need to
use the second parse method that allows you to define the parameter types of
the collections classes.
+
For example:
```java
String json = "{foo:[{bar:'baz'}]}";
-TreeMap> map = Json.to(
+TreeMap map = Json.to(
json, // Input being parsed.
TreeMap.class, // Top-level data type.
String.class, // Key type of map.
@@ -31,9 +34,9 @@ TreeMap> map = Json.to(
);
```
-
`Collection` classes are assumed to be followed by zero or one objects
indicating the element type.
+
`Map` classes are assumed to be followed by zero or two meta objects
indicating the key and value types.
The arguments can be arbitrarily long to indicate arbitrarily complex data
structures.
-Similar methods for converting to complex types can be found on the
[RequestContent](../apidocs/org/apache/juneau/rest/httppart/RequestContent.html)
and
[RequestHttpPart](../apidocs/org/apache/juneau/rest/httppart/RequestHttpPart.html)
classes,
-and the \{@link oaj.BeanSession#convertToType(Object,Type,Type...)\} method.
+
+Similar methods for converting to complex types can be found on the
[RequestContent](../apidocs/org/apache/juneau/rest/httppart/RequestContent.html)
and
[RequestHttpPart](../apidocs/org/apache/juneau/rest/httppart/RequestHttpPart.html)
classes, and the
[BeanSession.convertToType(Object,Type,Type...)](../apidocs/org/apache/juneau/BeanSession.html#convertToType(Object,Type,Type...))
method.
diff --git a/juneau-docs-poc/docs/topics/02.11.01.DefaultSwaps.md
b/juneau-docs-poc/docs/topics/02.11.01.DefaultSwaps.md
index e33919190..9cbde9443 100644
--- a/juneau-docs-poc/docs/topics/02.11.01.DefaultSwaps.md
+++ b/juneau-docs-poc/docs/topics/02.11.01.DefaultSwaps.md
@@ -3,24 +3,25 @@ title: "Default Swaps"
---
By default, all serializers and parsers have built in `ObjectSwaps` defined
for the following common data types:
-- [Enumeration](../apidocs/java/util/Enumeration.html)
-- [Iterator](../apidocs/java/util/Iterator.html)
-- [Locale](../apidocs/java/util/Locale.html)
-- [Class](../apidocs/java/lang/Class.html)
-- [Calendar](../apidocs/java/util/Calendar.html)
-- [Date](../apidocs/java/util/Date.html)
-- [Instant](../apidocs/java/time/Instant.html)
-- [ZonedDateTime](../apidocs/java/time/ZonedDateTime.html)
-- [LocalDate](../apidocs/java/time/LocalDate.html)
-- [LocalDateTime](../apidocs/java/time/LocalDateTime.html)
-- [LocalTime](../apidocs/java/time/LocalTime.html)
-- [OffsetDateTime](../apidocs/java/time/OffsetDateTime.html)
-- [OffsetTime](../apidocs/java/time/OffsetTime.html)
-- [Year](../apidocs/java/time/Year.html)
-- [YearMonth](../apidocs/java/time/YearMonth.html)
-- [Temporal](../apidocs/java/time/temporal/Temporal.html)
-- [TimeZone](../apidocs/java/util/TimeZone.html)
--
[XMLGregorianCalendar](../apidocs/javax/xml/datatype/XMLGregorianCalendar.html)
-- [ZoneId](../apidocs/java/time/ZoneId.html)
+
+<java-class>[Enumeration](../apidocs/java/util/Enumeration.html)</java-class>
+<java-class>[Iterator](../apidocs/java/util/Iterator.html)</java-class>
+<java-class>[Locale](../apidocs/java/util/Locale.html)</java-class>
+<java-class>[Class](../apidocs/java/lang/Class.html)</java-class>
+<java-class>[Calendar](../apidocs/java/util/Calendar.html)</java-class>
+<java-class>[Date](../apidocs/java/util/Date.html)</java-class>
+<java-class>[Instant](../apidocs/java/time/Instant.html)</java-class>
+<java-class>[ZonedDateTime](../apidocs/java/time/ZonedDateTime.html)</java-class>
+<java-class>[LocalDate](../apidocs/java/time/LocalDate.html)</java-class>
+<java-class>[LocalDateTime](../apidocs/java/time/LocalDateTime.html)</java-class>
+<java-class>[LocalTime](../apidocs/java/time/LocalTime.html)</java-class>
+<java-class>[OffsetDateTime](../apidocs/java/time/OffsetDateTime.html)</java-class>
+<java-class>[OffsetTime](../apidocs/java/time/OffsetTime.html)</java-class>
+<java-class>[Year](../apidocs/java/time/Year.html)</java-class>
+<java-class>[YearMonth](../apidocs/java/time/YearMonth.html)</java-class>
+<java-class>[Temporal](../apidocs/java/time/temporal/Temporal.html)</java-class>
+<java-class>[TimeZone](../apidocs/java/util/TimeZone.html)</java-class>
+<java-class>[XMLGregorianCalendar](../apidocs/javax/xml/datatype/XMLGregorianCalendar.html)</java-class>
+<java-class>[ZoneId](../apidocs/java/time/ZoneId.html)</java-class>
Various other swaps are provided in the
[swaps](../apidocs/org/apache/juneau/swaps.html) package.
diff --git a/juneau-docs-poc/docs/topics/02.11.02.AutoSwaps.md
b/juneau-docs-poc/docs/topics/02.11.02.AutoSwaps.md
index 5eb985bd4..cb9aaadf6 100644
--- a/juneau-docs-poc/docs/topics/02.11.02.AutoSwaps.md
+++ b/juneau-docs-poc/docs/topics/02.11.02.AutoSwaps.md
@@ -4,36 +4,39 @@ title: "Auto-detected swaps"
Various methods can be defined on a class directly to affect how it gets
serialized.
This can often be simpler than using `ObjectSwaps`.
+
Objects serialized as `Strings` can be parsed back into their original objects
by
implementing one of the following methods on the class:
--
-`public static T fromString(String)` method.
+- `public static T fromString(String)` method.
+
Any of the following method names also work:
- `valueOf(String)`
- `parse(String)`
- `parseString(String)`
- `forName(String)`
- `forString(String)`
-
--
-`public T(String)` constructor.
-Note that these methods cover conversion from several built-in Java types,
meaning the parsers can
-automatically construct these objects from strings:
-- `fromString(String)` - [UUID](../apidocs/java/util/UUID.html)
-- `valueOf(String)` - [Boolean](../apidocs/java/lang/Boolean.html),
[Byte](../apidocs/java/lang/Byte.html),
-
-[Double](../apidocs/java/lang/Double.html),
[Float](../apidocs/java/lang/Float.html),
-[Integer](../apidocs/java/lang/Integer.html),
[Long](../apidocs/java/lang/Long.html),
[Short](../apidocs/java/lang/Short.html), [Date](../apidocs/java/sql/Date.html),
-[Time](../apidocs/java/sql/Time.html),
[Timestamp](../apidocs/java/sql/Timestamp.html)
-- `parse(String)` - [DateFormat](../apidocs/java/text/DateFormat.html),
[MessageFormat](../apidocs/java/text/MessageFormat.html),
-
-[NumberFormat](../apidocs/java/text/NumberFormat.html),
[Date](../apidocs/java/util/Date.html),
[Level](../apidocs/java/util/logging/Level.html)
-- `parseString(String)` -
[DatatypeConverter](../apidocs/javax/xml/bind/DatatypeConverter.html)
-- `forName(String)` - [Class](../apidocs/java/lang/Class.html)
+- `public T(String)` constructor.
+
+Note that these methods cover conversion from several built-in Java types,
meaning the parsers can automatically construct these objects from strings:
+- `fromString(String)`
+ - [UUID](../apidocs/java/util/UUID.html)
+- `valueOf(String)`
+ - [Boolean](../apidocs/java/lang/Boolean.html),
[Byte](../apidocs/java/lang/Byte.html),
+ - [Double](../apidocs/java/lang/Double.html),
[Float](../apidocs/java/lang/Float.html),
+ - [Integer](../apidocs/java/lang/Integer.html),
[Long](../apidocs/java/lang/Long.html),
[Short](../apidocs/java/lang/Short.html), [Date](../apidocs/java/sql/Date.html),
+ - [Time](../apidocs/java/sql/Time.html),
[Timestamp](../apidocs/java/sql/Timestamp.html)
+- `parse(String)`
+ - [DateFormat](../apidocs/java/text/DateFormat.html),
[MessageFormat](../apidocs/java/text/MessageFormat.html),
+ - [NumberFormat](../apidocs/java/text/NumberFormat.html),
[Date](../apidocs/java/util/Date.html),
[Level](../apidocs/java/util/logging/Level.html)
+- `parseString(String)`
+ - [DatatypeConverter](../apidocs/javax/xml/bind/DatatypeConverter.html)
+- `forName(String)`
+ - [Class](../apidocs/java/lang/Class.html)
If you want to force a bean-like class to be serialized as a string, you can
use the
[@BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html)
annotation on the class to force it to be
serialized to a string using the `toString()` method.
+
Serializing to other intermediate objects can be accomplished by defining a
swap method directly on the
class:
- `public X swap()` method, where `X` is any serializable object.
@@ -61,8 +64,10 @@ Can be any type of map with string keys and object vals.
The `BeanSession` parameter allows you access to various information about the
current
serialization session.
+
For example, you could provide customized results based on the media type
being produced
([BeanSession#getMediaType()](../apidocs/org/apache/juneau/BeanSession.html#getMediaType())).
+
The following example shows how an HTML5 form template object can be created
that gets serialized as a
populated HTML5 [Form](../apidocs/org/apache/juneau/dto/html5/Form.html) bean.
@@ -96,7 +101,6 @@ public class FormTemplate {
}
```
-
Swapped objects can be converted back into their original form by the parsers
by specifying one of the
following methods:
- `public static T unswap(BeanSession, X)` method where `X` is the
@@ -144,5 +148,4 @@ public class FormTemplate {
);
}
}
-
```
diff --git a/juneau-docs-poc/docs/topics/02.11.03.PerMediaTypeSwaps.md
b/juneau-docs-poc/docs/topics/02.11.03.PerMediaTypeSwaps.md
index 6aa3c9a6a..1f3e052bb 100644
--- a/juneau-docs-poc/docs/topics/02.11.03.PerMediaTypeSwaps.md
+++ b/juneau-docs-poc/docs/topics/02.11.03.PerMediaTypeSwaps.md
@@ -3,13 +3,16 @@ title: "Per-media-type Swaps"
---
Swaps can also be defined per-media-type.
+
The
[ObjectSwap#forMediaTypes()](../apidocs/org/apache/juneau/swap/ObjectSwap.html#forMediaTypes())
method can be overridden to
provide a set of media types that the swap is invoked on.
+
It's also possible to define multiple swaps against the same object as long as
they're differentiated
by media type.
+
When multiple swaps are defined, the best-match media type is used.
-In the following example, we define 3 swaps against the same object.
-One for JSON, one for XML, and one for all other types.
+
+In the following example, we define 3 swaps against the same object. One for
JSON, one for XML, and one for all other types.
```java
public class ObjectSwapTest {
@@ -19,7 +22,7 @@ public class ObjectSwapTest {
public static class MyJsonSwap extends StringSwap {
@Override /* ObjectSwap */
public MediaType[] forMediaTypes() {
- return MediaType.forStrings("*/json");
+ return MediaType.forStrings("*/json");
}
@Override /* ObjectSwap */
public String swap(BeanSession session, MyPojo pojo) throws Exception {
@@ -30,7 +33,7 @@ public class ObjectSwapTest {
public static class MyXmlSwap extends StringSwap {
@Override /* ObjectSwap */
public MediaType[] forMediaTypes() {
- return MediaType.forStrings("*/xml");
+ return MediaType.forStrings("*/xml");
}
@Override /* ObjectSwap */
public String swap(BeanSession session, MyPojo pojo) throws Exception {
@@ -41,7 +44,7 @@ public class ObjectSwapTest {
public static class MyOtherSwap extends StringSwap {
@Override /* ObjectSwap */
public MediaType[] forMediaTypes() {
- return MediaType.forStrings("*/*");
+ return MediaType.forStrings("*/*");
}
@Override /* ObjectSwap */
public String swap(BeanSession session, MyPojo pojo) throws Exception {
@@ -72,9 +75,9 @@ public class ObjectSwapTest {
}
```
-
When multiple swaps match the same media type, a best-match algorithm is
applied to find the correct
swap to use.
+
In later sections we describe how annotations can be used to shorten this
syntax:
```java
@@ -83,13 +86,12 @@ In later sections we describe how annotations can be used
to shorten this syntax
@Swap(MyOtherSwap.class)
public static class MyPojo {}
-@Swap(mediaTypes="*/json")
+@Swap(mediaTypes="*/json")
public static class MyJsonSwap extends ObjectSwap {...}
-@Swap(mediaTypes="*/xml")
+@Swap(mediaTypes="*/xml")
public static class MyXmlSwap extends ObjectSwap {...}
-@Swap(mediaTypes="*/*")
+@Swap(mediaTypes="*/*")
public static class MyOtherSwap extends ObjectSwap {...}
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.11.04.OneWaySwaps.md
b/juneau-docs-poc/docs/topics/02.11.04.OneWaySwaps.md
index 329fe6577..624c13970 100644
--- a/juneau-docs-poc/docs/topics/02.11.04.OneWaySwaps.md
+++ b/juneau-docs-poc/docs/topics/02.11.04.OneWaySwaps.md
@@ -7,11 +7,13 @@ reconstructing during parsing.
However, there are certain kinds of objects that we may want to support for
serializing but that are not
possible to reconstruct during parsing.
For these, we can use one-way object swaps.
-A one-way swap is simply an object transform that only implements the \{@code
swap()\} method.
-The \{@code unswap()\} method is simply left unimplemented.
-An example of a one-way swaps would be one that allows \{@code Iterators\} to
be serialized as JSON arrays.
-It can make sense to be able to render \{@code Iterators\} as arrays but in
general it's not possible to
-reconstruct an \{@code Iterator\} during parsing.
+
+A one-way swap is simply an object transform that only implements the `swap()`
method.
+The `unswap()` method is simply left unimplemented.
+
+An example of a one-way swaps would be one that allows `Iterators` to be
serialized as JSON arrays.
+It can make sense to be able to render `Iterators` as arrays but in general
it's not possible to
+reconstruct an `Iterator` during parsing.
```java
public class IteratorSwap extends ObjectSwap {
@@ -25,10 +27,8 @@ public class IteratorSwap extends ObjectSwap {
}
```
-
Here is an example of our one-way swap being used.
-Note that trying to parse the original object will cause a
[ParseException](../apidocs/org/apache/juneau/parser/ParseException.html)
-to be thrown.
+Note that trying to parse the original object will cause a
[ParseException](../apidocs/org/apache/juneau/parser/ParseException.html) to be
thrown.
```java
// Create a JSON serializer that can serialize Iterators.
@@ -43,5 +43,4 @@ String json = serializer.serialize(iterator); //
Produces "[1,2,3]"
// Try to parse it.
ReaderParser parser = JsonParser.create().swaps(IteratorSwap.class).build();
iterator = parser.parse(json, Iterator.class); // Throws
ParseException!!!
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.11.05.SwapAnnotation.md
b/juneau-docs-poc/docs/topics/02.11.05.SwapAnnotation.md
index c4c416959..87a713520 100644
--- a/juneau-docs-poc/docs/topics/02.11.05.SwapAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.11.05.SwapAnnotation.md
@@ -2,10 +2,8 @@
title: "@Swap Annotation"
---
-[@Swap](../apidocs/org/apache/juneau/annotation/Swap.html) can be used to
associate a swap class using an
-annotation.
-This is often cleaner than using the builder `swaps()` method since you can
keep
-your swap class near your POJO class.
+[@Swap](../apidocs/org/apache/juneau/annotation/Swap.html) can be used to
associate a swap class using an annotation.
+This is often cleaner than using the builder `swaps()` method since you can
keep your swap class near your POJO class.
```java
@Swap(MyObjectSwap.class)
@@ -15,7 +13,6 @@ public class MyPojo {
// Sample swap for converting MyPojo classes to a simple string.
public class MyObjectSwap extends ObjectSwap {
-
@Override /* ObjectSwap */
public String swap(BeanSession session, MyPojo pojo) {
return pojo.toSomeSerializableForm();
@@ -23,7 +20,6 @@ public class MyObjectSwap extends ObjectSwap {
}
```
-
Multiple swaps can be associated with a class using multiple
[@Swap](../apidocs/org/apache/juneau/annotation/Swap.html) annotations:
```java
@@ -33,7 +29,6 @@ Multiple swaps can be associated with a class using multiple
[@Swap](../apidocs/
public class MyPojo {}
```
-
`Readers` get serialized directly to the output of a serializer.
Therefore it's possible to implement a swap that provides fully-customized
output.
@@ -50,8 +45,7 @@ public class MyJsonSwap extends ObjectSwap {
}
```
-
-The @Swap annotation can also be used on getters and setters as well to apply
a swap
+The `@Swap` annotation can also be used on getters and setters as well to
apply a swap
to individual property values:
```java
@@ -66,7 +60,6 @@ public class MyBean {
}
```
-
When applied to bean properties, the swap annotation need only be applied to
either the getter, setter, or field.
The swap annotation can also be applied to the private field of a bean
property, like so:
@@ -85,5 +78,4 @@ public class MyBean {
return this;
}
}
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.11.06.TemplatedSwaps.md
b/juneau-docs-poc/docs/topics/02.11.06.TemplatedSwaps.md
index 1bb9b3b49..701c33bc9 100644
--- a/juneau-docs-poc/docs/topics/02.11.06.TemplatedSwaps.md
+++ b/juneau-docs-poc/docs/topics/02.11.06.TemplatedSwaps.md
@@ -7,6 +7,7 @@ arbitrary contextual strings with swaps.
The primary purpose is for providing template names, such as for Apache
FreeMarker, therefore
the name 'template'.
However, the usage of the string is open-ended.
+
For example, you could pair a template string like so:
```java
@@ -14,7 +15,6 @@ For example, you could pair a template string like so:
public class MyPojo {}
```
-
The implementation of the FreeMarker swap would look something like this:
```java
@@ -32,5 +32,4 @@ public class FreeMarkerSwap extends ObjectSwap {
return getFreeMarkerReader(template, object);
}
}
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.11.07.SurrogateClasses.md
b/juneau-docs-poc/docs/topics/02.11.07.SurrogateClasses.md
index 6fc1ad156..828d7387e 100644
--- a/juneau-docs-poc/docs/topics/02.11.07.SurrogateClasses.md
+++ b/juneau-docs-poc/docs/topics/02.11.07.SurrogateClasses.md
@@ -3,8 +3,8 @@ title: "Surrogate Classes"
---
Surrogate classes are very similar in concept to `ObjectSwaps` except they're
simpler to define.
-For example, let's say we want to be able to serialize the following class but
it's not serializable for
-some reason (for example, there are no properties exposed):
+
+For example, let's say we want to be able to serialize the following class but
it's not serializable for some reason (for example, there are no properties
exposed):
```java
// Not serializable because it's not a bean because it has no public
properties.
@@ -13,7 +13,6 @@ public class MyNonSerializableClass {
}
```
-
This could be solved with the following `ObjectSwap`.
```java
@@ -26,7 +25,6 @@ public class MySerializableSurrogate {
public class MySwap extends ObjectSwap {
@Override /* ObjectSwap */
public MySerializableSurrogate swap(MyNonSerializableClass object) {
-
// Create some serializable class and manually copy the data into it.
MySerializableSurrogate surrogate = new MySerializableSurrogate();
surrogate.foo = object.foo;
@@ -35,9 +33,7 @@ public class MySwap extends ObjectSwap {
}
```
-
-However, the same can be accomplished by using a surrogate class that simply
contains a constructor with
-the non-serializable class as an argument:
+However, the same can be accomplished by using a surrogate class that simply
contains a constructor with the non-serializable class as an argument:
```java
public class MySerializableSurrogate {
@@ -50,7 +46,6 @@ public class MySerializableSurrogate {
}
```
-
The surrogate class is registered in the same way as a `ObjectSwap`:
```java
@@ -61,11 +56,9 @@ WriterSerializer serializer = JsonSerializer
.build();
```
-
When the serializer encounters the non-serializable class, it will serialize
an instance of the surrogate
instead.
:::info See Also
-- [Surrogate](../apidocs/org/apache/juneau/swap/Surrogate.html)
-
+<java-class>[Surrogate](../apidocs/org/apache/juneau/swap/Surrogate.html)</java-class>
:::
diff --git a/juneau-docs-poc/docs/topics/02.11.SerializerSetsParserSets.md
b/juneau-docs-poc/docs/topics/02.11.SerializerSetsParserSets.md
index baedb82b2..a143cda48 100644
--- a/juneau-docs-poc/docs/topics/02.11.SerializerSetsParserSets.md
+++ b/juneau-docs-poc/docs/topics/02.11.SerializerSetsParserSets.md
@@ -33,7 +33,6 @@ Person myPerson = parsers
.parse(myReader, Person.class);
```
-
The REST servlet API builds upon the `SerializerSet` and `ParserSet` classes
to provide annotated REST servlets that automatically negotiate the HTTP media
types and allow the developer
to work with requests and responses as POJOs.
diff --git a/juneau-docs-poc/docs/topics/02.12.Swaps.md
b/juneau-docs-poc/docs/topics/02.12.Swaps.md
index 8454bebbc..c73f9945a 100644
--- a/juneau-docs-poc/docs/topics/02.12.Swaps.md
+++ b/juneau-docs-poc/docs/topics/02.12.Swaps.md
@@ -4,13 +4,11 @@ title: "Swaps"
[Swaps](../apidocs/org/apache/juneau/swap/ObjectSwap.html) are a critical
component of Juneau.
They allow the serializers and parsers to handle Java objects that wouldn't
normally be serializable.
-Swaps are, simply put, 'object swappers' that swap in serializable objects for
-non-serializable ones during serialization, and vis-versa during parsing.
-Some examples of non-serializable objects are `File`, `Reader`,
-`Iterable`, etc...
+Swaps are, simply put, 'object swappers' that swap in serializable objects for
non-serializable ones during serialization, and vis-versa during parsing.
+
+Some examples of non-serializable objects are `File`, `Reader`, `Iterable`,
etc...
These are classes that aren't beans and cannot be represented as simple maps,
collections, or primitives.
-In the following example, we introduce a `ObjectSwap` that will swap in a bean
of a particular type
-with a map containing customized key-value pairs:
+In the following example, we introduce a `ObjectSwap` that will swap in a bean
of a particular type with a map containing customized key-value pairs:
```java
// Sample swap for converting a bean to a specialized map of key-value pairs.
@@ -32,7 +30,6 @@ public class MyBeanSwap extends ObjectSwap {
}
```
-
The swap can then be associated with serializers and parsers like so:
```java
@@ -45,9 +42,7 @@ ReaderParser parser =
JsonParser.create().swaps(MyBeanSwap.class).build();
MyBean bean = parser.parse(json, MyBean.class);
```
-
-Another example of a `ObjectSwap` is one that converts `byte[]` arrays to
-BASE64-encoded strings:
+Another example of a `ObjectSwap` is one that converts `byte[]` arrays to
BASE64-encoded strings:
```java
public class ByteArrayBase64Swap extends StringSwap {
@@ -75,7 +70,6 @@ public class ByteArrayBase64Swap extends StringSwap {
}
```
-
The following example shows the BASE64 swap in use:
```java
@@ -92,8 +86,7 @@ json = serializer.serialize(bytes2d); // Produces
"['AQID','BAUG',null
bytes2d = parser.parse(json, byte[][].class); // Reproduces
{{1,2,3},{4,5,6},null}
```
-
-The \{@link oaj.BeanContextable.Builder#swap(Class,Class,ThrowingFunction)\}
and \{@link
oaj.BeanContextable.Builder#swap(Class,Class,ThrowingFunction,ThrowingFunction)\}
+The
[Builder.swap(Class,Class,ThrowingFunction)](https://juneau.apache.org/site/apidocs-9.0.1/org/apache/juneau/BeanContextable.Builder.html#swap(java.lang.Class,java.lang.Class,org.apache.juneau.utils.ThrowingFunction))
and
[Builder.swap(Class,Class,ThrowingFunction,ThrowingFunction)](https://juneau.apache.org/site/apidocs-9.0.1/org/apache/juneau/BeanContextable.Builder.html#swap(java.lang.Class,java.lang.Class,org.apache.juneau.utils.ThrowingFunction,org.apache.juneau.utils.ThrowingFunction))
methods are another way to define swaps by using functions.
```java
@@ -103,5 +96,4 @@ WriterSerializer serializer = JsonSerializer
.simple()
.swap(MyBean.class, String.class, x -> myBeanStringifier(x))
.build();
-
```
diff --git a/juneau-docs-poc/docs/topics/02.13.01.BeanSubTypes.md
b/juneau-docs-poc/docs/topics/02.13.01.BeanSubTypes.md
index 451d8c767..1374df8b7 100644
--- a/juneau-docs-poc/docs/topics/02.13.01.BeanSubTypes.md
+++ b/juneau-docs-poc/docs/topics/02.13.01.BeanSubTypes.md
@@ -4,6 +4,7 @@ title: "Bean Subtypes"
In addition to the bean type name support described above, simplified support
is provided
for bean subtypes.
+
Bean subtypes are similar in concept to bean type names, except for the
following differences:
- You specify the list of possible subclasses through an annotation on a
parent bean class.
- You do not need to register the subtype classes on the bean dictionary of
the parser.
@@ -32,8 +33,7 @@ public class A2 extends A {
}
```
-
-When serialized, the subtype is serialized as a virtual "_type" property:
+When serialized, the subtype is serialized as a virtual `"_type"` property:
```java
A1 object = new A1();
@@ -42,11 +42,9 @@ String json = Json5.of(object);
assertEquals("{_type:'A1',f1:'f1',f0:'f0'}", json);
```
-
The following shows what happens when parsing back into the original object.
```java
A object = Json.to(json, A.class);
assertTrue(object instanceof A1);
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.13.DynamicallyAppliedAnnotations.md
b/juneau-docs-poc/docs/topics/02.13.DynamicallyAppliedAnnotations.md
index dec89354e..1bbec676f 100644
--- a/juneau-docs-poc/docs/topics/02.13.DynamicallyAppliedAnnotations.md
+++ b/juneau-docs-poc/docs/topics/02.13.DynamicallyAppliedAnnotations.md
@@ -2,8 +2,7 @@
title: "Dynamically Applied Annotations"
---
-In the section [TODO: Swaps](TODO.md), you were introduced to annotations that
can be applied to bean
-classes, methods, fields, and constructors such as
[@Bean](../apidocs/org/apache/juneau/annotation/Bean.html):
+In the section [TODO: Swaps](TODO.md), you were introduced to annotations that
can be applied to bean classes, methods, fields, and constructors such as
[@Bean](../apidocs/org/apache/juneau/annotation/Bean.html):
```java
// Address class with only street/city/state properties (in that order).
@@ -12,9 +11,7 @@ classes, methods, fields, and constructors such as
[@Bean](../apidocs/org/apache
public class Address { ... }
```
-
-An alternate way of applying these annotations is to attach them to unrelated
classes and methods and then
-tell your serializer or parser where to find them.
+An alternate way of applying these annotations is to attach them to unrelated
classes and methods and then tell your serializer or parser where to find them.
```java
// Unannotated class.
@@ -31,12 +28,9 @@ WriterSerializer serializer = JsonSerializer
String json = serializer.toString(addressBean);
```
+The advantage to this approach is it allows you to use Juneau annotations on
classes/methods/fields/constructors where you might not have access to the
source code, or when you only want to selectively apply the annotation under
certain scenarios instead of globally.
-The advantage to this approach is it allows you to use Juneau annotations on
classes/methods/fields/constructors
-where you might not have access to the source code, or when you only want to
selectively apply the annotation
-under certain scenarios instead of globally.
-For example, the following shows the @Bean annotation being selectively
applied on a single REST method
-(described later in juneau-rest-server):
+For example, the following shows the @Bean annotation being selectively
applied on a single REST method (described later in juneau-rest-server):
```java
@RestGet
@@ -44,94 +38,48 @@ For example, the following shows the @Bean annotation being
selectively applied
public List getAddresses() {}
```
-
Any Juneau annotation that has an `on()/onClass()` method can be applied
dynamically this way.
These include:
-- [Bean](../apidocs/org/apache/juneau/annotation/Bean.html)
-- [Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html)
-- [BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html)
-- [Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html)
-- [Example](../apidocs/org/apache/juneau/annotation/Example.html)
-- [NameProperty](../apidocs/org/apache/juneau/annotation/NameProperty.html)
-- [ParentProperty](../apidocs/org/apache/juneau/annotation/ParentProperty.html)
-- [Swap](../apidocs/org/apache/juneau/annotation/Swap.html)
-- [Uri](../apidocs/org/apache/juneau/annotation/Uri.html)
-- [Csv](../apidocs/org/apache/juneau/csv/annotation/Csv.html)
-- [Html](../apidocs/org/apache/juneau/html/annotation/Html.html)
-- [Json](../apidocs/org/apache/juneau/json/annotation/Json.html)
-- [Schema](../apidocs/org/apache/juneau/annotation/Schema.html)
-- [MsgPack](../apidocs/org/apache/juneau/msgpack/annotation/MsgPack.html)
-- [OpenApi](../apidocs/org/apache/juneau/oapi/annotation/OpenApi.html)
-- [PlainText](../apidocs/org/apache/juneau/plaintext/annotation/PlainText.html)
-- [SoapXml](../apidocs/org/apache/juneau/soap/annotation/SoapXml.html)
-- [Uon](../apidocs/org/apache/juneau/uon/annotation/Uon.html)
--
[UrlEncoding](../apidocs/org/apache/juneau/urlencoding/annotation/UrlEncoding.html)
-- [Xml](../apidocs/org/apache/juneau/xml/annotation/Xml.html)
+
+<java-annotation>[Bean](../apidocs/org/apache/juneau/annotation/Bean.html)</java-annotation>
+<java-annotation>[Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html)</java-annotation>
+<java-annotation>[BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html)</java-annotation>
+<java-annotation>[Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html)</java-annotation>
+<java-annotation>[Example](../apidocs/org/apache/juneau/annotation/Example.html)</java-annotation>
+<java-annotation>[NameProperty](../apidocs/org/apache/juneau/annotation/NameProperty.html)</java-annotation>
+<java-annotation>[ParentProperty](../apidocs/org/apache/juneau/annotation/ParentProperty.html)</java-annotation>
+<java-annotation>[Swap](../apidocs/org/apache/juneau/annotation/Swap.html)</java-annotation>
+<java-annotation>[Uri](../apidocs/org/apache/juneau/annotation/Uri.html)</java-annotation>
+<java-annotation>[Csv](../apidocs/org/apache/juneau/csv/annotation/Csv.html)</java-annotation>
+<java-annotation>[Html](../apidocs/org/apache/juneau/html/annotation/Html.html)</java-annotation>
+<java-annotation>[Json](../apidocs/org/apache/juneau/json/annotation/Json.html)</java-annotation>
+<java-annotation>[Schema](../apidocs/org/apache/juneau/annotation/Schema.html)</java-annotation>
+<java-annotation>[MsgPack](../apidocs/org/apache/juneau/msgpack/annotation/MsgPack.html)</java-annotation>
+<java-annotation>[OpenApi](../apidocs/org/apache/juneau/oapi/annotation/OpenApi.html)</java-annotation>
+<java-annotation>[PlainText](../apidocs/org/apache/juneau/plaintext/annotation/PlainText.html)</java-annotation>
+<java-annotation>[SoapXml](../apidocs/org/apache/juneau/soap/annotation/SoapXml.html)</java-annotation>
+<java-annotation>[Uon](../apidocs/org/apache/juneau/uon/annotation/Uon.html)</java-annotation>
+<java-annotation>[UrlEncoding](../apidocs/org/apache/juneau/urlencoding/annotation/UrlEncoding.html)</java-annotation>
+<java-annotation>[Xml](../apidocs/org/apache/juneau/xml/annotation/Xml.html)</java-annotation>
The valid pattern matches are:
- Classes:
-- Fully qualified:
-
-"com.foo.MyClass"
-- Fully qualified inner class:
-
-"com.foo.MyClass$Inner1$Inner2"
-- Simple:
-
-"MyClass"
-- Simple inner:
-
-"MyClass$Inner1$Inner2"
-"Inner1$Inner2"
-"Inner2"
+ - Fully qualified: `com.foo.MyClass`
+ - Fully qualified inner class: `com.foo.MyClass$Inner1$Inner2`
+ - Simple: `MyClass`
+ - Simple inner: `MyClass$Inner1$Inner2`, `Inner1$Inner2`, `Inner2`
- Methods:
-- Fully qualified with args:
-
-"com.foo.MyClass.myMethod(String,int)"
-"com.foo.MyClass.myMethod(java.lang.String,int)"
-"com.foo.MyClass.myMethod()"
-- Fully qualified:
-
-"com.foo.MyClass.myMethod"
-- Simple with args:
-
-"MyClass.myMethod(String,int)"
-"MyClass.myMethod(java.lang.String,int)"
-"MyClass.myMethod()"
-- Simple:
-
-"MyClass.myMethod"
-- Simple inner class:
-
-"MyClass$Inner1$Inner2.myMethod"
-"Inner1$Inner2.myMethod"
-"Inner2.myMethod"
+ - Fully qualified with args: `com.foo.MyClass.myMethod(String,int)`,
`com.foo.MyClass.myMethod(java.lang.String,int)`, `com.foo.MyClass.myMethod()`
+ - Fully qualified: `com.foo.MyClass.myMethod`
+ - Simple with args: `MyClass.myMethod(String,int)`,
`MyClass.myMethod(java.lang.String,int)`, `MyClass.myMethod()`
+ - Simple: `MyClass.myMethod`
+ - Simple inner class: `MyClass$Inner1$Inner2.myMethod`,
`Inner1$Inner2.myMethod`, `Inner2.myMethod`
- Fields:
-- Fully qualified:
-
-"com.foo.MyClass.myField"
-- Simple:
-
-"MyClass.myField"
-- Simple inner class:
-
-"MyClass$Inner1$Inner2.myField"
-"Inner1$Inner2.myField"
-"Inner2.myField"
+ - Fully qualified: `com.foo.MyClass.myField`
+ - Simple: `MyClass.myField`
+ - Simple inner class: `MyClass$Inner1$Inner2.myField`,
`Inner1$Inner2.myField`, `Inner2.myField`
- Constructors:
-- Fully qualified with args:
-
-"com.foo.MyClass(String,int)"
-"com.foo.MyClass(java.lang.String,int)"
-"com.foo.MyClass()"
-- Simple with args:
-
-"MyClass(String,int)"
-"MyClass(java.lang.String,int)"
-"MyClass()"
-- Simple inner class:
-
-"MyClass$Inner1$Inner2()"
-"Inner1$Inner2()"
-"Inner2()"
+ - Fully qualified with args: `com.foo.MyClass(String,int)`,
`com.foo.MyClass(java.lang.String,int)`, `com.foo.MyClass()`
+ - Simple with args: `MyClass(String,int)`,
`MyClass(java.lang.String,int)`, `MyClass()`
+ - Simple inner class: `MyClass$Inner1$Inner2()`, `Inner1$Inner2()`,
`Inner2()`
- A comma-delimited list of anything on this list.
diff --git a/juneau-docs-poc/docs/topics/02.14.BeanDictionaries.md
b/juneau-docs-poc/docs/topics/02.14.BeanDictionaries.md
index 4d4a2212b..a4652ad92 100644
--- a/juneau-docs-poc/docs/topics/02.14.BeanDictionaries.md
+++ b/juneau-docs-poc/docs/topics/02.14.BeanDictionaries.md
@@ -2,20 +2,17 @@
title: "Bean Names and Dictionaries"
---
-While parsing into beans, Juneau attempts to determine the class types of bean
properties through
-reflection on the bean property getter or setter.
-Often this is insufficient if the property type is an interface or abstract
class that cannot be
-instantiated.
+While parsing into beans, Juneau attempts to determine the class types of bean
properties through reflection on the bean property getter or setter.
+Often this is insufficient if the property type is an interface or abstract
class that cannot be instantiated.
This is where bean names and dictionaries come into play.
-Bean names and dictionaries are used for identifying class types when they
cannot be inferred through
-reflection.
-Bean classes are given names through the
[@Bean(typeName)](../apidocs/org/apache/juneau/annotation/Bean.html#typeName())
-annotation.
-These names are then added to the serialized output as virtual "_type"
properties (or element
-names in XML).
+
+Bean names and dictionaries are used for identifying class types when they
cannot be inferred through reflection.
+Bean classes are given names through the
[@Bean(typeName)](../apidocs/org/apache/juneau/annotation/Bean.html#typeName())
annotation.
+These names are then added to the serialized output as virtual "_type"
properties (or element names in XML).
+
On the parsing side, these type names are resolved to classes through the use
of bean dictionaries.
-For example, if a bean property is of type `Object`, then the serializer will
add
-"_type" attributes so that the class can be determined during parsing.
+
+For example, if a bean property is of type `Object`, then the serializer will
add `"_type"` attributes so that the class can be determined during parsing.
```java
@Bean(typeName="foo")
@@ -32,8 +29,7 @@ public class Bar {}
public class Baz {}
```
-
-When serialized as JSON, "_type" attributes would be added when needed to
infer the type during
+When serialized as JSON, `"_type"` attributes would be added when needed to
infer the type during
parsing:
```json
@@ -45,11 +41,12 @@ parsing:
}
```
-
Type names can be represented slightly differently in different languages.
+
For example, the dictionary name is used as element names when serialized to
XML.
This allows the `typeName` annotation to be used as a shortcut for defining
element names for
beans.
+
When serialized as XML, the bean is rendered as:
```xml
@@ -61,14 +58,16 @@ When serialized as XML, the bean is rendered as:
</foo>
```
-
Bean dictionaries are registered through the following:
-- [Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html)
-- [dictionary](../apidocs/org/apache/juneau/annotation/Beanp.html#dictionary())
-- [Bean](../apidocs/org/apache/juneau/annotation/Bean.html)
-- [dictionary](../apidocs/org/apache/juneau/annotation/Bean.html#dictionary())
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
-- \{@link oaj.BeanContext.Builder#beanDictionary(Class...)
beanDictionary(Class...)\}
+
+<tree>
+<java-annotation>[Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html)</java-annotation>
+<node-1><java-method>[dictionary](../apidocs/org/apache/juneau/annotation/Beanp.html#dictionary())</java-method></node-1>
+<java-annotation>[Bean](../apidocs/org/apache/juneau/annotation/Bean.html)</java-annotation>
+<node-1><java-method>[dictionary](../apidocs/org/apache/juneau/annotation/Bean.html#dictionary())</java-method></node-1>
+<java-class>[BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[beanDictionary(Class...)](TODO.md)</java-method></node-1>
+</tree>
The bean dictionary setting can consist of any of the following types:
- Any bean class that specifies a value for
[@Bean(typeName)](../apidocs/org/apache/juneau/annotation/Bean.html#typeName()).
@@ -76,7 +75,6 @@ The bean dictionary setting can consist of any of the
following types:
- Any subclass of
[BeanDictionaryMap](../apidocs/org/apache/juneau/BeanDictionaryMap.html)
containing a mapping of type names to classes without type name annotations.
- Any array or collection of the objects above.
-
```java
// Create a parser and tell it which classes to try to resolve.
ReaderParser parser = JsonParser
@@ -91,12 +89,13 @@ ReaderParser parser = HtmlParser
.build();
```
-
-The "_type" property name can be overridden through the following:
-- [Bean](../apidocs/org/apache/juneau/annotation/Bean.html)
--
[typePropertyName](../apidocs/org/apache/juneau/annotation/Bean.html#typePropertyName())
-- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
--
[typePropertyName(String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#typePropertyName(String))
+The `"_type"` property name can be overridden through the following:
+<tree>
+<java-annotation>[Bean](../apidocs/org/apache/juneau/annotation/Bean.html)</java-annotation>
+<node-1><java-method>[typePropertyName](../apidocs/org/apache/juneau/annotation/Bean.html#typePropertyName())</java-method></node-1>
+<java-class>[BeanContext.Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)</java-class>
+<node-1><java-method>[typePropertyName(String)](../apidocs/org/apache/juneau/BeanContext/Builder.html#typePropertyName(String))</java-method></node-1>
+</tree>
When using the annotation, you'll typically want to define it on an interface
class so that it can
be inherited by all subclasses.
@@ -117,12 +116,11 @@ MyInterface[] x = new MyInterface[]{ new MyClass1(), new
MyClass2() };
String json = JsonSerializer.DEFAULT.serialize(x);
```
+Type names do not need to be universally unique. However, they must be unique
within a dictionary.
-Type names do not need to be universally unique.
-However, they must be unique within a dictionary.
The following reserved words cannot be used as type names:
-`object, array, number, boolean, null`.
+`object`, `array`, `number`, `boolean`, `null`.
+
Serialized type names are DISABLED by default.
-They must be enabled on the serializer using the
-[Builder#addBeanTypes()](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#addBeanTypes())
+They must be enabled on the serializer using the
[Builder#addBeanTypes()](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#addBeanTypes())
setting.
diff --git a/juneau-docs-poc/docs/topics/02.15.VirtualBeans.md
b/juneau-docs-poc/docs/topics/02.15.VirtualBeans.md
index 5025d21c2..1b95d0fbb 100644
--- a/juneau-docs-poc/docs/topics/02.15.VirtualBeans.md
+++ b/juneau-docs-poc/docs/topics/02.15.VirtualBeans.md
@@ -2,8 +2,8 @@
title: "Virtual Beans"
---
-The
[Builder#disableInterfaceProxies()](../apidocs/org/apache/juneau/BeanContext/Builder.html#disableInterfaceProxies())
setting (enabled by default) allows
-the Juneau parsers to parse content into virtual beans (bean interfaces
without implementation classes).
+The
[Builder#disableInterfaceProxies()](../apidocs/org/apache/juneau/BeanContext/Builder.html#disableInterfaceProxies())
setting (enabled by default) allows the Juneau parsers to parse content into
virtual beans (bean interfaces without implementation classes).
+
For example, the following code creates an instance of the specified
unimplemented interface:
```java
@@ -33,14 +33,13 @@ int zip = address.getZip();
address.setState(StateEnum.NY);
```
-
Getter and setter values can be any [TODO: parsable](TODO.md) values, even
other virtual beans.
-Under-the-covers, a virtual bean is simply a proxy interface on top of an
existing [BeanMap](../apidocs/org/apache/juneau/BeanMap.html)
-instance. From a programmatic point-of-view, they're indistinguishable from
real beans, and can be
-manipulated and serialized like any other bean.
+
+Under-the-covers, a virtual bean is simply a proxy interface on top of an
existing [BeanMap](../apidocs/org/apache/juneau/BeanMap.html) instance.
+From a programmatic point-of-view, they're indistinguishable from real beans,
and can be manipulated and serialized like any other bean.
+
Virtual beans can also be created programmatically using the
[BeanContext](../apidocs/org/apache/juneau/BeanContext.html) class:
```java
Address address = BeanContext.DEFAULT.createSession().newBean(Address.class);
-
-```
+```
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.16.Recursion.md
b/juneau-docs-poc/docs/topics/02.16.Recursion.md
index abe9e9319..86af97fd8 100644
--- a/juneau-docs-poc/docs/topics/02.16.Recursion.md
+++ b/juneau-docs-poc/docs/topics/02.16.Recursion.md
@@ -4,13 +4,11 @@ title: "Non-Tree Models and Recursion Detection"
The Juneau Serializer API is designed to be used against POJO tree structures.
It expects that there not be loops in the POJO model (e.g. children with
references to parents, etc...).
-If you try to serialize models with loops, you will usually cause a
`StackOverflowError` to
-be thrown (if
[Builder#maxDepth(int)](../apidocs/org/apache/juneau/BeanTraverseContext/Builder.html#maxDepth(int))
is not reached
-first).
-If you still want to use the Juneau serializers on such models, Juneau
provides the
-[Builder#detectRecursions()](../apidocs/org/apache/juneau/BeanTraverseContext/Builder.html#detectRecursions())
setting.
-It tells the serializer to look for instances of an object in the current
branch of the tree and skip
-serialization when a duplicate is encountered.
+If you try to serialize models with loops, you will usually cause a
`StackOverflowError` to be thrown (if
[Builder#maxDepth(int)](../apidocs/org/apache/juneau/BeanTraverseContext/Builder.html#maxDepth(int))
is not reached first).
+
+If you still want to use the Juneau serializers on such models, Juneau
provides the
[Builder#detectRecursions()](../apidocs/org/apache/juneau/BeanTraverseContext/Builder.html#detectRecursions())
setting.
+It tells the serializer to look for instances of an object in the current
branch of the tree and skip serialization when a duplicate is encountered.
+
For example, let's make a POJO model out of the following classes:
```java
@@ -27,7 +25,6 @@ public class C {
}
```
-
Now we create a model with a loop and serialize the results.
```java
@@ -48,7 +45,6 @@ a.b.c.a = a;
String json = serializer.serialize(a);
```
-
What we end up with is the following, which does not serialize the contents of
the `c` field:
```json
@@ -60,7 +56,9 @@ What we end up with is the following, which does not
serialize the contents of t
}
```
-
Without recursion detection enabled, this would cause a stack-overflow error.
+
+:::note
Recursion detection introduces a performance penalty of around 20%.
For this reason the setting is disabled by default.
+:::
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.17.ParsingIntoGenericModels.md
b/juneau-docs-poc/docs/topics/02.17.ParsingIntoGenericModels.md
index 936c25967..1f2629c57 100644
--- a/juneau-docs-poc/docs/topics/02.17.ParsingIntoGenericModels.md
+++ b/juneau-docs-poc/docs/topics/02.17.ParsingIntoGenericModels.md
@@ -103,6 +103,5 @@ JsonList addresses = map.getList("addresses");
Address address = addresses.get(Address.class, 0);
```
-
As a general rule, parsing into beans is often more efficient than parsing
into generic models.
And working with beans is often less error prone than working with generic
models.
diff --git a/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
b/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
index 287652dd1..e668b2846 100644
--- a/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
+++ b/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
@@ -3,17 +3,15 @@ title: "Reading Continuous Streams"
---
The following parsers can be configured to read continuous streams of objects
from the same input stream:
-- [JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html)
-- [UonParser](../apidocs/org/apache/juneau/uon/UonParser.html)
-- [MsgPackParser](../apidocs/org/apache/juneau/msgpack/MsgPackParser.html)
-
-The [JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html) and
[UonParser](../apidocs/org/apache/juneau/uon/UonParser.html)
-classes can read continuous streams by using the
[Builder#unbuffered()](../apidocs/org/apache/juneau/parser/Parser/Builder.html#unbuffered())
-setting.
-This prevents the parsers from using an internal buffer that would read past
the end of the currently
-parsed POJO.
-:::tip Examples
+<java-class>[JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html)</java-class>
+<java-class>[UonParser](../apidocs/org/apache/juneau/uon/UonParser.html)</java-class>
+<java-class>[MsgPackParser](../apidocs/org/apache/juneau/msgpack/MsgPackParser.html)</java-class>
+
+The [JsonParser](../apidocs/org/apache/juneau/json/JsonParser.html) and
[UonParser](../apidocs/org/apache/juneau/uon/UonParser.html) classes can read
continuous streams by using the
[Builder#unbuffered()](../apidocs/org/apache/juneau/parser/Parser/Builder.html#unbuffered())
setting.
+This prevents the parsers from using an internal buffer that would read past
the end of the currently parsed POJO.
+
+:::tip Examples
```java
// If you're calling parse on the same input multiple times, use a session
instead of the parser directly.
@@ -30,18 +28,21 @@ pojo = session.parse(reader, int[].class); // [123]
pojo = session.parse(reader, int[].class); // [456]
```
+:::
+
+Note that this isn't perfect in all cases since you can't combine two JSON
numbers into a single reader (e.g. `"123" + "456" = "123456"`).
-Note that this isn't perfect in all cases since you can't combine two JSON
numbers into a single
-reader (e.g. `"123" + "456" = "123456"`).
+:::note
For obvious reasons, do not use the following properties when reading
continuous streams:
-- [Builder](../apidocs/org/apache/juneau/json/JsonParser/Builder.html)
--
[validateEnd()](../apidocs/org/apache/juneau/json/JsonParser/Builder.html#validateEnd())
-- [Builder](../apidocs/org/apache/juneau/uon/UonParser/Builder.html)
--
[validateEnd()](../apidocs/org/apache/juneau/uon/UonParser/Builder.html#validateEnd())
-- [Builder](../apidocs/org/apache/juneau/parser/Parser/Builder.html)
--
[validateEnd()](../apidocs/org/apache/juneau/parser/Parser/Builder.html#autoCloseStreams())
+<tree>
+<java-class>[JsonParser.Builder](../apidocs/org/apache/juneau/json/JsonParser/Builder.html)</java-class>
+<node-1><java-method>[validateEnd()](../apidocs/org/apache/juneau/json/JsonParser/Builder.html#validateEnd())</java-method></node-1>
+<java-class>[UonParser.Builder](../apidocs/org/apache/juneau/uon/UonParser/Builder.html)</java-class>
+<node-1><java-method>[validateEnd()](../apidocs/org/apache/juneau/uon/UonParser/Builder.html#validateEnd())</java-method></node-1>
+<java-class>[Parser.Builder](../apidocs/org/apache/juneau/parser/Parser/Builder.html)</java-class>
+<node-1><java-method>[validateEnd()](../apidocs/org/apache/juneau/parser/Parser/Builder.html#autoCloseStreams())</java-method></node-1>
+</tree>
+:::
-The [MsgPackParser](../apidocs/org/apache/juneau/msgpack/MsgPackParser.html)
class doesn't use any internal buffering to begin with, so it can be used with
-continuous streams without any special properties.
+The [MsgPackParser](../apidocs/org/apache/juneau/msgpack/MsgPackParser.html)
class doesn't use any internal buffering to begin with, so it can be used with
continuous streams without any special properties.
-:::
diff --git a/juneau-docs-poc/docs/topics/02.19.MarshallingUris.md
b/juneau-docs-poc/docs/topics/02.19.MarshallingUris.md
index 1990c38e1..508714674 100644
--- a/juneau-docs-poc/docs/topics/02.19.MarshallingUris.md
+++ b/juneau-docs-poc/docs/topics/02.19.MarshallingUris.md
@@ -69,43 +69,20 @@ WriterSerializer serializer = JsonSerializer
String json = serializer.serialize(new TestURIs());
```
-
URI resolution is controlled by the following settings:
--
[Builder#uriContext(UriContext)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriContext(UriContext))
-
-Setting that defines the URI contextual information used to resolve relative
URIs.
--
[Builder#uriRelativity(UriRelativity)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriRelativity(UriRelativity))
-
-Setting that defines how relative URIs should be interpreted.
-Possible values:
--
[UriRelativity#RESOURCE](../apidocs/org/apache/juneau/UriRelativity.html#RESOURCE)
-
-Relative URIs should be considered relative to the servlet URI.
-(e.g. `http://host:port/context-root/servlet-path`).
--
[UriRelativity#PATH_INFO](../apidocs/org/apache/juneau/UriRelativity.html#PATH_INFO)
+-
[Builder#uriContext(UriContext)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriContext(UriContext))
- Setting that defines the URI contextual information used to resolve relative
URIs.
+-
[Builder#uriRelativity(UriRelativity)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriRelativity(UriRelativity))
- Setting that defines how relative URIs should be interpreted. Possible
values:
+ -
[UriRelativity#RESOURCE](../apidocs/org/apache/juneau/UriRelativity.html#RESOURCE)
- Relative URIs should be considered relative to the servlet URI. (e.g.
`http://host:port/context-root/servlet-path`).
+ -
[UriRelativity#PATH_INFO](../apidocs/org/apache/juneau/UriRelativity.html#PATH_INFO)
- Relative URIs should be considered relative to the request URI. (e.g.
`http://host:port/context-root/servlet-path/path-info`).
+-
[Builder#uriResolution(UriResolution)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriResolution(UriResolution))
- Setting that defines the final format of serialized URIs. Possible values:
+ -
[UriResolution#ABSOLUTE](../apidocs/org/apache/juneau/UriResolution.html#ABSOLUTE)
- Resolve to an absolute URL. (e.g.
`http://host:port/context-root/servlet-path/path-info`).
+ -
[UriResolution#ROOT_RELATIVE](../apidocs/org/apache/juneau/UriResolution.html#ROOT_RELATIVE)
- Resolve to a root-relative URL. (e.g.
"/context-root/servlet-path/path-info").
+ -
[UriResolution#NONE](../apidocs/org/apache/juneau/UriResolution.html#NONE) -
Don't do any URL resolution.
-Relative URIs should be considered relative to the request URI.
-(e.g. `http://host:port/context-root/servlet-path/path-info`).
--
[Builder#uriResolution(UriResolution)](../apidocs/org/apache/juneau/serializer/Serializer/Builder.html#uriResolution(UriResolution))
+Juneau automatically interprets any [URL](../apidocs/java/net/URL.html) and
[URI](../apidocs/java/net/URI.html) objects as URIs and will resolve them
accordingly.
+The [@Uri](../apidocs/org/apache/juneau/annotation/Uri.html) annotation can be
used to extend that to other bean properties and class types so that they also
get interpreted as URIs.
-Setting that defines the final format of serialized URIs.
-Possible values:
--
[UriResolution#ABSOLUTE](../apidocs/org/apache/juneau/UriResolution.html#ABSOLUTE)
-
-Resolve to an absolute URL.
-(e.g. `http://host:port/context-root/servlet-path/path-info`).
--
[UriResolution#ROOT_RELATIVE](../apidocs/org/apache/juneau/UriResolution.html#ROOT_RELATIVE)
-
-Resolve to a root-relative URL.
-(e.g. "/context-root/servlet-path/path-info").
-- [UriResolution#NONE](../apidocs/org/apache/juneau/UriResolution.html#NONE)
-
-Don't do any URL resolution.
-Juneau automatically interprets any [URL](../apidocs/java/net/URL.html) and
[URI](../apidocs/java/net/URI.html) objects as URIs and will
-resolve them accordingly.
-The [@Uri](../apidocs/org/apache/juneau/annotation/Uri.html) annotation can be
used to extend that to other bean
-properties and class types so that they also get interpreted as URIs.
-For example:
+:::tip Example
```java
// Applied to a class whose toString() method returns a URI.
@@ -128,5 +105,5 @@ public class MyBean {
...
}
}
-
```
+:::
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/02.20.JacksonComparison.md
b/juneau-docs-poc/docs/topics/02.20.JacksonComparison.md
index 66a6cacd7..91e5ec290 100644
--- a/juneau-docs-poc/docs/topics/02.20.JacksonComparison.md
+++ b/juneau-docs-poc/docs/topics/02.20.JacksonComparison.md
@@ -5,41 +5,21 @@ title: "Comparison with Jackson"
Juneau was developed independently from Jackson but shares many of the same
features and capabilities.
Whereas Jackson was created to work primarily with JSON, Juneau was created to
work for multiple languages.
Therefore, the terminology and annotations in Juneau are similar but
language-agnostic.
+
The following charts describe equivalent features between the two libraries:
-### Annotations
-JacksonJuneau
-@JsonGetter
-@JsonSetter
-[@Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html)
-@JsonAnyGetter
-@JsonAnySetter
-[@Beanp(name="*")](../apidocs/org/apache/juneau/annotation/Beanp.html#name())
-@JsonIgnore
-@JsonIgnoreType
-[@BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html)
-`@JsonIgnoreProperties(\{...\})`
-[@Bean(excludeProperties|xp)](../apidocs/org/apache/juneau/annotation/Bean.html#excludeProperties)
-`@JsonAutoDetect(fieldVisibility=...)`
-No equivalent annotation but can be controlled via:
-[Builder#beanFieldVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanFieldVisibility(Visibility))
-[Builder#beanMethodVisibility(Visibility)](../apidocs/org/apache/juneau/BeanContext/Builder.html#beanMethodVisibility(Visibility))
-@JsonCreator
-@JsonProperty
-[@Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html)
-@JacksonInject
-No equivalent.
-@JsonSerialize
-@JsonDeserialize
-Juneau uses swaps to convert non-serializable object to serializable forms:
-[@Swap](../apidocs/org/apache/juneau/annotation/Swap.html)
-@JsonInclude
-No equivalent annotation but can be controlled via various settings:
-[BeanContext](../apidocs/org/apache/juneau/BeanContext.html)
-[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html)
-@JsonPropertyOrder
-[@Bean(properties="...")](../apidocs/org/apache/juneau/annotation/Bean.html#properties)
-[@Bean(sort=x)](../apidocs/org/apache/juneau/annotation/Bean.html#sort)
-@JsonValue
-@JsonRawValue
-Can be replicated using swaps with `Reader` swapped values.
+## Annotations
+
+| Jackson | Juneau |
+|---------|--------|
+| `@JsonGetter`<br/>`@JsonSetter` |
[@Beanp](../apidocs/org/apache/juneau/annotation/Beanp.html) |
+| `@JsonAnyGetter`<br/>`@JsonAnySetter` |
[@Beanp(name="*")](../apidocs/org/apache/juneau/annotation/Beanp.html#name()) |
+| `@JsonIgnore`<br/>`@JsonIgnoreType` |
[@BeanIgnore](../apidocs/org/apache/juneau/annotation/BeanIgnore.html) |
+| `@JsonIgnoreProperties({...})` |
[@Bean(excludeProperties\|xp)](../apidocs/org/apache/juneau/annotation/Bean.html#excludeProperties)
|
+| `@JsonAutoDetect(fieldVisibility=...)` | No equivalent annotation but can be
controlled
via:<br/>[Builder.beanFieldVisibility(Visibility)](../apidocs/org/apache/juneau/annotation/BeanContext.Builder.html#.beanFieldVisibility(Visibility))<br/>[Builder.beanMethodVisibility(Visibility)](../apidocs/org/apache/juneau/annotation/BeanContext.Builder.html#.beanMethodVisibility(Visibility))
|
+| `@JsonCreator`<br/>`@JsonProperty` |
[@Beanc](../apidocs/org/apache/juneau/annotation/Beanc.html) |
+| `@JacksonInject` | No equivalent. |
+| `@JsonSerialize`<br/>`@JsonDeserialize` | Juneau uses swaps to convert
non-serializable object to serializable
forms:<br/>[@Swap](../apidocs/org/apache/juneau/annotation/Swap.html) |
+| `@JsonInclude` | No equivalent annotation but can be controlled via various
settings:<br/>[BeanContext](../apidocs/org/apache/juneau/BeanContext.html)<br/>[Serializer](../apidocs/org/apache/juneau/serializer/Serializer.html)
|
+| `@JsonPropertyOrder` |
[@Bean(properties="...")](../apidocs/org/apache/juneau/annotation/Bean.html#properties)<br/>[@Bean(sort=x)](../apidocs/org/apache/juneau/annotation/Bean.html#sort)
|
+| `@JsonValue`<br/>`@JsonRawValue` | Can be replicated using swaps with
`Reader` swapped values. |
diff --git a/juneau-docs-poc/docs/topics/02.21.01.SvlVariables.md
b/juneau-docs-poc/docs/topics/02.21.01.SvlVariables.md
index 2ecb921c7..1843af470 100644
--- a/juneau-docs-poc/docs/topics/02.21.01.SvlVariables.md
+++ b/juneau-docs-poc/docs/topics/02.21.01.SvlVariables.md
@@ -4,6 +4,7 @@ title: "SVL Variables"
Variables are defined through the
[Var](../apidocs/org/apache/juneau/svl/Var.html) API.
The API comes with several predefined variables and is easily extensible.
+
The following is an example of a variable that performs URL-Encoding on
strings.
```java
@@ -33,79 +34,49 @@ VarResolver varResolver = VarResolver.DEFAULT
String myProperty = varResolver.resolve("$UE{$S{my.property}}");
```
-
The following shows the class hierarchy of the
[Var](../apidocs/org/apache/juneau/svl/Var.html) class:
-- [Var](../apidocs/org/apache/juneau/svl/Var.html) - Superclass of all vars.
-- [SimpleVar](../apidocs/org/apache/juneau/svl/SimpleVar.html) - Superclass of
all vars that return strings.
-- [DefaultingVar](../apidocs/org/apache/juneau/svl/DefaultingVar.html) -
Variables that define a default value if the resolve method returns null.
-- [MapVar](../apidocs/org/apache/juneau/svl/MapVar.html) - Variables that pull
values from maps.
-- [MultipartVar](../apidocs/org/apache/juneau/svl/MultipartVar.html) -
Variables that consist of 2 or more comma-delimited arguments.
-- [StreamedVar](../apidocs/org/apache/juneau/svl/StreamedVar.html) -
Superclass of all vars that stream their value to writers.
+
+<tree>
+<java-abstract-class>[Var](../apidocs/org/apache/juneau/svl/Var.html)</java-abstract-class>
- Superclass of all vars.
+<node-1><java-abstract-class>[SimpleVar](../apidocs/org/apache/juneau/svl/SimpleVar.html)</java-abstract-class>
- Superclass of all vars that return strings.</node-1>
+<node-2><java-abstract-class>[DefaultingVar](../apidocs/org/apache/juneau/svl/DefaultingVar.html)</java-abstract-class>
- Variables that define a default value if the resolve method returns
null.</node-2>
+<node-3><java-abstract-class>[MapVar](../apidocs/org/apache/juneau/svl/MapVar.html)</java-abstract-class>
- Variables that pull values from maps.</node-3>
+<node-2><java-abstract-class>[MultipartVar](../apidocs/org/apache/juneau/svl/MultipartVar.html)</java-abstract-class>
- Variables that consist of 2 or more comma-delimited arguments.</node-2>
+<node-1><java-abstract-class>[StreamedVar](../apidocs/org/apache/juneau/svl/StreamedVar.html)</java-abstract-class>
- Superclass of all vars that stream their value to writers.</node-1>
+</tree>
The following is the list of default variables defined in all modules:
-ModuleClassPattern
-juneau-svl
-[EnvVariablesVar](../apidocs/org/apache/juneau/svl/vars/EnvVariablesVar.html)
-$E\{key[,default]\}
-[SystemPropertiesVar](../apidocs/org/apache/juneau/svl/vars/SystemPropertiesVar.html)
-$S\{key[,default]\}
-[ArgsVar](../apidocs/org/apache/juneau/svl/vars/ArgsVar.html)
-$A\{key[,default]\}
-[ManifestFileVar](../apidocs/org/apache/juneau/svl/vars/ManifestFileVar.html)
-$MF\{key[,default]\}
-[IfVar](../apidocs/org/apache/juneau/svl/vars/IfVar.html)
-$IF\{arg,then[,else]\}
-[SwitchVar](../apidocs/org/apache/juneau/svl/vars/SwitchVar.html)
-`$SW{arg,pattern1:then1[,pattern2:then2...]}`
-[CoalesceVar](../apidocs/org/apache/juneau/svl/vars/CoalesceVar.html)
-$CO\{arg1[,arg2...]\}
-[PatternMatchVar](../apidocs/org/apache/juneau/svl/vars/PatternMatchVar.html)
-$PM\{arg,pattern\}
-[PatternReplaceVar](../apidocs/org/apache/juneau/svl/vars/PatternReplaceVar.html)
-$PR\{arg,pattern,replace\}
-[PatternExtractVar](../apidocs/org/apache/juneau/svl/vars/PatternExtractVar.html)
-$PE\{arg,pattern,groupdIndex\}
-[NotEmptyVar](../apidocs/org/apache/juneau/svl/vars/NotEmptyVar.html)
-$NE\{arg\}
-[UpperCaseVar](../apidocs/org/apache/juneau/svl/vars/UpperCaseVar.html)
-$UC\{arg\}
-[LowerCaseVar](../apidocs/org/apache/juneau/svl/vars/LowerCaseVar.html)
-$LC\{arg\}
-[LenVar](../apidocs/org/apache/juneau/svl/vars/LenVar.html)
-$LN\{arg[,delimiter]\}
-[SubstringVar](../apidocs/org/apache/juneau/svl/vars/SubstringVar.html)
-$ST\{arg,start[,end]\}
-[HtmlWidgetVar](../apidocs/org/apache/juneau/html/HtmlWidgetVar.html)
-$W\{name\}
-juneau-config
-[ConfigVar](../apidocs/org/apache/juneau/config/vars/ConfigVar.html)
-$C\{key[,default]\}
-juneau-rest-server
-[FileVar](../apidocs/org/apache/juneau/rest/vars/FileVar.html)
-$F\{path[,default]\}\}
-[ServletInitParamVar](../apidocs/org/apache/juneau/rest/vars/ServletInitParamVar.html)
-$I\{name[,default]\}
-[LocalizationVar](../apidocs/org/apache/juneau/rest/vars/LocalizationVar.html)
-$L\{key[,args...]\}
-[RequestAttributeVar](../apidocs/org/apache/juneau/rest/vars/RequestAttributeVar.html)
-$RA\{key1[,key2...]\}
-[RequestFormDataVar](../apidocs/org/apache/juneau/rest/vars/RequestFormDataVar.html)
-$RF\{key1[,key2...]\}
-[RequestHeaderVar](../apidocs/org/apache/juneau/rest/vars/RequestHeaderVar.html)
-$RH\{key1[,key2...]\}
-[RequestPathVar](../apidocs/org/apache/juneau/rest/vars/RequestPathVar.html)
-$RP\{key1[,key2...]\}
-[RequestQueryVar](../apidocs/org/apache/juneau/rest/vars/RequestQueryVar.html)
-$RQ\{key1[,key2...]\}
-[RequestSwaggerVar](../apidocs/org/apache/juneau/rest/vars/RequestSwaggerVar.html)
-$RS\{key\}
-[RequestVar](../apidocs/org/apache/juneau/rest/vars/RequestVar.html)
-$R\{key1[,key2...]\}
-[SerializedRequestAttrVar](../apidocs/org/apache/juneau/rest/vars/SerializedRequestAttrVar.html)
-$SA\{contentType,key[,default]\}
-[SwaggerVar](../apidocs/org/apache/juneau/rest/vars/SwaggerVar.html)
-$SS\{key1[,key2...]\}
-[UrlVar](../apidocs/org/apache/juneau/rest/vars/UrlVar.html)
-$U\{uri\}
-[UrlEncodeVar](../apidocs/org/apache/juneau/rest/vars/UrlEncodeVar.html)
-$UE\{uriPart\}
+
+| Module | Class | Pattern |
+|--------|-------|---------|
+| **juneau-svl** |
[EnvVariablesVar](../apidocs/org/apache/juneau/svl/vars/EnvVariablesVar.html) |
`$E{key[,default]}` |
+| |
[SystemPropertiesVar](../apidocs/org/apache/juneau/svl/vars/SystemPropertiesVar.html)
| `$S{key[,default]}` |
+| | [ArgsVar](../apidocs/org/apache/juneau/svl/vars/ArgsVar.html) |
`$A{key[,default]}` |
+| |
[ManifestFileVar](../apidocs/org/apache/juneau/svl/vars/ManifestFileVar.html) |
`$MF{key[,default]}` |
+| | [IfVar](../apidocs/org/apache/juneau/svl/vars/IfVar.html) |
`$IF{arg,then[,else]}` |
+| | [SwitchVar](../apidocs/org/apache/juneau/svl/vars/SwitchVar.html) |
`$SW{arg,pattern1:then1[,pattern2:then2...]}` |
+| | [CoalesceVar](../apidocs/org/apache/juneau/svl/vars/CoalesceVar.html) |
`$CO{arg1[,arg2...]}` |
+| |
[PatternMatchVar](../apidocs/org/apache/juneau/svl/vars/PatternMatchVar.html) |
`$PM{arg,pattern}` |
+| |
[PatternReplaceVar](../apidocs/org/apache/juneau/svl/vars/PatternReplaceVar.html)
| `$PR{arg,pattern,replace}` |
+| |
[PatternExtractVar](../apidocs/org/apache/juneau/svl/vars/PatternExtractVar.html)
| `$PE{arg,pattern,groupdIndex}` |
+| | [NotEmptyVar](../apidocs/org/apache/juneau/svl/vars/NotEmptyVar.html) |
`$NE{arg}` |
+| | [UpperCaseVar](../apidocs/org/apache/juneau/svl/vars/UpperCaseVar.html) |
`$UC{arg}` |
+| | [LowerCaseVar](../apidocs/org/apache/juneau/svl/vars/LowerCaseVar.html) |
`$LC{arg}` |
+| | [LenVar](../apidocs/org/apache/juneau/svl/vars/LenVar.html) |
`$LN{arg[,delimiter]}` |
+| | [SubstringVar](../apidocs/org/apache/juneau/svl/vars/SubstringVar.html) |
`$ST{arg,start[,end]}` |
+| | [HtmlWidgetVar](../apidocs/org/apache/juneau/html/HtmlWidgetVar.html) |
`$W{name}` |
+| **juneau-config** |
[ConfigVar](../apidocs/org/apache/juneau/config/vars/ConfigVar.html) |
`$C{key[,default]}` |
+| **juneau-rest-server** |
[FileVar](../apidocs/org/apache/juneau/rest/vars/FileVar.html) |
`$F{path[,default]}` |
+| |
[ServletInitParamVar](../apidocs/org/apache/juneau/rest/vars/ServletInitParamVar.html)
| `$I{name[,default]}` |
+| |
[LocalizationVar](../apidocs/org/apache/juneau/rest/vars/LocalizationVar.html)
| `$L{key[,args...]}` |
+| |
[RequestAttributeVar](../apidocs/org/apache/juneau/rest/vars/RequestAttributeVar.html)
| `$RA{key1[,key2...]}` |
+| |
[RequestFormDataVar](../apidocs/org/apache/juneau/rest/vars/RequestFormDataVar.html)
| `$RF{key1[,key2...]}` |
+| |
[RequestHeaderVar](../apidocs/org/apache/juneau/rest/vars/RequestHeaderVar.html)
| `$RH{key1[,key2...]}` |
+| |
[RequestPathVar](../apidocs/org/apache/juneau/rest/vars/RequestPathVar.html) |
`$RP{key1[,key2...]}` |
+| |
[RequestQueryVar](../apidocs/org/apache/juneau/rest/vars/RequestQueryVar.html)
| `$RQ{key1[,key2...]}` |
+| |
[RequestSwaggerVar](../apidocs/org/apache/juneau/rest/vars/RequestSwaggerVar.html)
| `$RS{key}` |
+| | [RequestVar](../apidocs/org/apache/juneau/rest/vars/RequestVar.html) |
`$R{key1[,key2...]}` |
+| |
[SerializedRequestAttrVar](../apidocs/org/apache/juneau/rest/vars/SerializedRequestAttrVar.html)
| `$SA{contentType,key[,default]}` |
+| | [SwaggerVar](../apidocs/org/apache/juneau/rest/vars/SwaggerVar.html) |
`$SS{key1[,key2...]}` |
+| | [UrlVar](../apidocs/org/apache/juneau/rest/vars/UrlVar.html) | `$U{uri}` |
+| | [UrlEncodeVar](../apidocs/org/apache/juneau/rest/vars/UrlEncodeVar.html) |
`$UE{uriPart}` |
diff --git a/juneau-docs-poc/src/css/custom.css
b/juneau-docs-poc/src/css/custom.css
index 9986a06b3..31224ebaa 100644
--- a/juneau-docs-poc/src/css/custom.css
+++ b/juneau-docs-poc/src/css/custom.css
@@ -347,52 +347,6 @@ a[href*="apidocs"]:hover {
margin-top: 0;
}
-/* Java Tree CSS - Original Juneau styling */
-
-/* Documentation Tree - from original juneau-doc.css */
-.doctree li, .javatree li, .seealso>li, .notes>li, .values>li, .format>li {
- max-width: 800px;
- margin-top: 0px;
- list-style: none;
-}
-.doctree>li, .seealso>li {
- margin-bottom: 10px;
-}
-.doctree li, .seealso li {
- margin-top: 5px;
-}
-.doctree ul, .seealso ul {
- padding: 0px 0px 0px 15px;
- margin-top: -2px;
- margin-bottom: -2px;
-}
-.javatree>li {
- margin-bottom: 1px;
-}
-.javatree li {
- margin-top: 1px;
-}
-.javatree ul {
- padding: 0px 0px 0px 20px;
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-/* Compressed/condensed Java tree - from original juneau-doc.css */
-ul.javatreec, .javatreec ul {
- padding-left: 0px;
- margin: 0px;
- max-width: 900px;
-}
-.javatreec li {
- display: inline-block;
- padding-left: 5px;
-}
-.javatreec li::before {
- font-weight: bolder;
- font-size: x-small;
-}
-
/* Responsive adjustments */
@media (max-width: 768px) {
.prism-code {
@@ -424,8 +378,19 @@ java-field,
java-field-private,
java-method,
java-method-private,
-java-method-annotation { font: 'Lucida Console';}
+java-method-annotation { font-family: 'Lucida Console', monospace; }
+
+/* Custom node elements for hierarchy levels */
+node-1 { display: block; margin-left: 2em; }
+node-2 { display: block; margin-left: 4em; }
+node-3 { display: block; margin-left: 6em; }
+node-4 { display: block; margin-left: 8em; }
+node-5 { display: block; margin-left: 10em; }
+
+/* Tree wrapper for proper spacing */
+tree { display: block; margin: 1em 0; }
+/* Make java elements inline after indent */
javac-annotation::before { color: #00ced1; content: '\24d0\00a0';
font-weight: bolder; font-size: x-small; }
javac-class::before { color: #008000; content: '\24d2\00a0'; font-weight:
bolder; font-size: x-small; }
javac-abstract-class::before { color: #CCB404; content: '\24d2\00a0';
font-weight: bolder; font-size: x-small; }
@@ -437,13 +402,13 @@ javac-method::before { color: #008000; content:
'\25cf\00a0'; font-weight: bold
javac-method-private::before { color: #CCB404; content: '\25c6\00a0';
font-weight: bolder; font-size: x-small; }
javac-method-annotation::before { color: #00ced1; content: '\25cf\00a0';
font-weight: bolder; font-size: x-small; }
-java-annotation::before { color: #00ced1; content: '\24d0\00a0\00a0';
font-weight: bolder; font-size: large; }
-java-class::before { color: #008000; content: '\24d2\00a0\00a0'; font-weight:
bolder; font-size: large; }
-java-abstract-class::before { color: #CCB404; content: '\24d2\00a0\00a0';
font-weight: bolder; font-size: large; }
-java-interface::before { color: #5f4ba2; content: '\24d8\00a0\00a0';
font-weight: bolder; font-size: large; }
-java-enum::before { color: #906029; content: '\24d4\00a0\00a0'; font-weight:
bolder; font-size: large; }
-java-field::before { color: #008000; content: '\25cf\00a0\00a0'; font-weight:
bolder; font-size: x-small; }
-java-field-private::before { color: #CCB404; content: '\25cf\00a0\00a0';
font-weight: bolder; font-size: x-small; }
-java-method::before { color: #008000; content: '\25cf\00a0\00a0';
font-weight: bolder; font-size: x-small; }
-java-method-private::before { color: #CCB404; content: '\25c6\00a0\00a0';
font-weight: bolder; font-size: x-small; }
-java-method-annotation::before { color: #00ced1; content: '\25cf\00a0\00a0';
font-weight: bolder; font-size: x-small; }
+java-annotation::before { color: #00ced1; content: '\24d0\00a0'; font-weight:
bolder; font-size: large; }
+java-class::before { color: #008000; content: '\24d2\00a0'; font-weight:
bolder; font-size: large; }
+java-abstract-class::before { color: #CCB404; content: '\24d2\00a0';
font-weight: bolder; font-size: large; }
+java-interface::before { color: #5f4ba2; content: '\24d8\00a0'; font-weight:
bolder; font-size: large; }
+java-enum::before { color: #906029; content: '\24d4\00a0'; font-weight:
bolder; font-size: large; }
+java-field::before { color: #008000; content: '\25cf\00a0'; font-weight:
bolder; font-size: x-small; }
+java-field-private::before { color: #CCB404; content: '\25cf\00a0';
font-weight: bolder; font-size: x-small; }
+java-method::before { color: #008000; content: '\25cf\00a0'; font-weight:
bolder; font-size: x-small; }
+java-method-private::before { color: #CCB404; content: '\25c6\00a0';
font-weight: bolder; font-size: x-small; }
+java-method-annotation::before { color: #00ced1; content: '\25cf\00a0';
font-weight: bolder; font-size: x-small; }