juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject incubator-juneau git commit: Improve debuggability of contexts and sessions.
Date Thu, 29 Dec 2016 23:18:13 GMT
Repository: incubator-juneau
Updated Branches:
  refs/heads/master 96ee244f2 -> 615190add


Improve debuggability of contexts and sessions.

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/615190ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/615190ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/615190ad

Branch: refs/heads/master
Commit: 615190add20b778bd71767ec90ece7ffda9b4b19
Parents: 96ee244
Author: JamesBognar <jamesbognar@apache.org>
Authored: Thu Dec 29 18:18:08 2016 -0500
Committer: JamesBognar <jamesbognar@apache.org>
Committed: Thu Dec 29 18:18:08 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/juneau/BeanContext.java     | 66 +++++++----------
 .../java/org/apache/juneau/BeanSession.java     | 78 +++++++++-----------
 .../main/java/org/apache/juneau/Context.java    | 23 ++++++
 .../main/java/org/apache/juneau/ObjectMap.java  | 14 ++++
 .../main/java/org/apache/juneau/Session.java    | 22 ++++++
 .../apache/juneau/annotation/Overrideable.java  | 25 +++++++
 .../juneau/html/HtmlDocSerializerContext.java   | 13 ++++
 .../apache/juneau/html/HtmlParserContext.java   |  7 ++
 .../juneau/html/HtmlSerializerContext.java      | 12 +++
 .../apache/juneau/jena/RdfParserContext.java    | 14 ++++
 .../juneau/jena/RdfSerializerContext.java       | 17 +++++
 .../apache/juneau/json/JsonParserContext.java   |  7 ++
 .../juneau/json/JsonSerializerContext.java      | 10 +++
 .../juneau/msgpack/MsgPackParserContext.java    |  7 ++
 .../msgpack/MsgPackSerializerContext.java       |  7 ++
 .../main/java/org/apache/juneau/package.html    |  8 +-
 .../org/apache/juneau/parser/ParserContext.java | 11 +++
 .../juneau/serializer/SerializerContext.java    | 22 ++++++
 .../juneau/urlencoding/UonParserContext.java    |  9 +++
 .../urlencoding/UonSerializerContext.java       | 10 +++
 .../urlencoding/UrlEncodingParserContext.java   |  8 ++
 .../UrlEncodingSerializerContext.java           |  8 ++
 .../org/apache/juneau/xml/XmlParserContext.java | 16 ++++
 .../apache/juneau/xml/XmlSerializerContext.java | 16 ++++
 juneau-core/src/main/javadoc/overview.html      | 12 +--
 25 files changed, 351 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
index ded50ea..0a6f3d3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
@@ -1883,44 +1883,34 @@ public class BeanContext extends Context {
 		return false;
 	}
 
