You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2018/01/14 16:02:49 UTC
[21/32] juneau git commit: Javadoc updates.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectList.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectList.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectList.java
index e7f557c..8afd4a9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectList.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectList.java
@@ -23,10 +23,10 @@ import org.apache.juneau.utils.*;
/**
* Java implementation of a JSON array.
- *
+ *
* <p>
* An extension of {@link LinkedList}, so all methods available to in that class are also available to this class.
- *
+ *
* <p>
* Note that the use of this class is optional.
* The serializers will accept any objects that implement the {@link Collection} interface.
@@ -34,23 +34,23 @@ import org.apache.juneau.utils.*;
* Collections Framework objects.
* For example, a constructor is provided for converting a JSON array string directly into a {@link List}.
* It also contains accessor methods for to avoid common typecasting when accessing elements in a list.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Construct an empty List</jc>
* List l = <jk>new</jk> ObjectList();
- *
+ *
* <jc>// Construct a list of objects using various methods</jc>
* l = <jk>new</jk> ObjectList().append(<js>"foo"</js>).append(123).append(<jk>true</jk>);
* l = <jk>new</jk> ObjectList().append(<js>"foo"</js>, 123, <jk>true</jk>); <jc>// Equivalent</jc>
* l = <jk>new</jk> ObjectList(<js>"foo"</js>, 123, <jk>true</jk>); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Construct a list of integers from JSON</jc>
* l = <jk>new</jk> ObjectList(<js>"[1,2,3]"</js>);
- *
+ *
* <jc>// Construct a list of generic ObjectMap objects from JSON</jc>
* l = <jk>new</jk> ObjectList(<js>"[{foo:'bar'},{baz:'bing'}]"</js>);
- *
+ *
* <jc>// Construct a list of integers from XML</jc>
* String xml = <js>"<array><number>1</number><number>2</number><number>3</number></array>"</js>;
* l = <jk>new</jk> ObjectList(xml, DataFormat.<jsf>XML</jsf>);
@@ -58,39 +58,39 @@ import org.apache.juneau.utils.*;
* l = (List)XmlParser.<jsf>DEFAULT</jsf>.parse(Object.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* l = XmlParser.<jsf>DEFAULT</jsf>.parse(List.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* l = XmlParser.<jsf>DEFAULT</jsf>.parse(ObjectList.<jk>class</jk>, xml); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Construct JSON from ObjectList</jc>
* l = <jk>new</jk> ObjectList(<js>"[{foo:'bar'},{baz:'bing'}]"</js>);
* String json = l.toString(); <jc>// Produces "[{foo:'bar'},{baz:'bing'}]"</jc>
* json = l.toString(JsonSerializer.<jsf>DEFAULT_CONDENSED</jsf>); <jc>// Equivalent</jc>
* json = JsonSerializer.<jsf>DEFAULT_CONDENSED</jsf>.serialize(l); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get one of the entries in the list as an Integer</jc>
* l = <jk>new</jk> ObjectList(<js>"[1,2,3]"</js>);
* Integer i = l.getInt(1);
* i = l.get(Integer.<jk>class</jk>, 1); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get one of the entries in the list as an Float</jc>
* l = <jk>new</jk> ObjectList(<js>"[1,2,3]"</js>);
* Float f = l.getFloat(1); <jc>// Returns 2f </jc>
* f = l.get(Float.<jk>class</jk>, 1); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Same as above, except converted to a String</jc>
* l = <jk>new</jk> ObjectList(<js>"[1,2,3]"</js>);
* String s = l.getString(1); <jc>// Returns "2" </jc>
* s = l.get(String.<jk>class</jk>, 1); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get one of the entries in the list as a bean (converted to a bean if it isn't already one)</jc>
* l = <jk>new</jk> ObjectList(<js>"[{name:'John Smith',age:45}]"</js>);
* Person p = l.get(Person.<jk>class</jk>, 0);
- *
+ *
* <jc>// Iterate over a list of beans using the elements() method</jc>
* ObjectList ObjectList = <jk>new</jk> ObjectList(<js>"[{name:'John Smith',age:45}]"</js>);
* <jk>for</jk> (Person p : ObjectList.elements(Person.<jk>class</jk>) {
* <jc>// Do something with p</jc>
* }
* </p>
- *
+ *
* <p>
* This class is not thread safe.
*/
@@ -134,7 +134,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Construct a JSON array directly from text using the specified parser.
- *
+ *
* @param s The string being parsed.
* @param p The parser to use to parse the input.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -154,7 +154,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for <code><jk>new</jk> ObjectList(String,JsonParser.<jsf>DEFAULT</jsf>);</code>
- *
+ *
* @param s The string being parsed.
* @throws ParseException If the input contains a syntax error or is malformed.
*/
@@ -164,7 +164,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Construct a JSON array directly from a reader using the specified parser.
- *
+ *
* @param r
* The reader to read from.
* Will automatically be wrapped in a {@link BufferedReader} if it isn't already a BufferedReader.
@@ -179,7 +179,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for <code><jk>new</jk> ObjectList(reader, JsonParser.<jsf>DEFAULT</jsf>)</code>.
- *
+ *
* @param r
* The reader to read from.
* The reader will be wrapped in a {@link BufferedReader} if it isn't already.
@@ -206,7 +206,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Construct an empty JSON array with the specified bean context. (i.e. an empty {@link LinkedList}).
- *
+ *
* @param session The bean context to associate with this object list for creating beans.
*/
public ObjectList(BeanSession session) {
@@ -216,7 +216,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Construct a JSON array and fill it with the specified objects.
- *
+ *
* @param o A list of objects to add to this list.
*/
public ObjectList(Object... o) {
@@ -225,7 +225,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Construct a JSON array and fill it with the specified collection of objects.
- *
+ *
* @param c A list of objects to add to this list.
*/
public ObjectList(Collection<?> c) {
@@ -234,13 +234,13 @@ public class ObjectList extends LinkedList<Object> {
/**
* Override the default bean session used for converting POJOs.
- *
+ *
* <p>
* Default is {@link BeanContext#DEFAULT}, which is sufficient in most cases.
- *
+ *
* <p>
* Useful if you're serializing/parsing beans with transforms defined.
- *
+ *
* @param session The new bean session.
* @return This object (for method chaining).
*/
@@ -251,7 +251,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Convenience method for adding multiple objects to this list.
- *
+ *
* @param o The objects to add to the list.
* @return This object (for method chaining).
*/
@@ -263,33 +263,33 @@ public class ObjectList extends LinkedList<Object> {
/**
* Get the entry at the specified index, converted to the specified type.
- *
+ *
* <p>
* This is the preferred get method for simple types.
- *
+ *
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* ObjectList l = <jk>new</jk> ObjectList(<js>"..."</js>);
- *
+ *
* <jc>// Value converted to a string.</jc>
* String s = l.get(1, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a bean.</jc>
* MyBean b = l.get(2, MyBean.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a bean array.</jc>
* MyBean[] ba = l.get(3, MyBean[].<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of objects.</jc>
* List l1 = l.get(4, LinkedList.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map of object keys/values.</jc>
* Map m1 = l.get(5, TreeMap.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
- *
+ *
* @param index The index into this list.
* @param type The type of object to convert the entry to.
* @param <T> The type of object to convert the entry to.
@@ -301,42 +301,42 @@ public class ObjectList extends LinkedList<Object> {
/**
* Get the entry at the specified index, converted to the specified type.
- *
+ *
* <p>
* The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps).
- *
+ *
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* ObjectList l = <jk>new</jk> ObjectList(<js>"..."</js>);
- *
+ *
* <jc>// Value converted to a linked-list of strings.</jc>
* List<String> l1 = l.get(1, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of beans.</jc>
* List<MyBean> l2 = l.get(2, LinkedList.<jk>class</jk>, MyBean.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of linked-lists of strings.</jc>
* List<List<String>> l3 = l.get(3, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map of string keys/values.</jc>
* Map<String,String> m1 = l.get(4, TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map containing string keys and values of lists containing beans.</jc>
* Map<String,List<MyBean>> m2 = l.get(5, TreeMap.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* <code>Collection</code> classes are assumed to be followed by zero or one objects indicating the element type.
- *
+ *
* <p>
* <code>Map</code> classes are assumed to be followed by zero or two meta objects indicating the key and value types.
- *
+ *
* <p>
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
- *
+ *
* @param index The index into this list.
* @param type The type of object to convert the entry to.
* @param args The type arguments of the type to convert the entry to.
@@ -349,7 +349,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, String.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
*/
@@ -359,7 +359,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, Integer.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -370,7 +370,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, Boolean.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -381,7 +381,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, Long.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -392,7 +392,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, Map.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -403,7 +403,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Same as {@link #getMap(int)} except converts the keys and values to the specified types.
- *
+ *
* @param index The index.
* @param keyType The key type class.
* @param valType The value type class.
@@ -416,7 +416,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, List.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -427,7 +427,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Same as {@link #getList(int)} except converts the elements to the specified types.
- *
+ *
* @param index The index.
* @param elementType The element type class.
* @return The converted value.
@@ -439,7 +439,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, ObjectMap.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -450,7 +450,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Shortcut for calling <code>get(index, ObjectList.<jk>class</jk>)</code>.
- *
+ *
* @param index The index.
* @return The converted value.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -462,27 +462,27 @@ public class ObjectList extends LinkedList<Object> {
/**
* Same as {@link #get(int,Class) get(int,Class)}, but the key is a slash-delimited path used to traverse entries in
* this POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* <jk>long</jk> l = m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(<js>"0"</js>).getLong(<js>"baz"</js>);
- *
+ *
* <jc>// Using this method</jc>
* <jk>long</jk> l = m.getAt(<js>"foo/bar/0/baz"</js>, <jk>long</jk>.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param type The class type.
- *
+ *
* @param <T> The class type.
* @return The value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -492,11 +492,11 @@ public class ObjectList extends LinkedList<Object> {
/**
* Same as {@link #getAt(String,Class)}, but allows for conversion to complex maps and collections.
- *
+ *
* @param path The path to the entry.
* @param type The class type.
* @param args The class parameter types.
- *
+ *
* @param <T> The class type.
* @return The value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -507,24 +507,24 @@ public class ObjectList extends LinkedList<Object> {
/**
* Same as {@link #set(int,Object) set(int,Object)}, but the key is a slash-delimited path used to traverse entries
* in this POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(<js>"0"</js>).put(<js>"baz"</js>, 123);
- *
+ *
* <jc>// Using this method</jc>
* m.putAt(<js>"foo/bar/0/baz"</js>, 123);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param o The new value.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
@@ -535,24 +535,24 @@ public class ObjectList extends LinkedList<Object> {
/**
* Similar to {@link #putAt(String,Object) putAt(String,Object)}, but used to append to collections and arrays.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).append(123);
- *
+ *
* <jc>// Using this method</jc>
* m.postAt(<js>"foo/bar"</js>, 123);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param o The new value.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
@@ -564,24 +564,24 @@ public class ObjectList extends LinkedList<Object> {
/**
* Similar to {@link #remove(int) remove(int)},but the key is a slash-delimited path used to traverse entries in
* this POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(1).remove(<js>"baz"</js>);
- *
+ *
* <jc>// Using this method</jc>
* m.deleteAt(<js>"foo/bar/0/baz"</js>);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -591,17 +591,17 @@ public class ObjectList extends LinkedList<Object> {
/**
* Creates an {@link Iterable} with elements of the specified child type.
- *
+ *
* <p>
* Attempts to convert the child objects to the correct type if they aren't already the correct type.
- *
+ *
* <p>
* The <code>next()</code> method on the returned iterator may throw a {@link InvalidDataConversionException} if
* the next element cannot be converted to the specified type.
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for a description of valid conversions.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Iterate over a list of ObjectMaps.</jc>
@@ -609,13 +609,13 @@ public class ObjectList extends LinkedList<Object> {
* for (ObjectMap m : l.elements(ObjectMap.<jk>class</jk>)) {
* <jc>// Do something with m.</jc>
* }
- *
+ *
* <jc>// Iterate over a list of ints.</jc>
* ObjectList l = <jk>new</jk> ObjectList(<js>"[1,2,3]"</js>);
* for (Integer i : l.elements(Integer.<jk>class</jk>)) {
* <jc>// Do something with i.</jc>
* }
- *
+ *
* <jc>// Iterate over a list of beans.</jc>
* <jc>// Automatically converts to beans.</jc>
* ObjectList l = <jk>new</jk> ObjectList(<js>"[{name:'John Smith',age:45}]"</js>);
@@ -623,7 +623,7 @@ public class ObjectList extends LinkedList<Object> {
* <jc>// Do something with p.</jc>
* }
* </p>
- *
+ *
* @param <E> The child object type.
* @param childType The child object type.
* @return A new <code>Iterable</code> object over this list.
@@ -658,7 +658,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Returns the {@link ClassMeta} of the class of the object at the specified index.
- *
+ *
* @param index An index into this list, zero-based.
* @return The data type of the object at the specified index, or <jk>null</jk> if the value is null.
*/
@@ -674,7 +674,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Serialize this array to a string using the specified serializer.
- *
+ *
* @param serializer The serializer to use to convert this object to a string.
* @return This object as a serialized string.
* @throws SerializeException If a problem occurred trying to convert the output.
@@ -698,7 +698,7 @@ public class ObjectList extends LinkedList<Object> {
/**
* Convenience method for serializing this ObjectList to the specified Writer using the JsonSerializer.DEFAULT
* serializer.
- *
+ *
* @param w The writer to send the serialized contents of this object.
* @throws IOException If a problem occurred trying to write to the writer.
* @throws SerializeException If a problem occurred trying to convert the output.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectMap.java
index 6c45010..272433c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ObjectMap.java
@@ -28,7 +28,7 @@ import org.apache.juneau.utils.*;
/**
* Java implementation of a JSON object.
- *
+ *
* <p>
* An extension of {@link LinkedHashMap}, so all methods available in that class are also available to this class.
* <p>
@@ -38,20 +38,20 @@ import org.apache.juneau.utils.*;
* Collections Framework objects.
* For example, a constructor is provided for converting a JSON object string directly into a {@link Map}.
* It also contains accessor methods for to avoid common typecasting when accessing elements in a list.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Construct an empty Map</jc>
* Map m = <jk>new</jk> ObjectMap();
- *
+ *
* <jc>// Construct a Map from JSON</jc>
* String json = <js>"{a:'A',b:{c:'C',d:123}}"</js>;
* m = <jk>new</jk> ObjectMap(json);
- *
+ *
* <jc>// Construct a Map using the append method</jc>
* m = <jk>new</jk> ObjectMap().append(<js>"foo"</js>,<js>"x"</js>).append(<js>"bar"</js>,123)
* .append(<js>"baz"</js>,<jk>true</jk>);
- *
+ *
* <jc>// Construct a Map from XML generated by XmlSerializer</jc>
* String xml = <js>"<object><a type='string'>A</a><b type='object'><c type='string'>C</c><d type='number'>123</d></b></object>"</js>;
* m = <jk>new</jk> ObjectMap(xml, DataFormat.<jsf>XML</jsf>);
@@ -59,45 +59,45 @@ import org.apache.juneau.utils.*;
* m = (Map)XmlParser.<jsf>DEFAULT</jsf>.parse(Object.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* m = XmlParser.<jsf>DEFAULT</jsf>.parse(Map.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* m = XmlParser.<jsf>DEFAULT</jsf>.parse(ObjectMap.<jk>class</jk>, xml); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Construct a Map from a URL GET parameter string generated by UrlEncodingParser</jc>
* String urlParams = <js>"?a='A'&b={c:'C',d:123}"</js>;
* m = <jk>new</jk> ObjectMap(urlParams, DataFormat.<jsf>URLPARAM</jsf>);
* m = (Map)UrlEncodingParser.<jsf>DEFAULT</jsf>.parse(Object.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* m = UrlEncodingParser.<jsf>DEFAULT</jsf>.parse(Map.<jk>class</jk>, xml); <jc>// Equivalent</jc>
* m = UrlEncodingParser.<jsf>DEFAULT</jsf>.parse(ObjectMap.<jk>class</jk>, xml); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Construct JSON from ObjectMap</jc>
* m = <jk>new</jk> ObjectMap(<js>"{foo:'bar'},{baz:[123,true]}"</js>);
* json = m.toString(); <jc>// Produces "{foo:'bar'},{baz:[123,true]}"</jc>
* json = m.toString(JsonSerializer.<jsf>DEFAULT_CONDENSED</jsf>); <jc>// Equivalent</jc>
* json = JsonSerializer.<jsf>DEFAULT_CONDENSED</jsf>.serialize(m); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get a map entry as an Integer</jc>
* m = <jk>new</jk> ObjectMap(<js>"{foo:123}"</js>);
* Integer i = m.getInt(<js>"foo"</js>);
* i = m.get(Integer.<jk>class</jk>, <js>"foo"</js>); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get a map entry as a Float</jc>
* m = <jk>new</jk> ObjectMap(<js>"{foo:123}"</js>);
* Float f = m.getFloat(<js>"foo"</js>);
* f = m.get(Float.<jk>class</jk>, <js>"foo"</js>); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Same as above, except converted to a String</jc>
* m = <jk>new</jk> ObjectMap(<js>"{foo:123}"</js>);
* String s = m.getString(<js>"foo"</js>); <jc>// Returns "123"</jc>
* s = m.get(String.<jk>class</jk>, <js>"foo"</js>); <jc>// Equivalent</jc>
- *
+ *
* <jc>// Get one of the entries in the list as a bean (converted to a bean if it isn't already one)</jc>
* m = <jk>new</jk> ObjectMap(<js>"{person:{name:'John Smith',age:45}}"</js>);
* Person p = m.get(Person.<jk>class</jk>, <js>"person"</js>);
- *
+ *
* <jc>// Add an inner map</jc>
* ObjectMap m1 = <jk>new</jk> ObjectMap(<js>"{a:1}"</js>);
* ObjectMap m2 = <jk>new</jk> ObjectMap(<js>"{b:2}"</js>).setInner(m1);
* <jk>int</jk> a = m2.getInt(<js>"a"</js>); <jc>// a == 1 </jc>
* </p>
- *
+ *
* <p>
* This class is not thread safe.
*/
@@ -143,7 +143,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Construct an ObjectMap directly from a string using the specified parser.
- *
+ *
* @param s The string being parsed.
* @param p The parser to use to parse the input.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -163,7 +163,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Shortcut for <code><jk>new</jk> ObjectMap(string,JsonParser.<jsf>DEFAULT</jsf>);</code>
- *
+ *
* @param s The JSON text to parse.
* @throws ParseException If the input contains a syntax error or is malformed.
*/
@@ -173,7 +173,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Construct an ObjectMap directly from a reader using the specified parser.
- *
+ *
* @param r The reader to read from. The reader will be wrapped in a {@link BufferedReader} if it isn't already.
* @param p The parser to use to parse the input.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -186,7 +186,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Shortcut for <code><jk>new</jk> ObjectMap(reader, JsonParser.<jsf>DEFAULT</jsf>)</code>.
- *
+ *
* @param r The reader to read from. The reader will be wrapped in a {@link BufferedReader} if it isn't already.
* @throws ParseException If the input contains a syntax error or is malformed.
* @throws IOException If a problem occurred trying to read from the reader.
@@ -211,7 +211,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Construct an empty JSON object (i.e. an empty {@link LinkedHashMap}) with the specified bean context.
- *
+ *
* @param session The bean session to use for creating beans.
*/
public ObjectMap(BeanSession session) {
@@ -220,7 +220,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Construct a JSON object and fill it with the contents from the specified {@link Map}.
- *
+ *
* @param m The map whose entries will be copied into this map.
*/
public ObjectMap(Map<?,?> m) {
@@ -231,14 +231,14 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Set an inner map in this map to allow for chained get calls.
- *
+ *
* <p>
* If {@link #get(Object)} returns <jk>null</jk>, then {@link #get(Object)} will be called on the inner map.
- *
+ *
* <p>
* In addition to providing the ability to chain maps, this method also provides the ability to wrap an existing map
* inside another map so that you can add entries to the outer map without affecting the values on the inner map.
- *
+ *
* <p class='bcode'>
* ObjectMap m1 = <jk>new</jk> ObjectMap(<js>"{foo:1}"</js>);
* ObjectMap m2 = <jk>new</jk> ObjectMap().setInner(m1);
@@ -246,7 +246,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
* <jk>int</jk> foo1 = m1.getInt(<js>"foo"</js>); <jc>// foo1 == 1 </jc>
* <jk>int</jk> foo2 = m2.getInt(<js>"foo"</js>); <jc>// foo2 == 2 </jc>
* </p>
- *
+ *
* @param inner
* The inner map.
* Can be <jk>null</jk> to remove the inner map from an existing map.
@@ -259,7 +259,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Searches for the specified key in this map ignoring case.
- *
+ *
* @param key
* The key to search for.
* For performance reasons, it's preferable that the key be all lowercase.
@@ -274,13 +274,13 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Override the default bean session used for converting POJOs.
- *
+ *
* <p>
* Default is {@link BeanContext#DEFAULT}, which is sufficient in most cases.
- *
+ *
* <p>
* Useful if you're serializing/parsing beans with transforms defined.
- *
+ *
* @param session The new bean session.
* @return This object (for method chaining).
*/
@@ -291,7 +291,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the {@link BeanSession} currently associated with this map.
- *
+ *
* @return The {@link BeanSession} currently associated with this map.
*/
public BeanSession getBeanSession() {
@@ -300,10 +300,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for adding multiple objects to this map.
- *
+ *
* <p>
* Equivalent to calling {@code put(key, value)}, but returns this map so that the method can be chained.
- *
+ *
* @param key The key.
* @param value The value.
* @return This object (for method chaining).
@@ -315,10 +315,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for adding a contents of another map to this map.
- *
+ *
* <p>
* Equivalent to calling {@code putAll(m)}, but returns this map so that the method can be chained.
- *
+ *
* @param m The map whose contents should be added to this map.
* @return This object (for method chaining).
*/
@@ -337,33 +337,33 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link Map#get(Object) get()}, but casts or converts the value to the specified class type.
- *
+ *
* <p>
* This is the preferred get method for simple types.
- *
+ *
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* ObjectMap m = <jk>new</jk> ObjectMap(<js>"..."</js>);
- *
+ *
* <jc>// Value converted to a string.</jc>
* String s = m.get(<js>"key1"</js>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a bean.</jc>
* MyBean b = m.get(<js>"key2"</js>, MyBean.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a bean array.</jc>
* MyBean[] ba = m.get(<js>"key3"</js>, MyBean[].<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of objects.</jc>
* List l = m.get(<js>"key4"</js>, LinkedList.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map of object keys/values.</jc>
* Map m2 = m.get(<js>"key5"</js>, TreeMap.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
- *
+ *
* @param key The key.
* @param <T> The class type returned.
* @param type The class type returned.
@@ -375,47 +375,47 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #get(String,Class)}, but allows for complex data types consisting of collections or maps.
- *
+ *
* <p>
* The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps).
- *
+ *
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
* ObjectMap m = <jk>new</jk> ObjectMap(<js>"..."</js>);
- *
+ *
* <jc>// Value converted to a linked-list of strings.</jc>
* List<String> l1 = m.get(<js>"key1"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of beans.</jc>
* List<MyBean> l2 = m.get(<js>"key2"</js>, LinkedList.<jk>class</jk>, MyBean.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a linked-list of linked-lists of strings.</jc>
* List<List<String>> l3 = m.get(<js>"key3"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map of string keys/values.</jc>
* Map<String,String> m1 = m.get(<js>"key4"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
- *
+ *
* <jc>// Value converted to a map containing string keys and values of lists containing beans.</jc>
* Map<String,List<MyBean>> m2 = m.get(<js>"key5"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* <code>Collection</code> classes are assumed to be followed by zero or one objects indicating the element type.
- *
+ *
* <p>
* <code>Map</code> classes are assumed to be followed by zero or two meta objects indicating the key and value types.
- *
+ *
* <p>
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
- *
+ *
* <h5 class='section'>Notes:</h5>
* <ul>
* <li>Use the {@link #get(String, Class)} method instead if you don't need a parameterized map/collection.
* </ul>
- *
+ *
* @param key The key.
* @param <T> The class type returned.
* @param type The class type returned.
@@ -428,7 +428,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link Map#get(Object) get()}, but returns the default value if the key could not be found.
- *
+ *
* @param key The key.
* @param def The default value if the entry doesn't exist.
* @return The value, or the default value if the entry doesn't exist.
@@ -440,7 +440,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #get(String,Class)} but returns a default value if the value does not exist.
- *
+ *
* @param key The key.
* @param def The default value. Can be <jk>null</jk>.
* @param <T> The class type returned.
@@ -453,7 +453,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #get(String,Type,Type...)} but returns a default value if the value does not exist.
- *
+ *
* @param key The key.
* @param def The default value. Can be <jk>null</jk>.
* @param <T> The class type returned.
@@ -470,7 +470,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link Map#get(Object) get()}, but converts the raw value to the specified class type using the specified
* POJO swap.
- *
+ *
* @param key The key.
* @param pojoSwap The swap class used to convert the raw type to a transformed type.
* @param <T> The transformed class type.
@@ -494,7 +494,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the value for the first key in the list that has an entry in this map.
- *
+ *
* @param keys The keys to look up in order.
* @return The value of the first entry whose key exists, or <jk>null</jk> if none of the keys exist in this map.
*/
@@ -507,13 +507,13 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the value for the first key in the list that has an entry in this map.
- *
+ *
* <p>
* Casts or converts the value to the specified class type.
- *
+ *
* <p>
* See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
- *
+ *
* @param type The class type to convert the value to.
* @param <T> The class type to convert the value to.
* @param keys The keys to look up in order.
@@ -529,28 +529,28 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #get(String,Class) get(String,Class)}, but the key is a slash-delimited path used to traverse
* entries in this POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* <jk>long</jk> l = m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(<js>"0"</js>)
* .getLong(<js>"baz"</js>);
- *
+ *
* <jc>// Using this method</jc>
* <jk>long</jk> l = m.getAt(<js>"foo/bar/0/baz"</js>, <jk>long</jk>.<jk>class</jk>);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param type The class type.
- *
+ *
* @param <T> The class type.
* @return The value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -560,15 +560,15 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #getAt(String,Class)}, but allows for conversion to complex maps and collections.
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param type The class type.
* @param args The class parameter types.
- *
+ *
* @param <T> The class type.
* @return The value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -579,25 +579,25 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as <code>put(String,Object)</code>, but the key is a slash-delimited path used to traverse entries in this
* POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(<js>"0"</js>)
* .put(<js>"baz"</js>, 123);
- *
+ *
* <jc>// Using this method</jc>
* m.putAt(<js>"foo/bar/0/baz"</js>, 123);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param o The new value.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
@@ -608,24 +608,24 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Similar to {@link #putAt(String,Object) putAt(String,Object)}, but used to append to collections and arrays.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).append(123);
- *
+ *
* <jc>// Using this method</jc>
* m.postAt(<js>"foo/bar"</js>, 123);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @param o The new value.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
@@ -637,24 +637,24 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Similar to {@link #remove(Object) remove(Object)}, but the key is a slash-delimited path used to traverse entries
* in this POJO.
- *
+ *
* <p>
* For example, the following code is equivalent:
* </p>
* <p class='bcode'>
* ObjectMap m = getObjectMap();
- *
+ *
* <jc>// Long way</jc>
* m.getObjectMap(<js>"foo"</js>).getObjectList(<js>"bar"</js>).getObjectMap(0).remove(<js>"baz"</js>);
- *
+ *
* <jc>// Using this method</jc>
* m.deleteAt(<js>"foo/bar/0/baz"</js>);
* </p>
- *
+ *
* <p>
* This method uses the {@link PojoRest} class to perform the lookup, so the map can contain any of the various
* class types that the {@link PojoRest} class supports (e.g. beans, collections, arrays).
- *
+ *
* @param path The path to the entry.
* @return The previous value, or <jk>null</jk> if the entry doesn't exist.
*/
@@ -664,10 +664,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for inserting JSON directly into an attribute on this object.
- *
+ *
* <p>
* The JSON text can be an object (i.e. <js>"{...}"</js>) or an array (i.e. <js>"[...]"</js>).
- *
+ *
* @param key The key.
* @param json The JSON text that will be parsed into an Object and then inserted into this map.
* @throws ParseException If the input contains a syntax error or is malformed.
@@ -678,10 +678,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link String}.
- *
+ *
* <p>
* Shortcut for <code>get(key, String.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
*/
@@ -691,10 +691,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link String}.
- *
+ *
* <p>
* Shortcut for <code>get(key, String[].<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
*/
@@ -704,7 +704,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #getStringArray(String)} but returns a default value if the value cannot be found.
- *
+ *
* @param key The map key.
* @param def The default value if value is not found.
* @return The value converted to a string array.
@@ -727,10 +727,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link String}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, String.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -741,10 +741,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to an {@link Integer}.
- *
+ *
* <p>
* Shortcut for <code>get(key, Integer.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -755,10 +755,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to an {@link Integer}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, Integer.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -770,10 +770,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Long}.
- *
+ *
* <p>
* Shortcut for <code>get(key, Long.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -784,10 +784,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Long}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, Long.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -799,10 +799,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Boolean}.
- *
+ *
* <p>
* Shortcut for <code>get(key, Boolean.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -813,10 +813,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Boolean}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, Boolean.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -828,10 +828,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Map}.
- *
+ *
* <p>
* Shortcut for <code>get(key, Map.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -842,10 +842,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Map}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, Map.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -857,7 +857,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #getMap(String, Map)} except converts the keys and values to the specified types.
- *
+ *
* @param key The key.
* @param keyType The key type class.
* @param valType The value type class.
@@ -874,10 +874,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link List}.
- *
+ *
* <p>
* Shortcut for <code>get(key, List.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -888,10 +888,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link List}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, List.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -903,7 +903,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #getList(String, List)} except converts the elements to the specified types.
- *
+ *
* @param key The key.
* @param elementType The element type class.
* @param def The default value if the map doesn't contain the specified mapping.
@@ -919,10 +919,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link Map}.
- *
+ *
* <p>
* Shortcut for <code>get(key, ObjectMap.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -933,10 +933,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link ObjectMap}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, ObjectMap.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -948,10 +948,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link ObjectList}.
- *
+ *
* <p>
* Shortcut for <code>get(key, ObjectList.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @return The converted value, or <jk>null</jk> if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -962,10 +962,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the specified entry value converted to a {@link ObjectList}.
- *
+ *
* <p>
* Shortcut for <code>getWithDefault(key, defVal, ObjectList.<jk>class</jk>)</code>.
- *
+ *
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @return The converted value, or the default value if the map contains no mapping for this key.
@@ -977,10 +977,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link String}.
- *
+ *
* <p>
* Shortcut for <code>find(String.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -992,10 +992,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to an {@link Integer}.
- *
+ *
* <p>
* Shortcut for <code>find(Integer.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1008,10 +1008,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link Long}.
- *
+ *
* <p>
* Shortcut for <code>find(Long.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1024,10 +1024,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link Boolean}.
- *
+ *
* <p>
* Shortcut for <code>find(Boolean.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1040,10 +1040,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link Map}.
- *
+ *
* <p>
* Shortcut for <code>find(Map.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1056,10 +1056,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link List}.
- *
+ *
* <p>
* Shortcut for <code>find(List.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1072,10 +1072,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link ObjectMap}.
- *
+ *
* <p>
* Shortcut for <code>find(ObjectMap.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1088,10 +1088,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first entry that exists converted to a {@link ObjectList}.
- *
+ *
* <p>
* Shortcut for <code>find(ObjectList.<jk>class</jk>, keys)</code>.
- *
+ *
* @param keys The list of keys to look for.
* @return
* The converted value of the first key in the list that has an entry in this map, or <jk>null</jk> if the map
@@ -1104,7 +1104,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the first key in the map.
- *
+ *
* @return The first key in the map, or <jk>null</jk> if the map is empty.
*/
public String getFirstKey() {
@@ -1113,7 +1113,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns the class type of the object at the specified index.
- *
+ *
* @param key The key into this map.
* @return
* The data type of the object at the specified key, or <jk>null</jk> if the value is null or does not exist.
@@ -1127,7 +1127,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
* @param key The key.
* @param defVal The default value if the map doesn't contain the specified mapping.
* @param type The class type.
- *
+ *
* @param <T> The class type.
* @return The converted value, or the default value if the map contains no mapping for this key.
* @throws InvalidDataConversionException If value cannot be converted.
@@ -1141,7 +1141,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for removing several keys at once.
- *
+ *
* @param keys The list of keys to remove.
*/
public void removeAll(Collection<String> keys) {
@@ -1151,7 +1151,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for removing several keys at once.
- *
+ *
* @param keys The list of keys to remove.
*/
public void removeAll(String... keys) {
@@ -1170,7 +1170,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns <jk>true</jk> if this map contains the specified key, ignoring the inner map if it exists.
- *
+ *
* @param key The key to look up.
* @return <jk>true</jk> if this map contains the specified key.
*/
@@ -1180,7 +1180,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns a copy of this <code>ObjectMap</code> with only the specified keys.
- *
+ *
* @param keys The keys of the entries to copy.
* @return A new map with just the keys and values from this map.
*/
@@ -1195,7 +1195,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Returns a copy of this <code>ObjectMap</code> without the specified keys.
- *
+ *
* @param keys The keys of the entries not to copy.
* @return A new map without the keys and values from this map.
*/
@@ -1214,7 +1214,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Sets a value in this map if the entry does not exist or the value is <jk>null</jk>.
- *
+ *
* @param key The map key.
* @param val The value to set if the current value does not exist or is <jk>null</jk>.
* @return This object (for method chaining).
@@ -1228,7 +1228,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Sets a value in this map if the entry does not exist or the value is <jk>null</jk> or an empty string.
- *
+ *
* @param key The map key.
* @param val The value to set if the current value does not exist or is <jk>null</jk> or an empty string.
* @return This object (for method chaining).
@@ -1242,10 +1242,10 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Converts this map into an object of the specified type.
- *
+ *
* <p>
* If this map contains a <js>"_type"</js> entry, it must be the same as or a subclass of the <code>type</code>.
- *
+ *
* @param <T> The class type to convert this map object to.
* @param type The class type to convert this map object to.
* @return The new object.
@@ -1265,7 +1265,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Same as {@link #cast(Class)}, except allows you to specify a {@link ClassMeta} parameter.
- *
+ *
* @param <T> The class type to convert this map object to.
* @param cm The class type to convert this map object to.
* @return The new object.
@@ -1385,7 +1385,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Serialize this object into a string using the specified serializer.
- *
+ *
* @param serializer The serializer to use to convert this object to a string.
* @return This object serialized as a string.
* @throws SerializeException If a problem occurred trying to convert the output.
@@ -1409,7 +1409,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
/**
* Convenience method for serializing this map to the specified <code>Writer</code> using the
* {@link JsonSerializer#DEFAULT} serializer.
- *
+ *
* @param w The writer to serialize this object to.
* @return This object (for method chaining).
* @throws IOException If a problem occurred trying to write to the writer.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
index 7863f2a..0a2ebe2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
@@ -16,11 +16,11 @@ import org.apache.juneau.annotation.*;
/**
* Defines an API for converting conventional bean property names to some other form.
- *
+ *
* <p>
* For example, given the bean property <js>"fooBarURL"</js>, the {@link PropertyNamerDLC} property namer will convert
* this to <js>"foo-bar-url"</js>.
- *
+ *
* <p>
* Property namers are associated with beans through the {@link Bean#propertyNamer @Bean.propertyNamer()} annotation.
*/
@@ -28,7 +28,7 @@ public interface PropertyNamer {
/**
* Convert the specified default property name to some other value.
- *
+ *
* @param name The original bean property name.
* @return The converted property name.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDLC.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDLC.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDLC.java
index db21ed7..910be07 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDLC.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDLC.java
@@ -14,8 +14,8 @@ package org.apache.juneau;
/**
* Converts property names to dashed-lower-case format.
- *
- * <h5 class='section'>Examples:</h5>
+ *
+ * <h5 class='section'>Example:</h5>
* <ul>
* <li><js>"fooBar"</js> -> <js>"foo-bar"</js>
* <li><js>"fooBarURL"</js> -> <js>"foo-bar-url"</js>
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDefault.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDefault.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDefault.java
index 2b6e18f..3e5a6b3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDefault.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerDefault.java
@@ -16,15 +16,15 @@ import java.beans.*;
/**
* Default property namer.
- *
- * <h5 class='section'>Examples:</h5>
+ *
+ * <h5 class='section'>Example:</h5>
* <ul>
* <li><js>"fooBar"</js> -> <js>"fooBar"</js>
* <li><js>"fooBarURL"</js> -> <js>"fooBarURL"</js>
* <li><js>"FooBarURL"</js> -> <js>"fooBarURL"</js>
* <li><js>"URL"</js> -> <js>"URL"</js>
* </ul>
- *
+ *
* <p>
* See {@link Introspector#decapitalize(String)} for exact rules.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerULC.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerULC.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerULC.java
index e5a4672..2d9cfcc 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerULC.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamerULC.java
@@ -14,8 +14,8 @@ package org.apache.juneau;
/**
* Converts property names to underscore-lower-case format.
- *
- * <h5 class='section'>Examples:</h5>
+ *
+ * <h5 class='section'>Example:</h5>
* <ul>
* <li><js>"fooBar"</js> -> <js>"foo_bar"</js>
* <li><js>"fooBarURL"</js> -> <js>"foo_bar_url"</js>
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
index ef7c8bf..34640ec 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
@@ -29,7 +29,8 @@ import org.apache.juneau.json.*;
* The general idea behind a property store is to serve as a reusable configuration of an artifact (e.g. a Serializer)
* such that the artifact can be cached and reused if the property stores are 'equal'.
*
- * <h6 class='topic'>Concept</h6>
+ *
+ * <h5 class='topic'>Concept</h5>
*
* <p>
* For example, two serializers of the same type created with the same configuration will always end up being
@@ -45,7 +46,8 @@ import org.apache.juneau.json.*;
* This has the effect of significantly improving performance, especially if you're creating many Serializers and
* Parsers.
*
- * <h6 class='topic'>PropertyStoreBuilder</h6>
+ *
+ * <h5 class='topic'>PropertyStoreBuilder</h5>
*
* <p>
* The {@link PropertyStoreBuilder} class is used to build up and instantiate immutable <code>PropertyStore</code>
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStoreBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStoreBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStoreBuilder.java
index 2705db0..6d0e8f5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStoreBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStoreBuilder.java
@@ -98,7 +98,7 @@ public class PropertyStoreBuilder {
/**
* Sets a configuration property value on this object.
- *
+ *
* @param key
* The configuration property key.
* <br>(e.g <js>"BeanContext.foo.ss/add.1"</js>)
@@ -172,10 +172,10 @@ public class PropertyStoreBuilder {
/**
* Convenience method for setting multiple properties in one call.
- *
+ *
* <p>
* This replaces any previous configuration properties set on this store.
- *
+ *
* @param newProperties The new properties to set.
* @return This object (for method chaining).
*/
@@ -188,10 +188,10 @@ public class PropertyStoreBuilder {
/**
* Convenience method for setting multiple properties in one call.
- *
+ *
* <p>
* This appends to any previous configuration properties set on this store.
- *
+ *
* @param newProperties The new properties to set.
* @return This object (for method chaining).
*/
@@ -207,7 +207,7 @@ public class PropertyStoreBuilder {
/**
* Adds one or more values to a SET, LIST, or MAP property.
- *
+ *
* @param key The property key.
* @param arg
* The argument.
@@ -249,7 +249,7 @@ public class PropertyStoreBuilder {
*
* <p>
* Shortcut for calling <code>addTo(key, <jk>null</jk>, value);</code>.
- *
+ *
* @param key The property key.
* @param value
* The new value to add to the property.
@@ -266,7 +266,7 @@ public class PropertyStoreBuilder {
/**
* Removes a value from a SET or LIST property.
- *
+ *
* @param key The property key.
* @param value The property value in the property.
* @return This object (for method chaining).
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Session.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Session.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Session.java
index daaed58..5a9b510 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Session.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Session.java
@@ -24,7 +24,7 @@ import org.apache.juneau.serializer.*;
/**
* A one-time-use non-thread-safe object that's meant to be used once and then thrown away.
- *
+ *
* <p>
* Serializers and parsers use session objects to retrieve config properties and to use it as a scratchpad during
* serialize and parse actions.
@@ -40,7 +40,7 @@ public abstract class Session {
/**
* Default constructor.
- *
+ *
* @param args
* Runtime arguments.
*/
@@ -194,10 +194,10 @@ public abstract class Session {
/**
* Adds an arbitrary object to this session's cache.
- *
+ *
* <p>
* Can be used to store objects for reuse during a session.
- *
+ *
* @param key The key. Can be any string.
* @param val The cached object.
*/
@@ -209,10 +209,10 @@ public abstract class Session {
/**
* Adds arbitrary objects to this session's cache.
- *
+ *
* <p>
* Can be used to store objects for reuse during a session.
- *
+ *
* @param cacheObjects
* The objects to add to this session's cache.
* No-op if <jk>null</jk>.
@@ -227,7 +227,7 @@ public abstract class Session {
/**
* Returns an object stored in the session cache.
- *
+ *
* @param c The class type of the object.
* @param key The session object key.
* @return The cached object, or <jk>null</jk> if it doesn't exist.
@@ -239,7 +239,7 @@ public abstract class Session {
/**
* Logs a warning message.
- *
+ *
* @param msg The warning message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
@@ -252,7 +252,7 @@ public abstract class Session {
/**
* Returns <jk>true</jk> if warnings occurred in this session.
- *
+ *
* @return <jk>true</jk> if warnings occurred in this session.
*/
public final boolean hasWarnings() {
@@ -261,7 +261,7 @@ public abstract class Session {
/**
* Returns the warnings that occurred in this session.
- *
+ *
* @return The warnings that occurred in this session, or <jk>null</jk> if no warnings occurred.
*/
public final List<String> getWarnings() {
@@ -270,10 +270,10 @@ public abstract class Session {
/**
* Returns the logger associated with this session.
- *
+ *
* <p>
* Subclasses can override this method to provide their own logger.
- *
+ *
* @return The logger associated with this session.
*/
protected final JuneauLogger getLogger() {
@@ -284,7 +284,7 @@ public abstract class Session {
/**
* Returns the properties defined on this bean context as a simple map for debugging purposes.
- *
+ *
* @return A new map containing the properties defined on this context.
*/
public ObjectMap asMap() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/SessionArgs.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/SessionArgs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/SessionArgs.java
index 7c26085..0d1d008 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/SessionArgs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/SessionArgs.java
@@ -31,7 +31,7 @@ public class SessionArgs {
/**
* Constructor.
- *
+ *
* @param properties
* Session-level properties.
* <br>These override context-level properties.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Setter.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Setter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Setter.java
index d81da79..b831dbc 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Setter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Setter.java
@@ -21,7 +21,7 @@ public interface Setter {
/**
* Call the setter on the specified object.
- *
+ *
* @param object The object to call the setter on
* @param value The value to set.
* @throws Exception
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Streamable.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Streamable.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Streamable.java
index 3d98b92..31436a1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Streamable.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Streamable.java
@@ -18,7 +18,7 @@ import org.apache.juneau.http.*;
/**
* Interface that identifies that an object can be serialized directly to an output stream.
- *
+ *
* <p>
* Instances must identify the media type of the content by implementing the {@link #getMediaType()} method.
*/
@@ -26,7 +26,7 @@ public interface Streamable {
/**
* Serialize this object to the specified output stream.
- *
+ *
* @param os The output stream to stream to.
* @throws IOException
*/
@@ -34,7 +34,7 @@ public interface Streamable {
/**
* Returns the serialized media type for this resource (e.g. <js>"text/html"</js>).
- *
+ *
* @return The media type, or <jk>null</jk> if the media type is not known.
*/
MediaType getMediaType();
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
index d42b0f5..a76c0a3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
@@ -20,7 +20,7 @@ import org.apache.juneau.parser.*;
/**
* Represents a URL broken into authority/context-root/servlet-path/path-info parts.
- *
+ *
* <p>
* A typical request against a URL takes the following form:
* <p class='bcode'>
@@ -28,7 +28,7 @@ import org.apache.juneau.parser.*;
* | authority | context | resource | path |
* +--------------------------------------------------+
* </p>
- *
+ *
* <p>
* This class allows you to convert URL strings to absolute (e.g. <js>"http://host:port/foo/bar"</js>) or root-relative
* (e.g. <js>"/foo/bar"</js>) URLs.
@@ -38,7 +38,7 @@ public class UriContext {
/**
* Default URI context.
- *
+ *
* <p>
* No information about authority, servlet-root, context-root, or path-info is known.
*/
@@ -52,13 +52,13 @@ public class UriContext {
/**
* Constructor.
- *
+ *
* <p>
* Leading and trailing slashes are trimmed of all parameters.
- *
+ *
* <p>
* Any parameter can be <jk>null</jk>. Blanks and nulls are equivalent.
- *
+ *
* @param authority
* The authority portion of URL (e.g. <js>"http://hostname:port"</js>)
* @param contextRoot
@@ -80,7 +80,7 @@ public class UriContext {
/**
* Default constructor.
- *
+ *
* <p>
* All <jk>null</jk> values.
*/
@@ -94,7 +94,7 @@ public class UriContext {
* <p>
* Input string is a JSON object with the following format:
* <js>{authority:'xxx',contextRoot:'xxx',servletPath:'xxx',pathInfo:'xxx'}</js>
- *
+ *
* @param s
* The input string.
* <br>Example: <js>{authority:'http://localhost:10000',contextRoot:'/myContext',servletPath:'/myServlet',pathInfo:'/foo'}</js>
@@ -113,13 +113,13 @@ public class UriContext {
/**
* Returns the absolute URI of just the authority portion of this URI context.
- *
+ *
* <p>
* Example: <js>"http://hostname:port"</js>
- *
+ *
* <p>
* If the authority is null/empty, returns <js>"/"</js>.
- *
+ *
* @return
* The absolute URI of just the authority portion of this URI context.
* Never <jk>null</jk>.
@@ -130,10 +130,10 @@ public class UriContext {
/**
* Returns the absolute URI of the context-root portion of this URI context.
- *
+ *
* <p>
* Example: <js>"http://hostname:port/context-root"</js>
- *
+ *
* @return
* The absolute URI of the context-root portion of this URI context.
* Never <jk>null</jk>.
@@ -154,10 +154,10 @@ public class UriContext {
/**
* Returns the root-relative URI of the context portion of this URI context.
- *
+ *
* <p>
* Example: <js>"/context-root"</js>
- *
+ *
* @return
* The root-relative URI of the context portion of this URI context.
* Never <jk>null</jk>.
@@ -170,10 +170,10 @@ public class UriContext {
/**
* Returns the absolute URI of the resource portion of this URI context.
- *
+ *
* <p>
* Example: <js>"http://hostname:port/context-root/servlet-path"</js>
- *
+ *
* @return
* The absolute URI of the resource portion of this URI context.
* Never <jk>null</jk>.
@@ -202,10 +202,10 @@ public class UriContext {
/**
* Returns the root-relative URI of the resource portion of this URI context.
- *
+ *
* <p>
* Example: <js>"/context-root/servlet-path"</js>
- *
+ *
* @return
* The root-relative URI of the resource portion of this URI context.
* Never <jk>null</jk>.
@@ -230,7 +230,7 @@ public class UriContext {
/**
* Returns the parent of the URL returned by {@link #getAbsoluteServletPath()}.
- *
+ *
* @return The parent of the URL returned by {@link #getAbsoluteServletPath()}.
*/
public String getAbsoluteServletPathParent() {
@@ -239,7 +239,7 @@ public class UriContext {
/**
* Returns the parent of the URL returned by {@link #getRootRelativeServletPath()}.
- *
+ *
* @return The parent of the URL returned by {@link #getRootRelativeServletPath()}.
*/
public String getRootRelativeServletPathParent() {
@@ -248,10 +248,10 @@ public class UriContext {
/**
* Returns the absolute URI of the path portion of this URI context.
- *
+ *
* <p>
* Example: <js>"http://hostname:port/context-root/servlet-path/path-info"</js>
- *
+ *
* @return
* The absolute URI of the path portion of this URI context.
* Never <jk>null</jk>.
@@ -294,10 +294,10 @@ public class UriContext {
/**
* Returns the root-relative URI of the path portion of this URI context.
- *
+ *
* <p>
* Example: <js>"/context-root/servlet-path/path-info"</js>
- *
+ *
* @return
* The root-relative URI of the path portion of this URI context.
* Never <jk>null</jk>.
@@ -337,7 +337,7 @@ public class UriContext {
/**
* Returns the parent of the URL returned by {@link #getAbsolutePathInfo()}.
- *
+ *
* @return The parent of the URL returned by {@link #getAbsolutePathInfo()}.
*/
public String getAbsolutePathInfoParent() {
@@ -346,7 +346,7 @@ public class UriContext {
/**
* Returns the parent of the URL returned by {@link #getRootRelativePathInfo()}.
- *
+ *
* @return The parent of the URL returned by {@link #getRootRelativePathInfo()}.
*/
public String getRootRelativePathInfoParent() {
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriResolver.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriResolver.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriResolver.java
index a82e6c6..98c53a4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriResolver.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriResolver.java
@@ -24,16 +24,16 @@ import org.apache.juneau.internal.*;
/**
* Class used to create absolute and root-relative URIs based on your current URI 'location' and rules about how to
* make such resolutions.
- *
+ *
* <p>
* Combines a {@link UriContext} instance with rules for resolution ({@link UriResolution} and relativity
* ({@link UriRelativity}) to define simple {@link #resolve(Object)} and {@link #append(Appendable, Object)} methods.
- *
+ *
* <p>
* Three special protocols are used to represent context-root-relative, servlet-relative, and request-path-relative
* URIs:
* <js>"context:/"</js>, <js>"servlet:/"</js>, and <js>"request:/"</js>.
- *
+ *
* <p>
* The following list shows the protocols of URLs that can be resolved with this class:
* <ul>
@@ -58,7 +58,7 @@ public class UriResolver {
/**
* Constructor.
- *
+ *
* @param resolution Rule on how URIs should be resolved.
* @param relativity Rule on what relative URIs are relative to.
* @param uriContext Current URI context (i.e. the current URI 'location').
@@ -75,7 +75,7 @@ public class UriResolver {
/**
* Converts the specified URI to absolute form based on values in this context.
- *
+ *
* @param uri
* The URI to convert to absolute form.
* Can be any of the following:
@@ -117,18 +117,18 @@ public class UriResolver {
/**
* Relativizes a URI.
- *
+ *
* <p>
* Similar to {@link URI#relativize(URI)}, except supports special protocols (e.g. <js>"servlet:/"</js>) for both
* the <code>relativeTo</code> and <code>uri</code> parameters.
- *
+ *
* <p>
* For example, to relativize a URI to its servlet-relative form:
* <p class='bcode'>
* <jc>// relativeUri == "path/foo"</jc>
* String relativeUri = resolver.relativize(<js>"servlet:/"</js>, <js>"/context/servlet/path/foo"</js>);
* </p>
- *
+ *
* @param relativeTo The URI to relativize against.
* @param uri The URI to relativize.
* @return The relativized URI.
@@ -141,7 +141,7 @@ public class UriResolver {
/**
* Same as {@link #resolve(Object)} except appends result to the specified appendable.
- *
+ *
* @param a The appendable to append the URL to.
* @param o The URI to convert to absolute form.
* @return The same appendable passed in.
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Visibility.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Visibility.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Visibility.java
index 2e5a0f6..8d989cb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Visibility.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Visibility.java
@@ -16,10 +16,10 @@ import java.lang.reflect.*;
/**
* Defines class/field/method visibilities.
- *
+ *
* <p>
* Used to specify minimum levels of visibility when detecting bean classes, methods, and fields.
- *
+ *
* <p>
* Used in conjunction with the following bean context properties:
* <ul>
@@ -48,7 +48,7 @@ public enum Visibility {
/**
* Identifies if the specified mod matches this visibility.
- *
+ *
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jsf>PUBLIC</jsf>.isVisible(MyPublicClass.<jk>class</jk>.getModifiers()); <jc>//true</jc>
@@ -56,7 +56,7 @@ public enum Visibility {
* <jsf>PRIVATE</jsf>.isVisible(MyPrivateClass.<jk>class</jk>.getModifiers()); <jc>//true</jc>
* <jsf>NONE</jsf>.isVisible(MyPublicClass.<jk>class</jk>.getModifiers()); <jc>//false</jc>
* </p>
- *
+ *
* @param mod The modifier from the object being tested (e.g. results from {@link Class#getModifiers()}.
* @return <jk>true</jk> if this visibility matches the specified modifier attribute.
*/
@@ -72,7 +72,7 @@ public enum Visibility {
/**
* Shortcut for <code>isVisible(x.getModifiers());</code>
- *
+ *
* @param x The constructor to check.
* @return <jk>true</jk> if the constructor is at least as visible as this object.
*/
@@ -82,7 +82,7 @@ public enum Visibility {
/**
* Shortcut for <code>isVisible(x.getModifiers());</code>
- *
+ *
* @param x The method to check.
* @return <jk>true</jk> if the method is at least as visible as this object.
*/
@@ -92,7 +92,7 @@ public enum Visibility {
/**
* Shortcut for <code>isVisible(x.getModifiers());</code>
- *
+ *
* @param x The field to check.
* @return <jk>true</jk> if the field is at least as visible as this object.
*/
@@ -102,10 +102,10 @@ public enum Visibility {
/**
* Makes constructor accessible if it matches the visibility requirements, or returns <jk>null</jk> if it doesn't.
- *
+ *
* <p>
* Security exceptions thrown on the call to {@link Constructor#setAccessible(boolean)} are quietly ignored.
- *
+ *
* @param x The constructor.
* @return
* The same constructor if visibility requirements met, or <jk>null</jk> if visibility requirement not
@@ -122,10 +122,10 @@ public enum Visibility {
/**
* Makes method accessible if it matches the visibility requirements, or returns <jk>null</jk> if it doesn't.
- *
+ *
* <p>
* Security exceptions thrown on the call to {@link Method#setAccessible(boolean)} are quietly ignored.
- *
+ *
* @param x The method.
* @return
* The same method if visibility requirements met, or <jk>null</jk> if visibility requirement not
@@ -142,10 +142,10 @@ public enum Visibility {
/**
* Makes field accessible if it matches the visibility requirements, or returns <jk>null</jk> if it doesn't.
- *
+ *
* <p>
* Security exceptions thrown on the call to {@link Field#setAccessible(boolean)} are quietly ignored.
- *
+ *
* @param x The field.
* @return
* The same field if visibility requirements met, or <jk>null</jk> if visibility requirement not
@@ -162,7 +162,7 @@ public enum Visibility {
/**
* Attempts to call <code>x.setAccessible(<jk>true</jk>)</code> and quietly ignores security exceptions.
- *
+ *
* @param x The constructor.
* @return <jk>true</jk> if call was successful.
*/
@@ -178,7 +178,7 @@ public enum Visibility {
/**
* Attempts to call <code>x.setAccessible(<jk>true</jk>)</code> and quietly ignores security exceptions.
- *
+ *
* @param x The method.
* @return <jk>true</jk> if call was successful.
*/
@@ -194,7 +194,7 @@ public enum Visibility {
/**
* Attempts to call <code>x.setAccessible(<jk>true</jk>)</code> and quietly ignores security exceptions.
- *
+ *
* @param x The field.
* @return <jk>true</jk> if call was successful.
*/
http://git-wip-us.apache.org/repos/asf/juneau/blob/5686b8d6/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Writable.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Writable.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Writable.java
index 656cf37..bf507c8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Writable.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Writable.java
@@ -18,7 +18,7 @@ import org.apache.juneau.http.*;
/**
* Interface that identifies that an object can be serialized directly to a writer.
- *
+ *
* <p>
* Instances must identify the media type of the content by implementing the {@link #getMediaType()} method.
*/
@@ -26,7 +26,7 @@ public interface Writable {
/**
* Serialize this object to the specified writer.
- *
+ *
* @param w The writer to write to.
* @throws IOException
*/
@@ -34,7 +34,7 @@ public interface Writable {
/**
* Returns the serialized media type for this resource (e.g. <js>"text/html"</js>)
- *
+ *
* @return The media type, or <jk>null</jk> if the media type is not known.
*/
MediaType getMediaType();