-	/**
-	 * Returns the properties defined on this bean context as a simple map.
-	 * Useful for debugging purposes.
-	 *
-	 * @return A new map containing the properties defined on this context.
-	 */
+	@Override /* Context */
 	public ObjectMap asMap() {
-		return new ObjectMap()
-			.append("id", System.identityHashCode(this))
-			.append("beansRequireDefaultConstructor", beansRequireDefaultConstructor)
-			.append("beansRequireSerializable", beansRequireSerializable)
-			.append("beansRequireSettersForGetters", beansRequireSettersForGetters)
-			.append("beansRequireSomeProperties", beansRequireSomeProperties)
-			.append("beanMapPutReturnsOldValue", beanMapPutReturnsOldValue)
-			.append("beanConstructorVisibility", beanConstructorVisibility)
-			.append("beanClassVisibility", beanClassVisibility)
-			.append("beanMethodVisibility", beanMethodVisibility)
-			.append("beanFieldVisibility", beanFieldVisibility)
-			.append("useInterfaceProxies", useInterfaceProxies)
-			.append("ignoreUnknownBeanProperties", ignoreUnknownBeanProperties)
-			.append("ignoreUnknownNullBeanProperties", ignoreUnknownNullBeanProperties)
-			.append("ignorePropertiesWithoutSetters", ignorePropertiesWithoutSetters)
-			.append("ignoreInvocationExceptionsOnGetters", ignoreInvocationExceptionsOnGetters)
-			.append("ignoreInvocationExceptionsOnSetters", ignoreInvocationExceptionsOnSetters)
-			.append("useJavaBeanIntrospector", useJavaBeanIntrospector)
-			.append("beanFilters", beanFilters)
-			.append("pojoSwaps", pojoSwaps)
-			.append("notBeanClasses", notBeanClasses)
-			.append("implClasses", implClasses)
-			.append("sortProperties", sortProperties);
-	}
-
-	@Override /* Object */
-	public String toString() {
-		try {
-			return asMap().toString(JsonSerializer.DEFAULT_LAX_READABLE);
-		} catch (SerializeException e) {
-			return e.getLocalizedMessage();
-		}
+		return super.asMap()
+			.append("BeanContext", new ObjectMap()
+				.append("id", System.identityHashCode(this))
+				.append("beansRequireDefaultConstructor", beansRequireDefaultConstructor)
+				.append("beansRequireSerializable", beansRequireSerializable)
+				.append("beansRequireSettersForGetters", beansRequireSettersForGetters)
+				.append("beansRequireSomeProperties", beansRequireSomeProperties)
+				.append("beanMapPutReturnsOldValue", beanMapPutReturnsOldValue)
+				.append("beanConstructorVisibility", beanConstructorVisibility)
+				.append("beanClassVisibility", beanClassVisibility)
+				.append("beanMethodVisibility", beanMethodVisibility)
+				.append("beanFieldVisibility", beanFieldVisibility)
+				.append("useInterfaceProxies", useInterfaceProxies)
+				.append("ignoreUnknownBeanProperties", ignoreUnknownBeanProperties)
+				.append("ignoreUnknownNullBeanProperties", ignoreUnknownNullBeanProperties)
+				.append("ignorePropertiesWithoutSetters", ignorePropertiesWithoutSetters)
+				.append("ignoreInvocationExceptionsOnGetters", ignoreInvocationExceptionsOnGetters)
+				.append("ignoreInvocationExceptionsOnSetters", ignoreInvocationExceptionsOnSetters)
+				.append("useJavaBeanIntrospector", useJavaBeanIntrospector)
+				.append("beanFilters", beanFilters)
+				.append("pojoSwaps", pojoSwaps)
+				.append("notBeanClasses", notBeanClasses)
+				.append("implClasses", implClasses)
+				.append("sortProperties", sortProperties)
+				.append("locale", locale)
+				.append("timeZone", timeZone)
+			);
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/BeanSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/src/main/java/org/apache/juneau/BeanSession.java
index cdc894f..3f01b95 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanSession.java
@@ -52,7 +52,7 @@ public class BeanSession extends Session {
 	 * @param timeZone The session timezone.
 	 * 	If <jk>null</jk>, then the timezone defined on the context is used.
 	 */
-	public BeanSession(BeanContext ctx, ObjectMap op, Locale locale, TimeZone timeZone) {
+	protected BeanSession(BeanContext ctx, ObjectMap op, Locale locale, TimeZone timeZone) {
 		super(ctx, op);
 		this.ctx = ctx;
 		if (op == null || op.isEmpty()) {
@@ -128,7 +128,7 @@ public class BeanSession extends Session {
 	 * @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
 	 * @return The converted value.
 	 */
-	public <T> T convertToType(Object value, Class<T> type) throws InvalidDataConversionException {
+	public final <T> T convertToType(Object value, Class<T> type) throws InvalidDataConversionException {
 		// Shortcut for most common case.
 		if (value != null && value.getClass() == type)
 			return (T)value;
@@ -147,7 +147,7 @@ public class BeanSession extends Session {
 	 * @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
 	 * @return The converted value.
 	 */
-	public <T> T convertToType(Object outer, Object value, Class<T> type) throws InvalidDataConversionException {
+	public final <T> T convertToType(Object outer, Object value, Class<T> type) throws InvalidDataConversionException {
 		return convertToType(outer, value, ctx.getClassMeta(type));
 	}
 
@@ -284,7 +284,7 @@ public class BeanSession extends Session {
 	 * @return The converted type.
 	 * @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
 	 */
-	public <T> T convertToType(Object value, ClassMeta<T> type) throws InvalidDataConversionException {
+	public final <T> T convertToType(Object value, ClassMeta<T> type) throws InvalidDataConversionException {
 		return convertToType(null, value, type);
 	}
 
@@ -300,7 +300,7 @@ public class BeanSession extends Session {
 	 * @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
 	 * @return The converted value.
 	 */
-	public <T> T convertToType(Object outer, Object value, ClassMeta<T> type) throws InvalidDataConversionException {
+	public final <T> T convertToType(Object outer, Object value, ClassMeta<T> type) throws InvalidDataConversionException {
 		if (type == null)
 			type = (ClassMeta<T>)ctx.object();
 
@@ -582,7 +582,7 @@ public class BeanSession extends Session {
 	 * @param list The contents to populate the array with.
 	 * @return A new object or primitive array.
 	 */
-	public Object toArray(ClassMeta<?> type, Collection<?> list) {
+	public final Object toArray(ClassMeta<?> type, Collection<?> list) {
 		if (list == null)
 			return null;
 		ClassMeta<?> componentType = type.getElementType();
@@ -622,7 +622,7 @@ public class BeanSession extends Session {
 	 * @param o The object to wrap in a map interface.  Must not be null.
 	 * @return The wrapped object.
 	 */
-	public <T> BeanMap<T> toBeanMap(T o) {
+	public final <T> BeanMap<T> toBeanMap(T o) {
 		return this.toBeanMap(o, (Class<T>)o.getClass());
 	}
 
@@ -632,7 +632,7 @@ public class BeanSession extends Session {
 	 * @param o The object being tested.
 	 * @return <jk>true</jk> if the specified object is considered a bean.
 	 */
-	public boolean isBean(Object o) {
+	public final boolean isBean(Object o) {
 		if (o == null)
 			return false;
 		return isBean(o.getClass());
@@ -644,7 +644,7 @@ public class BeanSession extends Session {
 	 * @param c The class being tested.
 	 * @return <jk>true</jk> if the specified class is considered a bean.
 	 */
-	public boolean isBean(Class<?> c) {
+	public final boolean isBean(Class<?> c) {
 		return getBeanMeta(c) != null;
 	}
 
@@ -672,7 +672,7 @@ public class BeanSession extends Session {
 	 * @throws BeanRuntimeException If specified object is not a bean according to the bean rules
 	 * 		specified in this context class.
 	 */
-	public <T> BeanMap<T> toBeanMap(T o, Class<? super T> c) throws BeanRuntimeException {
+	public final <T> BeanMap<T> toBeanMap(T o, Class<? super T> c) throws BeanRuntimeException {
 		assertFieldNotNull(o, "o");
 		assertFieldNotNull(c, "c");
 
@@ -702,7 +702,7 @@ public class BeanSession extends Session {
 	 * @param c The name of the class to create a new instance of.
 	 * @return A new instance of the class.
 	 */
-	public <T> BeanMap<T> newBeanMap(Class<T> c) {
+	public final <T> BeanMap<T> newBeanMap(Class<T> c) {
 		return newBeanMap(null, c);
 	}
 
@@ -716,7 +716,7 @@ public class BeanSession extends Session {
 	 * 	Should be <jk>null</jk> if not a member class.
 	 * @return A new instance of the class.
 	 */
-	public <T> BeanMap<T> newBeanMap(Object outer, Class<T> c) {
+	public final <T> BeanMap<T> newBeanMap(Object outer, Class<T> c) {
 		BeanMeta m = getBeanMeta(c);
 		if (m == null)
 			return null;
@@ -745,7 +745,7 @@ public class BeanSession extends Session {
 	 * @return A new bean object.
 	 * @throws BeanRuntimeException If the specified class is not a valid bean.
 	 */
-	public <T> T newBean(Class<T> c) throws BeanRuntimeException {
+	public final <T> T newBean(Class<T> c) throws BeanRuntimeException {
 		return newBean(null, c);
 	}
 
@@ -760,7 +760,7 @@ public class BeanSession extends Session {
 	 * @return A new bean object.
 	 * @throws BeanRuntimeException If the specified class is not a valid bean.
 	 */
-	public <T> T newBean(Object outer, Class<T> c) throws BeanRuntimeException {
+	public final <T> T newBean(Object outer, Class<T> c) throws BeanRuntimeException {
 		ClassMeta<T> cm = getClassMeta(c);
 		BeanMeta m = cm.getBeanMeta();
 		if (m == null)
@@ -789,7 +789,7 @@ public class BeanSession extends Session {
 	 * @return The {@link BeanMeta} for the specified class, or <jk>null</jk> if the class
 	 * 	is not a bean per the settings on this context.
 	 */
-	public <T> BeanMeta<T> getBeanMeta(Class<T> c) {
+	public final <T> BeanMeta<T> getBeanMeta(Class<T> c) {
 		if (c == null)
 			return null;
 		return getClassMeta(c).getBeanMeta();
@@ -808,7 +808,7 @@ public class BeanSession extends Session {
 	 * @param cm The class type.
 	 * @return The class type bound by this bean context.
 	 */
-	public <T> ClassMeta<T> normalizeClassMeta(ClassMeta<T> cm) {
+	public final <T> ClassMeta<T> normalizeClassMeta(ClassMeta<T> cm) {
 		return ctx.normalizeClassMeta(cm);
 	}
 
@@ -821,7 +821,7 @@ public class BeanSession extends Session {
 	 * @return If the class is not an array, returns a cached {@link ClassMeta} object.
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.<br>
 	 */
-	public <T> ClassMeta<T> getClassMeta(Class<T> c) {
+	public final <T> ClassMeta<T> getClassMeta(Class<T> c) {
 		return ctx.getClassMeta(c);
 	}
 
@@ -837,7 +837,7 @@ public class BeanSession extends Session {
 	 * @return If the key and value types are OBJECT, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <K,V,T extends Map<K,V>> ClassMeta<T> getMapClassMeta(Class<T> c, ClassMeta<K> keyType, ClassMeta<V> valueType) {
+	public final <K,V,T extends Map<K,V>> ClassMeta<T> getMapClassMeta(Class<T> c, ClassMeta<K> keyType, ClassMeta<V> valueType) {
 		return ctx.getMapClassMeta(c, keyType, valueType);
 	}
 
@@ -853,7 +853,7 @@ public class BeanSession extends Session {
 	 * @return If the key and value types are Object, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <K,V,T extends Map<K,V>> ClassMeta<T> getMapClassMeta(Class<T> c, Class<K> keyType, Class<V> valueType) {
+	public final <K,V,T extends Map<K,V>> ClassMeta<T> getMapClassMeta(Class<T> c, Class<K> keyType, Class<V> valueType) {
 		return getMapClassMeta(c, getClassMeta(keyType), getClassMeta(valueType));
 	}
 
@@ -867,7 +867,7 @@ public class BeanSession extends Session {
 	 * @return If the key and value types are Object, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <T extends Map> ClassMeta<T> getMapClassMeta(Class<T> c, Type keyType, Type valueType) {
+	public final <T extends Map> ClassMeta<T> getMapClassMeta(Class<T> c, Type keyType, Type valueType) {
 		return getMapClassMeta(c, getClassMeta(keyType), getClassMeta(valueType));
 	}
 
@@ -881,7 +881,7 @@ public class BeanSession extends Session {
 	 * @return If the element type is <code>OBJECT</code>, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <E,T extends Collection<E>> ClassMeta<T> getCollectionClassMeta(Class<T> c, ClassMeta<E> elementType) {
+	public final <E,T extends Collection<E>> ClassMeta<T> getCollectionClassMeta(Class<T> c, ClassMeta<E> elementType) {
 		return ctx.getCollectionClassMeta(c, elementType);
 	}
 
@@ -895,7 +895,7 @@ public class BeanSession extends Session {
 	 * @return If the element type is <code>OBJECT</code>, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <E,T extends Collection<E>> ClassMeta<T> getCollectionClassMeta(Class<T> c, Class<E> elementType) {
+	public final <E,T extends Collection<E>> ClassMeta<T> getCollectionClassMeta(Class<T> c, Class<E> elementType) {
 		return getCollectionClassMeta(c, getClassMeta(elementType));
 	}
 
@@ -908,7 +908,7 @@ public class BeanSession extends Session {
 	 * @return If the element type is <code>OBJECT</code>, returns a cached {@link ClassMeta} object.<br>
 	 * 	Otherwise, returns a new {@link ClassMeta} object every time.
 	 */
-	public <T extends Collection> ClassMeta<T> getCollectionClassMeta(Class<T> c, Type elementType) {
+	public final <T extends Collection> ClassMeta<T> getCollectionClassMeta(Class<T> c, Type elementType) {
 		return getCollectionClassMeta(c, getClassMeta(elementType));
 	}
 
@@ -925,7 +925,7 @@ public class BeanSession extends Session {
 	 * 	</ul>
 	 * @return A ClassMeta object, or <jk>null</jk> if the object is null.
 	 */
-	public ClassMeta getClassMeta(Type o) {
+	public final ClassMeta getClassMeta(Type o) {
 		return ctx.getClassMeta(o, null);
 	}
 
@@ -936,7 +936,7 @@ public class BeanSession extends Session {
 	 * @param classes The array of classes to get class metas for.
 	 * @return An array of {@link ClassMeta} objects corresponding to the classes.  Never <jk>null</jk>.
 	 */
-	public ClassMeta<?>[] getClassMetas(Class<?>[] classes) {
+	public final ClassMeta<?>[] getClassMetas(Class<?>[] classes) {
 		assertFieldNotNull(classes, "classes");
 		ClassMeta<?>[] cm = new ClassMeta<?>[classes.length];
 		for (int i = 0; i < classes.length; i++)
@@ -951,7 +951,7 @@ public class BeanSession extends Session {
 	 * @param o The class to find the class type for.
 	 * @return The ClassMeta object, or <jk>null</jk> if {@code o} is <jk>null</jk>.
 	 */
-	public <T> ClassMeta<T> getClassMetaForObject(T o) {
+	public final <T> ClassMeta<T> getClassMetaForObject(T o) {
 		if (o == null)
 			return null;
 		return (ClassMeta<T>)getClassMeta(o.getClass());
@@ -971,7 +971,7 @@ public class BeanSession extends Session {
 	 * @param s The class name.
 	 * @return The ClassMeta corresponding to the class name string.
 	 */
-	public ClassMeta<?> getClassMetaFromString(String s) {
+	public final ClassMeta<?> getClassMetaFromString(String s) {
 		return ctx.getClassMetaFromString(s);
 	}
 
@@ -1045,22 +1045,14 @@ public class BeanSession extends Session {
 		return ctx.classLoader;
 	}
 
-	/**
-	 * Returns the settings on this session object as a simple map of key/value pairs.
-	 *
-	 * @return A new map containing the settings on this session.
-	 */
-	public ObjectMap asMap() {
-		return ctx.asMap().append("locale", locale).append("timeZone", timeZone);
-	}
-
-	@Override /* Object */
-	public String toString() {
-		try {
-			return asMap().toString(JsonSerializer.DEFAULT_LAX_READABLE);
-		} catch (SerializeException e) {
-			return e.getLocalizedMessage();
-		}
+	@Override /* Session */
+	public final ObjectMap asMap() {
+		return super.asMap()
+			.appendAll(ctx.asMap())
+			.append("BeanSession", new ObjectMap()
+				.append("locale", locale)
+				.append("timeZone", timeZone)
+			);
 	}
 
 	@Override /* Session */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/Context.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/Context.java b/juneau-core/src/main/java/org/apache/juneau/Context.java
index 2b0058f..fe151cb 100644
--- a/juneau-core/src/main/java/org/apache/juneau/Context.java
+++ b/juneau-core/src/main/java/org/apache/juneau/Context.java
@@ -12,6 +12,10 @@
 // ***************************************************************************************************************************
 package org.apache.juneau;
 
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.serializer.*;
+
 /**
  * A reusable stateless thread-safe read-only configuration, typically used for creating one-time use {@link Session} objects.
  * <p>
@@ -34,4 +38,23 @@ public abstract class Context {
 	 * @param configFactory The factory that created this config.
 	 */
 	public Context(ContextFactory configFactory) {}
+
+	/**
+	 * 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.
+	 */
+	@Overrideable
+	public ObjectMap asMap() {
+		return new ObjectMap();
+	}
+
+	@Override /* Object */
+	public final String toString() {
+		try {
+			return asMap().toString(JsonSerializer.DEFAULT_LAX_READABLE);
+		} catch (SerializeException e) {
+			return e.getLocalizedMessage();
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
index 65cd666..c8af10e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
@@ -309,6 +309,20 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 		return this;
 	}
 
+	/**
+	 * 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).
+	 */
+	public ObjectMap appendAll(Map<String,Object> m) {
+		putAll(m);
+		return this;
+	}
+
 	@Override /* Map */
 	public Object get(Object key) {
 		Object o = super.get(key);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/Session.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/Session.java b/juneau-core/src/main/java/org/apache/juneau/Session.java
index 9a89a57..3edcf80 100644
--- a/juneau-core/src/main/java/org/apache/juneau/Session.java
+++ b/juneau-core/src/main/java/org/apache/juneau/Session.java
@@ -15,7 +15,10 @@ package org.apache.juneau;
 import java.text.*;
 import java.util.*;
 
+import org.apache.juneau.annotation.*;
 import org.apache.juneau.internal.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.serializer.*;
 
 /**
  * A one-time-use non-thread-safe object that's meant to be used once and then thrown away.
@@ -139,6 +142,25 @@ 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.
+	 */
+	@Overrideable
+	public ObjectMap asMap() {
+		return new ObjectMap();
+	}
+
+	@Override /* Object */
+	public String toString() {
+		try {
+			return asMap().toString(JsonSerializer.DEFAULT_LAX_READABLE);
+		} catch (SerializeException e) {
+			return e.getLocalizedMessage();
+		}
+	}
+
+	/**
 	 * Perform cleanup on this context object if necessary.
 	 *
 	 * @return <jk>true</jk> if this method wasn't previously called.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/annotation/Overrideable.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Overrideable.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Overrideable.java
new file mode 100644
index 0000000..4a9bec5
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Overrideable.java
@@ -0,0 +1,25 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
+// * with the License.  You may obtain a copy of the License at                                                              *
+// *                                                                                                                         *
+// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
+// *                                                                                                                         *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
+// * specific language governing permissions and limitations under the License.                                              *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Identifies a method as specifically designed to be overridden and augmented.
+ */
+@Documented
+@Target({METHOD})
+@Inherited
+public @interface Overrideable {}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
index c993370..64e1009 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
@@ -292,4 +292,17 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
 		nowrap = cf.getProperty(HTMLDOC_nowrap, boolean.class, false);
 		links = cf.getMap(HTMLDOC_links, String.class, String.class, Collections.<String,String>emptyMap());
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("HtmlDocSerializerContext", new ObjectMap()
+				.append("cssImports", cssImports)
+				.append("title", title)
+				.append("description", description)
+				.append("cssUrl", cssUrl)
+				.append("nowrap", nowrap)
+				.append("links", links)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java
index 69b0207..49808d1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java
@@ -58,4 +58,11 @@ public final class HtmlParserContext extends ParserContext {
 	public HtmlParserContext(ContextFactory cf) {
 		super(cf);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("HtmlParserContext", new ObjectMap()
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
index e1a29ae..59be25e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java
@@ -189,4 +189,16 @@ public class HtmlSerializerContext extends XmlSerializerContext {
 		labelParameter = cf.getProperty(HTML_labelParameter, String.class, "label");
 		addKeyValueTableHeaders = cf.getProperty(HTML_addKeyValueTableHeaders, Boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("HtmlSerializerContext", new ObjectMap()
+				.append("uriAnchorText", uriAnchorText)
+				.append("lookForLabelParameters", lookForLabelParameters)
+				.append("detectLinksInStrings", detectLinksInStrings)
+				.append("labelParameter", labelParameter)
+				.append("addKeyValueTableHeaders", addKeyValueTableHeaders)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/jena/RdfParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParserContext.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParserContext.java
index 0f18d3f..eb0c1f9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParserContext.java
@@ -98,4 +98,18 @@ public final class RdfParserContext extends ParserContext implements RdfCommonCo
 		juneauBpNs = cf.getProperty(RDF_juneauBpNs, Namespace.class, new Namespace("j", "http://www.apache.org/juneaubp/"));
 		collectionFormat = cf.getProperty(RDF_collectionFormat, RdfCollectionFormat.class, RdfCollectionFormat.DEFAULT);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("RdfParserContext", new ObjectMap()
+				.append("trimWhitespace", trimWhitespace)
+				.append("looseCollections", looseCollections)
+				.append("rdfLanguage", rdfLanguage)
+				.append("juneauNs", juneauNs)
+				.append("juneauBpNs", juneauBpNs)
+				.append("collectionFormat", collectionFormat)
+			);
+	}
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
index 9a19e5f..fec2789 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializerContext.java
@@ -176,4 +176,21 @@ public final class RdfSerializerContext extends SerializerContext implements Rdf
 		collectionFormat = cf.getProperty(RDF_collectionFormat, RdfCollectionFormat.class, RdfCollectionFormat.DEFAULT);
 		namespaces = cf.getProperty(RDF_namespaces, Namespace[].class, new Namespace[0]);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("RdfSerializerContext", new ObjectMap()
+				.append("addLiteralTypes", addLiteralTypes)
+				.append("addRootProperty", addRootProperty)
+				.append("useXmlNamespaces", useXmlNamespaces)
+				.append("looseCollections", looseCollections)
+				.append("autoDetectNamespaces", autoDetectNamespaces)
+				.append("rdfLanguage", rdfLanguage)
+				.append("juneauNs", juneauNs)
+				.append("juneauBpNs", juneauBpNs)
+				.append("collectionFormat", collectionFormat)
+				.append("namespaces", namespaces)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
index 67e6810..f397af9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java
@@ -58,4 +58,11 @@ public final class JsonParserContext extends ParserContext {
 	public JsonParserContext(ContextFactory cf) {
 		super(cf);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("JsonParserContext", new ObjectMap()
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
index 8e07d77..8478384 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java
@@ -135,4 +135,14 @@ public final class JsonSerializerContext extends SerializerContext {
 		useWhitespace = cf.getProperty(JSON_useWhitespace, boolean.class, false);
 		escapeSolidus = cf.getProperty(JSON_escapeSolidus, boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("JsonSerializerContext", new ObjectMap()
+				.append("simpleMode", simpleMode)
+				.append("useWhitespace", useWhitespace)
+				.append("escapeSolidus", escapeSolidus)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
index 267fa81..0eda758 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java
@@ -58,4 +58,11 @@ public final class MsgPackParserContext extends ParserContext {
 	public MsgPackParserContext(ContextFactory cf) {
 		super(cf);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("MsgPackParserContext", new ObjectMap()
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
index ff293a2..282d7ac 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java
@@ -58,4 +58,11 @@ public final class MsgPackSerializerContext extends SerializerContext {
 	public MsgPackSerializerContext(ContextFactory cf) {
 		super(cf);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("MsgPackSerializerContext", new ObjectMap()
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/package.html b/juneau-core/src/main/java/org/apache/juneau/package.html
index e955891..ac78fda 100644
--- a/juneau-core/src/main/java/org/apache/juneau/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/package.html
@@ -105,10 +105,10 @@
 	
 	<!-- ======================================================================================================== -->
 	<a id="BeanContext"></a>
-	<h3 class='topic' onclick='toggle(this)'>1.2 - The BeanContext class</h3>
+	<h3 class='topic' onclick='toggle(this)'>1.2 - The BeanContext and BeanSession classes</h3>
 	<div class='topic'>
 		<p>
-			The {@link org.apache.juneau.BeanContext} class is the workhorse class used to wrap Java beans inside {@link org.apache.juneau.BeanMap BeanMaps}. 
+			The {@link org.apache.juneau.BeanContext} and {@link org.apache.juneau.BeanSession} classes are the workhorse class used to wrap Java beans inside {@link org.apache.juneau.BeanMap BeanMaps}. 
 			There are several options provided on the {@link org.apache.juneau.BeanContext} class to tailor the definition of a bean.
 		</p>
 		<p>
@@ -126,11 +126,11 @@
 	
 	<jc>// Get an instance of a bean context.
 	// In this case, just use the default bean context.</jc>
-	BeanContext beanContext = BeanContext.<jsf>DEFAULT</jsf>;
+	BeanSession beanSession = BeanContext.<jsf>DEFAULT</jsf>.createSession();
 	
 	<jc>// Create an instance of our bean and wrap it in a bean map.</jc>
 	Person p = <jk>new</jk> Person();
-	BeanMap&lt;Person&gt; m = beanContext.forBean(p);
+	BeanMap&lt;Person&gt; m = beanSession.toBeanMap(p);
 	
 	<jc>// Set some properties on the bean.</jc>
 	m.put(<js>"name"</js>, <js>"John Smith"</js>);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
index cad48b2..a258bee 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java
@@ -159,4 +159,15 @@ public class ParserContext extends BeanContext {
 		this.inputStreamCharset = cf.getProperty(PARSER_inputStreamCharset, String.class, "UTF-8");
 		this.fileCharset = cf.getProperty(PARSER_fileCharset, String.class, "default");
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("ParserContext", new ObjectMap()
+				.append("trimStrings", trimStrings)
+				.append("strict", strict)
+				.append("inputStreamCharset", inputStreamCharset)
+				.append("fileCharset", fileCharset)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
index dc6755b..3bc0f06 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerContext.java
@@ -477,4 +477,26 @@ public class SerializerContext extends BeanContext {
 			s = s.substring(0, s.length()-1);
 		return s;
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("SerializerContext", new ObjectMap()
+				.append("maxDepth", maxDepth)
+				.append("initialDepth", initialDepth)
+				.append("detectRecursions", detectRecursions)
+				.append("ignoreRecursions", ignoreRecursions)
+				.append("useIndentation", useIndentation)
+				.append("addBeanTypeProperties", addBeanTypeProperties)
+				.append("trimNulls", trimNulls)
+				.append("trimEmptyCollections", trimEmptyCollections)
+				.append("trimEmptyMaps", trimEmptyMaps)
+				.append("trimStrings", trimStrings)
+				.append("sortCollections", sortCollections)
+				.append("sortMaps", sortMaps)
+				.append("quoteChar", quoteChar)
+				.append("relativeUriBase", relativeUriBase)
+				.append("absolutePathUriBase", absolutePathUriBase)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParserContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParserContext.java
index cdbe734..6f40db5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParserContext.java
@@ -109,4 +109,13 @@ public class UonParserContext extends ParserContext {
 		this.decodeChars = cf.getProperty(UON_decodeChars, boolean.class, false);
 		this.whitespaceAware = cf.getProperty(UON_whitespaceAware, boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("UonParserContext", new ObjectMap()
+				.append("decodeChars", decodeChars)
+				.append("whitespaceAware", whitespaceAware)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializerContext.java
index 6a1725f..b7be793 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializerContext.java
@@ -181,4 +181,14 @@ public class UonSerializerContext extends SerializerContext {
 		useWhitespace = cf.getProperty(UON_useWhitespace, boolean.class, false);
 		encodeChars = cf.getProperty(UON_encodeChars, boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("UonSerializerContext", new ObjectMap()
+				.append("simpleMode", simpleMode)
+				.append("useWhitespace", useWhitespace)
+				.append("encodeChars", encodeChars)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
index 81df420..dcfa0a9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParserContext.java
@@ -97,4 +97,12 @@ public class UrlEncodingParserContext extends UonParserContext {
 		super(cf);
 		this.expandedParams = cf.getProperty(URLENC_expandedParams, boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("UrlEncodingParserContext", new ObjectMap()
+				.append("expandedParams", expandedParams)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
index 5c2c6ff..eb91f70 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializerContext.java
@@ -98,4 +98,12 @@ public class UrlEncodingSerializerContext extends UonSerializerContext {
 		super(cf);
 		this.expandedParams = cf.getProperty(URLENC_expandedParams, boolean.class, false);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("UrlEncodingSerializerContext", new ObjectMap()
+				.append("expandedParams", expandedParams)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
index 6f1c010..3af7487 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParserContext.java
@@ -291,4 +291,20 @@ public final class XmlParserContext extends ParserContext {
 		resolver = cf.getProperty(XML_resolver, XMLResolver.class, null);
 		eventAllocator = cf.getProperty(XML_eventAllocator, XMLEventAllocator.class, null);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("XmlParserContext", new ObjectMap()
+				.append("xsiNs", xsiNs)
+				.append("trimWhitespace", trimWhitespace)
+				.append("validating", validating)
+				.append("coalescing", coalescing)
+				.append("replaceEntityReferences", replaceEntityReferences)
+				.append("preserveRootElement", preserveRootElement)
+				.append("reporter", reporter)
+				.append("resolver", resolver)
+				.append("eventAllocator", eventAllocator)
+			);
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
index 4ee5b58..9b7b65c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializerContext.java
@@ -297,4 +297,20 @@ public class XmlSerializerContext extends SerializerContext {
 		xsiNamespace = cf.getProperty(XML_xsiNamespace, Namespace.class, new Namespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"));
 		namespaces = cf.getProperty(XML_namespaces, Namespace[].class, new Namespace[0]);
 	}
+
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("XmlSerializerContext", new ObjectMap()
+				.append("addJsonTypeAttrs", addJsonTypeAttrs)
+				.append("addJsonStringTypeAttrs", addJsonStringTypeAttrs)
+				.append("autoDetectNamespaces", autoDetectNamespaces)
+				.append("enableNamespaces", enableNamespaces)
+				.append("addNamespaceUrlsToRoot", addNamespaceUrlsToRoot)
+				.append("defaultNamespace", defaultNamespace)
+				.append("xsNamespace", xsNamespace)
+				.append("xsiNamespace", xsiNamespace)
+				.append("namespaces", namespaces)
+			);
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/615190ad/juneau-core/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/javadoc/overview.html b/juneau-core/src/main/javadoc/overview.html
index 3eb2b90..478028f 100644
--- a/juneau-core/src/main/javadoc/overview.html
+++ b/juneau-core/src/main/javadoc/overview.html
@@ -715,18 +715,18 @@
 				<li class='p'>{@link org.apache.juneau.transforms}
 				<ul>
 					<li class='c'>{@link org.apache.juneau.transforms.ByteArrayBase64Swap}
-					<li class='c'>{@link org.apache.juneau.transforms.CalendarLongSwap}
-					<li class='c'>{@link org.apache.juneau.transforms.CalendarMapSwap}
-					<li class='c'>{@link org.apache.juneau.transforms.CalendarSwap}
-					<li class='c'>{@link org.apache.juneau.transforms.DateLongSwap}
-					<li class='c'>{@link org.apache.juneau.transforms.DateMapSwap}
-					<li class='c'>{@link org.apache.juneau.transforms.DateSwap}
+					<li class='a'>{@link org.apache.juneau.transforms.CalendarSwap}
+					<li class='a'>{@link org.apache.juneau.transforms.DateSwap}
 					<li class='c'>{@link org.apache.juneau.transforms.EnumerationSwap}
 					<li class='c'>{@link org.apache.juneau.transforms.IteratorSwap}
 					<li class='c'>{@link org.apache.juneau.transforms.ReaderSwap}
 					<li class='c'>{@link org.apache.juneau.transforms.XMLGregorianCalendarSwap}
 				</ul>
 			</ul>
+			<p>
+				In particular, the {@link org.apache.juneau.transforms.CalendarSwap} and {@link org.apache.juneau.transforms.DateSwap} tramsforms
+				provide a large number of customized swaps to ISO, RFC, or localized strings.
+			</p>
 			<p class='info'>
 				The 'swapped' class type must be a serializable type.<br>
 				See the definition for Category 4 objects in <a class='doclink' href='#Core.PojoCategories'>POJO Categories</a>.  


Mime
View raw message