juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [02/21] juneau git commit: JUNEAU-76 Improvements to Context/Builder APIs
Date Sat, 23 Dec 2017 16:50:43 GMT
http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
index f6613e6..61d45b3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializer.java
@@ -53,7 +53,7 @@ import org.apache.juneau.serializer.*;
  * The types above are considered "JSON-primitive" object types.
  * Any non-JSON-primitive object types are transformed into JSON-primitive object types through
  * {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated through the
- * {@link CoreObjectBuilder#pojoSwaps(Class...)} method.
+ * {@link BeanContextBuilder#pojoSwaps(Class...)} method.
  * Several default transforms are provided for transforming Dates, Enums, Iterators, etc...
  *
  * <p>
@@ -88,7 +88,7 @@ public class YamlSerializer extends WriterSerializer {
 	 * <b>Configuration property:</b>  Simple JSON mode.
 	 *
 	 * <ul>
-	 * 	<li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js>
+	 * 	<li><b>Name:</b> <js>"JsonSerializer.simpleMode.b"</js>
 	 * 	<li><b>Data type:</b> <code>Boolean</code>
 	 * 	<li><b>Default:</b> <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b> <jk>true</jk>
@@ -98,13 +98,13 @@ public class YamlSerializer extends WriterSerializer {
 	 * If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
 	 * Otherwise, they are always quoted.
 	 */
-	public static final String YAML_simpleMode = PREFIX + "simpleMode";
+	public static final String YAML_simpleMode = PREFIX + "simpleMode.b";
 
 	/**
 	 * <b>Configuration property:</b>  Prefix solidus <js>'/'</js> characters with escapes.
 	 *
 	 * <ul>
-	 * 	<li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js>
+	 * 	<li><b>Name:</b> <js>"JsonSerializer.escapeSolidus.b"</js>
 	 * 	<li><b>Data type:</b> <code>Boolean</code>
 	 * 	<li><b>Default:</b> <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b> <jk>true</jk>
@@ -116,13 +116,13 @@ public class YamlSerializer extends WriterSerializer {
 	 * However, if you're embedding JSON in an HTML script tag, this setting prevents confusion when trying to serialize
 	 * <xt>&lt;\/script&gt;</xt>.
 	 */
-	public static final String YAML_escapeSolidus = PREFIX + "escapeSolidus";
+	public static final String YAML_escapeSolidus = PREFIX + "escapeSolidus.b";
 
 	/**
 	 * <b>Configuration property:</b>  Add <js>"_type"</js> properties when needed.
 	 *
 	 * <ul>
-	 * 	<li><b>Name:</b> <js>"JsonSerializer.addBeanTypeProperties"</js>
+	 * 	<li><b>Name:</b> <js>"JsonSerializer.addBeanTypeProperties.b"</js>
 	 * 	<li><b>Data type:</b> <code>Boolean</code>
 	 * 	<li><b>Default:</b> <jk>false</jk>
 	 * 	<li><b>Session-overridable:</b> <jk>true</jk>
@@ -139,7 +139,7 @@ public class YamlSerializer extends WriterSerializer {
 	 * When present, this value overrides the {@link #SERIALIZER_addBeanTypeProperties} setting and is
 	 * provided to customize the behavior of specific serializers in a {@link SerializerGroup}.
 	 */
-	public static final String YAML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties";
+	public static final String YAML_addBeanTypeProperties = PREFIX + "addBeanTypeProperties.b";
 
 
 	//-------------------------------------------------------------------------------------------------------------------
@@ -147,29 +147,32 @@ public class YamlSerializer extends WriterSerializer {
 	//-------------------------------------------------------------------------------------------------------------------
 
 	/** Default serializer, all default settings.*/
-	public static final YamlSerializer DEFAULT = new YamlSerializer(PropertyStore.create());
+	public static final YamlSerializer DEFAULT = new YamlSerializer(PropertyStore2.DEFAULT);
 
 
 	//-------------------------------------------------------------------------------------------------------------------
 	// Instance
 	//-------------------------------------------------------------------------------------------------------------------
 
-	final YamlSerializerContext ctx;
+	final boolean
+		simpleMode,
+		escapeSolidus,
+		addBeanTypeProperties;
 
 	/**
 	 * Constructor.
 	 *
-	 * @param propertyStore
+	 * @param ps
 	 * 	The property store containing all the settings for this object.
 	 */
-	public YamlSerializer(PropertyStore propertyStore) {
-		this(propertyStore, "application/yaml", "application/yaml", "application/yaml+*", "text/yaml", "text/yaml+*");
+	public YamlSerializer(PropertyStore2 ps) {
+		this(ps, "application/yaml", "application/yaml", "application/yaml+*", "text/yaml", "text/yaml+*");
 	}
 
 	/**
 	 * Constructor.
 	 *
-	 * @param propertyStore
+	 * @param ps
 	 * 	The property store containing all the settings for this object.
 	 * @param produces
 	 * 	The media type that this serializer produces.
@@ -187,14 +190,16 @@ public class YamlSerializer extends WriterSerializer {
 	 * 	<br>...or...
 	 * 	<br><code><jk>super</jk>(propertyStore, <js>"application/json"</js>, <js>"*&#8203;/json"</js>);</code>
 	 */
-	public YamlSerializer(PropertyStore propertyStore, String produces, String...accept) {
-		super(propertyStore, produces, accept);
-		this.ctx = createContext(YamlSerializerContext.class);
+	public YamlSerializer(PropertyStore2 ps, String produces, String...accept) {
+		super(ps, produces, accept);
+		simpleMode = getProperty(YAML_simpleMode, boolean.class, false);
+		escapeSolidus = getProperty(YAML_escapeSolidus, boolean.class, false);
+		addBeanTypeProperties = getProperty(YAML_addBeanTypeProperties, boolean.class, getProperty(SERIALIZER_addBeanTypeProperties, boolean.class, true));
 	}
 
 	@Override /* CoreObject */
 	public YamlSerializerBuilder builder() {
-		return new YamlSerializerBuilder(propertyStore);
+		return new YamlSerializerBuilder(getPropertyStore());
 	}
 
 	/**
@@ -220,6 +225,16 @@ public class YamlSerializer extends WriterSerializer {
 
 	@Override /* Serializer */
 	public WriterSerializerSession createSession(SerializerSessionArgs args) {
-		return new YamlSerializerSession(ctx, args);
+		return new YamlSerializerSession(this, args);
+	}
+	
+	@Override /* Context */
+	public ObjectMap asMap() {
+		return super.asMap()
+			.append("YamlSerializer", new ObjectMap()
+				.append("simpleMode", simpleMode)
+				.append("escapeSolidus", escapeSolidus)
+				.append("addBeanTypeProperties", addBeanTypeProperties)
+			);
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
index 4535a7f..2f1223b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerBuilder.java
@@ -35,15 +35,15 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 	/**
 	 * Constructor.
 	 *
-	 * @param propertyStore The initial configuration settings for this builder.
+	 * @param ps The initial configuration settings for this builder.
 	 */
-	public YamlSerializerBuilder(PropertyStore propertyStore) {
-		super(propertyStore);
+	public YamlSerializerBuilder(PropertyStore2 ps) {
+		super(ps);
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializer build() {
-		return new YamlSerializer(propertyStore);
+		return build(YamlSerializer.class);
 	}
 
 
@@ -54,13 +54,6 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 	/**
 	 * <b>Configuration property:</b>  Simple JSON mode.
 	 *
-	 * <ul>
-	 * 	<li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js>
-	 * 	<li><b>Data type:</b> <code>Boolean</code>
-	 * 	<li><b>Default:</b> <jk>false</jk>
-	 * 	<li><b>Session-overridable:</b> <jk>true</jk>
-	 * </ul>
-	 *
 	 * <p>
 	 * If <jk>true</jk>, JSON attribute names will only be quoted when necessary.
 	 * Otherwise, they are always quoted.
@@ -75,7 +68,7 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 	 * @see #YAML_simpleMode
 	 */
 	public YamlSerializerBuilder simple(boolean value) {
-		return property(YAML_simpleMode, value);
+		return set(YAML_simpleMode, value);
 	}
 
 	/**
@@ -90,13 +83,6 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 	/**
 	 * <b>Configuration property:</b>  Prefix solidus <js>'/'</js> characters with escapes.
 	 *
-	 * <ul>
-	 * 	<li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js>
-	 * 	<li><b>Data type:</b> <code>Boolean</code>
-	 * 	<li><b>Default:</b> <jk>false</jk>
-	 * 	<li><b>Session-overridable:</b> <jk>true</jk>
-	 * </ul>
-	 *
 	 * <p>
 	 * If <jk>true</jk>, solidus (e.g. slash) characters should be escaped.
 	 * The JSON specification allows for either format.
@@ -113,7 +99,7 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 	 * @see #YAML_escapeSolidus
 	 */
 	public YamlSerializerBuilder escapeSolidus(boolean value) {
-		return property(YAML_escapeSolidus, value);
+		return set(YAML_escapeSolidus, value);
 	}
 
 	@Override /* SerializerBuilder */
@@ -242,416 +228,410 @@ public class YamlSerializerBuilder extends SerializerBuilder {
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beansRequireDefaultConstructor(boolean value) {
 		super.beansRequireDefaultConstructor(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beansRequireSerializable(boolean value) {
 		super.beansRequireSerializable(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beansRequireSettersForGetters(boolean value) {
 		super.beansRequireSettersForGetters(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beansRequireSomeProperties(boolean value) {
 		super.beansRequireSomeProperties(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanMapPutReturnsOldValue(boolean value) {
 		super.beanMapPutReturnsOldValue(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanConstructorVisibility(Visibility value) {
 		super.beanConstructorVisibility(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanClassVisibility(Visibility value) {
 		super.beanClassVisibility(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanFieldVisibility(Visibility value) {
 		super.beanFieldVisibility(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder methodVisibility(Visibility value) {
 		super.methodVisibility(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder useJavaBeanIntrospector(boolean value) {
 		super.useJavaBeanIntrospector(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder useInterfaceProxies(boolean value) {
 		super.useInterfaceProxies(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder ignoreUnknownBeanProperties(boolean value) {
 		super.ignoreUnknownBeanProperties(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder ignoreUnknownNullBeanProperties(boolean value) {
 		super.ignoreUnknownNullBeanProperties(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder ignorePropertiesWithoutSetters(boolean value) {
 		super.ignorePropertiesWithoutSetters(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value) {
 		super.ignoreInvocationExceptionsOnGetters(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value) {
 		super.ignoreInvocationExceptionsOnSetters(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder sortProperties(boolean value) {
 		super.sortProperties(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder notBeanPackages(String...values) {
 		super.notBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder notBeanPackages(Collection<String> values) {
 		super.notBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setNotBeanPackages(String...values) {
 		super.setNotBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setNotBeanPackages(Collection<String> values) {
 		super.setNotBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeNotBeanPackages(String...values) {
 		super.removeNotBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeNotBeanPackages(Collection<String> values) {
 		super.removeNotBeanPackages(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder notBeanClasses(Class<?>...values) {
 		super.notBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder notBeanClasses(Collection<Class<?>> values) {
 		super.notBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setNotBeanClasses(Class<?>...values) {
 		super.setNotBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setNotBeanClasses(Collection<Class<?>> values) {
 		super.setNotBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeNotBeanClasses(Class<?>...values) {
 		super.removeNotBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeNotBeanClasses(Collection<Class<?>> values) {
 		super.removeNotBeanClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanFilters(Class<?>...values) {
 		super.beanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanFilters(Collection<Class<?>> values) {
 		super.beanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setBeanFilters(Class<?>...values) {
 		super.setBeanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setBeanFilters(Collection<Class<?>> values) {
 		super.setBeanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeBeanFilters(Class<?>...values) {
 		super.removeBeanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeBeanFilters(Collection<Class<?>> values) {
 		super.removeBeanFilters(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder pojoSwaps(Class<?>...values) {
 		super.pojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder pojoSwaps(Collection<Class<?>> values) {
 		super.pojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setPojoSwaps(Class<?>...values) {
 		super.setPojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setPojoSwaps(Collection<Class<?>> values) {
 		super.setPojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removePojoSwaps(Class<?>...values) {
 		super.removePojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removePojoSwaps(Collection<Class<?>> values) {
 		super.removePojoSwaps(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder implClasses(Map<Class<?>,Class<?>> values) {
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder implClasses(Map<String,Class<?>> values) {
 		super.implClasses(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public <T> YamlSerializerBuilder implClass(Class<T> interfaceClass, Class<? extends T> implClass) {
 		super.implClass(interfaceClass, implClass);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder includeProperties(Map<String,String> values) {
 		super.includeProperties(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder includeProperties(String beanClassName, String properties) {
 		super.includeProperties(beanClassName, properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder includeProperties(Class<?> beanClass, String properties) {
 		super.includeProperties(beanClass, properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder excludeProperties(Map<String,String> values) {
 		super.excludeProperties(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder excludeProperties(String beanClassName, String properties) {
 		super.excludeProperties(beanClassName, properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder excludeProperties(Class<?> beanClass, String properties) {
 		super.excludeProperties(beanClass, properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanDictionary(Class<?>...values) {
 		super.beanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanDictionary(Collection<Class<?>> values) {
 		super.beanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setBeanDictionary(Class<?>...values) {
 		super.setBeanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder setBeanDictionary(Collection<Class<?>> values) {
 		super.setBeanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeFromBeanDictionary(Class<?>...values) {
 		super.removeFromBeanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder removeFromBeanDictionary(Collection<Class<?>> values) {
 		super.removeFromBeanDictionary(values);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder beanTypePropertyName(String value) {
 		super.beanTypePropertyName(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder defaultParser(Class<?> value) {
 		super.defaultParser(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder locale(Locale value) {
 		super.locale(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder timeZone(TimeZone value) {
 		super.timeZone(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder mediaType(MediaType value) {
 		super.mediaType(value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
+	@Override /* ContextBuilder */
 	public YamlSerializerBuilder debug() {
 		super.debug();
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder property(String name, Object value) {
-		super.property(name, value);
-		return this;
-	}
-
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder properties(Map<String,Object> properties) {
-		super.properties(properties);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder set(String name, Object value) {
+		super.set(name, value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder addToProperty(String name, Object value) {
-		super.addToProperty(name, value);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder set(Map<String,Object> properties) {
+		super.set(properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder putToProperty(String name, Object key, Object value) {
-		super.putToProperty(name, key, value);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder add(Map<String,Object> properties) {
+		super.add(properties);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder putToProperty(String name, Object value) {
-		super.putToProperty(name, value);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder addTo(String name, Object value) {
+		super.addTo(name, value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder removeFromProperty(String name, Object value) {
-		super.removeFromProperty(name, value);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder addTo(String name, String key, Object value) {
+		super.addTo(name, key, value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder classLoader(ClassLoader classLoader) {
-		super.classLoader(classLoader);
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder removeFrom(String name, Object value) {
+		super.removeFrom(name, value);
 		return this;
 	}
 
-	@Override /* CoreObjectBuilder */
-	public YamlSerializerBuilder apply(PropertyStore copyFrom) {
+	@Override /* ContextBuilder */
+	public YamlSerializerBuilder apply(PropertyStore2 copyFrom) {
 		super.apply(copyFrom);
 		return this;
 	}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerContext.java
deleted file mode 100644
index 2179131..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerContext.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// ***************************************************************************************************************************
-// * 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.yaml.proto;
-
-import static org.apache.juneau.yaml.proto.YamlSerializer.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.serializer.*;
-
-/**
- * Contains a snapshot-in-time read-only copy of the settings on the {@link YamlSerializer} class.
- */
-public final class YamlSerializerContext extends SerializerContext {
-
-	final boolean
-		simpleMode,
-		escapeSolidus,
-		addBeanTypeProperties;
-
-	/**
-	 * Constructor.
-	 *
-	 * <p>
-	 * Typically only called from {@link PropertyStore#getContext(Class)}.
-	 *
-	 * @param ps The property store that created this context.
-	 */
-	public YamlSerializerContext(PropertyStore ps) {
-		super(ps);
-		simpleMode = ps.getProperty(YAML_simpleMode, boolean.class, false);
-		escapeSolidus = ps.getProperty(YAML_escapeSolidus, boolean.class, false);
-		addBeanTypeProperties = ps.getProperty(YAML_addBeanTypeProperties, boolean.class,
-			ps.getProperty(SERIALIZER_addBeanTypeProperties, boolean.class, true));
-	}
-
-	@Override /* Context */
-	public ObjectMap asMap() {
-		return super.asMap()
-			.append("YamlSerializerContext", new ObjectMap()
-				.append("simpleMode", simpleMode)
-				.append("escapeSolidus", escapeSolidus)
-				.append("addBeanTypeProperties", addBeanTypeProperties)
-			);
-	}
-}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
index 239186e..5a2dda1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/yaml/proto/YamlSerializerSession.java
@@ -45,14 +45,9 @@ public class YamlSerializerSession extends WriterSerializerSession {
 	 * 	It also include session-level properties that override the properties defined on the bean and
 	 * 	serializer contexts.
 	 */
-	protected YamlSerializerSession(YamlSerializerContext ctx, SerializerSessionArgs args) {
+	protected YamlSerializerSession(YamlSerializer ctx, SerializerSessionArgs args) {
 		super(ctx, args);
-		ObjectMap p = getProperties();
-		if (p.isEmpty()) {
-			addBeanTypeProperties = ctx.addBeanTypeProperties;
-		} else {
-			addBeanTypeProperties = p.getBoolean(YAML_addBeanTypeProperties, ctx.addBeanTypeProperties);
-		}
+		addBeanTypeProperties = getProperty(YAML_addBeanTypeProperties, boolean.class, ctx.addBeanTypeProperties);
 	}
 
 	@Override /* Session */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-doc/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 19f6e7e..489262d 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -7548,6 +7548,7 @@
 	
 	<h5 class='toc'>What's new in each release</h5>
 	<ul class='toc'>
+		<li><p><a class='doclink' href='#7.0.1'>7.0.2 (TBD)</a></p>
 		<li><p><a class='doclink' href='#7.0.1'>7.0.1 (TBD)</a></p>
 		<li><p><a class='doclink' href='#7.0.0'>7.0.0 (Oct 25, 2017)</a></p>
 		<li><p><a class='doclink' href='#6.4.0'>6.4.0 (Oct 5, 2017)</a></p>
@@ -7620,6 +7621,106 @@
 	</ul>
 
 	<!-- =========================================================================================================== -->
+	<a id="7.0.2"></a>
+	<h3 class='topic' onclick='toggle(this)'>7.0.2 (TBD)</h3>
+	<div class='topic'>
+		<p>
+		</p>
+	
+		<h6 class='topic'>juneau-marshall</h6>
+		<ul class='spaced-list'>
+			<li>
+				Significant improvements made to the internals of the Serializer and Parser classes.
+				<ul>
+					<li>
+						Caching improvements on serializers and parsers have reduced execution time of the core
+						JUnits by approximately 1/3.
+						<br>The 17000+ JUnit tests now execute in less than 10 seconds and have a cache-reuse hit rate
+						of 98% (164104 serializers/parsers/bean-contexts retrieved, but only 1801 created from scratch).
+					<li>
+						All the various separate <code>Context</code> classes (e.g. <code>JsonSerializerContext</code>) have been folded into
+						their respective serializer or parser classes (e.g. <code>JsonSerializer</code>).
+						<br>Additionally, these classes are their own bean contexts.
+						<br>For example, the class hierarchy of <code>JsonSerializer</code> is now:
+						<ul class='doctree'>
+							<li class='jaa'>{@link org.apache.juneau.Context}
+							<ul>
+								<li class='jac'>{@link org.apache.juneau.BeanContext}
+								<ul>
+									<li class='jaa'>{@link org.apache.juneau.serializer.Serializer}
+									<ul>
+										<li class='jaa'>{@link org.apache.juneau.serializer.WriterSerializer}
+										<ul>
+											<li class='jac'>{@link org.apache.juneau.json.JsonSerializer}
+										</ul>
+									</ul>
+								</ul>
+							</ul>
+						</ul>
+						All <code>Context</code> objects are thread-safe and read-only.
+					<li>
+						Session objects also now have a consistent class hierarchy.
+						<br>For example, the class hierarchy of <code>JsonSerializerSession</code> is now:
+						<ul class='doctree'>
+							<li class='jaa'>{@link org.apache.juneau.Session}
+							<ul>
+								<li class='jac'>{@link org.apache.juneau.BeanSession}
+								<ul>
+									<li class='jaa'>{@link org.apache.juneau.serializer.SerializerSession}
+									<ul>
+										<li class='jaa'>{@link org.apache.juneau.serializer.WriterSerializerSession}
+										<ul>
+											<li class='jac'>{@link org.apache.juneau.json.JsonSerializerSession}
+										</ul>
+									</ul>
+								</ul>
+							</ul>
+						</ul>
+						Session objects are transient objects that live for the duration of a single parse.
+					<li>
+						Builder objects also now have a consistent class hierarchy.
+						<br>For example, the class hierarchy of <code>JsonSerializerBuilder</code> is now:
+						<ul class='doctree'>
+							<li class='jaa'>{@link org.apache.juneau.ContextBuilder}
+							<ul>
+								<li class='jac'>{@link org.apache.juneau.BeanContextBuilder}
+								<ul>
+									<li class='jaa'>{@link org.apache.juneau.serializer.SerializerBuider}
+									<ul>
+										<li class='jac'>{@link org.apache.juneau.serializer.JsonSerializerBuilder}
+									</ul>
+								</ul>
+							</ul>
+						</ul>
+						Builder objects are used for building up and creating <code>Context</code> objects.
+					<li>
+						The {@link org.apache.juneau.PropertyStore2} class has been completely rewritten.
+						It is now a read-only configuration store build using the {@link org.apache.juneau.PropertyStoreBuilder}
+						class.
+						<br>The previous <code>PropertyStore</code> class was overly-complicated with many read/write
+						locks to ensure thread-safety. 
+						<br>The new design shifts to a builder-based model with read-only <code>PropertyStore</code> objects.
+				</ul>
+		</ul>
+
+		<h6 class='topic'>juneau-marshall-rdf</h6>
+		<ul class='spaced-list'>
+		</ul>
+
+		<h6 class='topic'>juneau-svl</h6>
+		<ul class='spaced-list'>
+		</ul>
+
+		<h6 class='topic'>juneau-rest-server</h6>
+		<ul class='spaced-list'>
+		</ul>
+
+		<h6 class='topic'>juneau-microservice-server</h6>
+		<ul class='spaced-list'>
+		</ul>
+	</div>
+
+	<!-- =========================================================================================================== -->
 	<a id="7.0.1"></a>
 	<h3 class='topic' onclick='toggle(this)'>7.0.1 (TBD)</h3>
 	<div class='topic'>

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
index 0f9f4f5..17fb009 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
@@ -133,10 +133,10 @@ public class PhotosResource extends Resource {
 
 		/**
 		 * Constructor.
-		 * @param propertyStore The property store containing all the settings for this object.
+		 * @param ps The property store containing all the settings for this object.
 		 */
-		public ImageSerializer(PropertyStore propertyStore) {
-			super(propertyStore, null, "image/png", "image/jpeg");
+		public ImageSerializer(PropertyStore2 ps) {
+			super(ps, null, "image/png", "image/jpeg");
 		}
 
 		@Override /* Serializer */ 
@@ -146,7 +146,7 @@ public class PhotosResource extends Resource {
 				@Override /* SerializerSession */ 
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
 					RenderedImage image = (RenderedImage)o;
-					String mediaType = getStringProperty("mediaType");
+					String mediaType = getProperty("mediaType", String.class, (String)null);
 					ImageIO.write(image, mediaType.substring(mediaType.indexOf('/')+1), out.getOutputStream());
 				}
 			};
@@ -158,10 +158,10 @@ public class PhotosResource extends Resource {
 
 		/**
 		 * Constructor.
-		 * @param propertyStore The property store containing all the settings for this object.
+		 * @param ps The property store containing all the settings for this object.
 		 */
-		public ImageParser(PropertyStore propertyStore) {
-			super(propertyStore, "image/png", "image/jpeg");
+		public ImageParser(PropertyStore2 ps) {
+			super(ps, "image/png", "image/jpeg");
 		}
 
 		@Override /* Parser */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/AddressBookResourceTest.java
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/AddressBookResourceTest.java b/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/AddressBookResourceTest.java
index ad0836f..fa71e45 100644
--- a/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/AddressBookResourceTest.java
+++ b/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/AddressBookResourceTest.java
@@ -39,27 +39,27 @@ public class AddressBookResourceTest extends RestTestcase {
 		clients = new RestClient[] {
 			SamplesMicroservice.client()
 				.pojoSwaps(CalendarSwap.DateMedium.class)
-				.property(XML_autoDetectNamespaces, true)
+				.set(XML_autoDetectNamespaces, true)
 				.build(),
 			SamplesMicroservice.client()
 				.serializer(XmlSerializer.class)
 				.parser(XmlParser.class)
 				.pojoSwaps(CalendarSwap.DateMedium.class)
-				.property(XML_autoDetectNamespaces, true)
+				.set(XML_autoDetectNamespaces, true)
 				.build(),
 			SamplesMicroservice.client()
 				.serializer(HtmlSerializer.class)
 				.parser(HtmlParser.class)
 				.accept("text/html+stripped")
 				.pojoSwaps(CalendarSwap.DateMedium.class)
-				.property(XML_autoDetectNamespaces, true)
+				.set(XML_autoDetectNamespaces, true)
 				.build(),
 			SamplesMicroservice.client()
 				.serializer(XmlSerializer.class)
 				.parser(HtmlParser.class)
 				.accept("text/html+stripped")
 				.pojoSwaps(CalendarSwap.DateMedium.class)
-				.property(XML_autoDetectNamespaces, true)
+				.set(XML_autoDetectNamespaces, true)
 				.build(),
 		};
 	}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/SampleRemoteableServicesResourceTest.java
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/SampleRemoteableServicesResourceTest.java b/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/SampleRemoteableServicesResourceTest.java
index e1119bf..587174f 100644
--- a/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/SampleRemoteableServicesResourceTest.java
+++ b/juneau-examples/juneau-examples-rest/src/test/java/org/apache/juneau/examples/rest/SampleRemoteableServicesResourceTest.java
@@ -38,7 +38,7 @@ public class SampleRemoteableServicesResourceTest extends RestTestcase {
 				.build(),
 			SamplesMicroservice.client(XmlSerializer.class, XmlParser.class)
 				.pojoSwaps(CalendarSwap.DateMedium.class)
-				.property(XML_autoDetectNamespaces, true)
+				.set(XML_autoDetectNamespaces, true)
 				.build(),
 			SamplesMicroservice.client(UonSerializer.class, UonParser.class)
 				.pojoSwaps(CalendarSwap.DateMedium.class)

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
index f1d775f..a0cab46 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
@@ -53,8 +53,8 @@ public class AcceptCharsetResource extends RestServlet {
 
 	public static class TestParser extends InputStreamParser {
 
-		public TestParser(PropertyStore propertyStore) {
-			super(propertyStore, "text/plain");
+		public TestParser(PropertyStore2 ps) {
+			super(ps, "text/plain");
 		}
 
 		@Override /* Parser */
@@ -64,7 +64,7 @@ public class AcceptCharsetResource extends RestServlet {
 				@Override /* ParserSession */
 				@SuppressWarnings("unchecked")
 				protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws Exception {
-					return (T)getStringProperty("characterEncoding");
+					return (T)getProperty("characterEncoding", String.class);
 				}
 			};
 		}
@@ -72,8 +72,8 @@ public class AcceptCharsetResource extends RestServlet {
 
 	public static class TestSerializer extends OutputStreamSerializer {
 
-		public TestSerializer(PropertyStore propertyStore) {
-			super(propertyStore, "text/plain");
+		public TestSerializer(PropertyStore2 ps) {
+			super(ps, "text/plain");
 		}
 
 		@Override /* Serializer */
@@ -83,7 +83,7 @@ public class AcceptCharsetResource extends RestServlet {
 				@Override /* SerializerSession */
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
 					try (Writer w = new OutputStreamWriter(out.getOutputStream())) {
-						w.append(o.toString()).append('/').append(getStringProperty("characterEncoding"));
+						w.append(o.toString()).append('/').append(getProperty("characterEncoding", String.class));
 					}
 				}
 			};

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/CharsetEncodingsResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/CharsetEncodingsResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/CharsetEncodingsResource.java
index d2ecc7e..6d4f832 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/CharsetEncodingsResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/CharsetEncodingsResource.java
@@ -34,8 +34,8 @@ public class CharsetEncodingsResource extends RestServlet {
 
 	public static class CtParser extends ReaderParser {
 
-		public CtParser(PropertyStore propertyStore) {
-			super(propertyStore, "text/p");
+		public CtParser(PropertyStore2 ps) {
+			super(ps, "text/p");
 		}
 
 		@Override /* Parser */
@@ -53,8 +53,8 @@ public class CharsetEncodingsResource extends RestServlet {
 
 	public static class ASerializer extends WriterSerializer {
 
-		public ASerializer(PropertyStore propertyStore) {
-			super(propertyStore, "text/s");
+		public ASerializer(PropertyStore2 ps) {
+			super(ps, "text/s");
 		}
 
 		@Override /* Serializer */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/DefaultContentTypesResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/DefaultContentTypesResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/DefaultContentTypesResource.java
index ad605be..b92d52e 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/DefaultContentTypesResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/DefaultContentTypesResource.java
@@ -33,17 +33,17 @@ import org.apache.juneau.serializer.*;
 public class DefaultContentTypesResource extends RestServlet {
 	private static final long serialVersionUID = 1L;
 
-	public static class P1 extends DummyParser { public P1(PropertyStore ps) {super(ps, "p1", "text/p1");}}
+	public static class P1 extends DummyParser { public P1(PropertyStore2 ps) {super(ps, "p1", "text/p1");}}
 
-	public static class P2 extends DummyParser { public P2(PropertyStore ps) {super(ps, "p2", "text/p2");}}
+	public static class P2 extends DummyParser { public P2(PropertyStore2 ps) {super(ps, "p2", "text/p2");}}
 
-	public static class P3 extends DummyParser { public P3(PropertyStore ps) {super(ps, "p3", "text/p3");}}
+	public static class P3 extends DummyParser { public P3(PropertyStore2 ps) {super(ps, "p3", "text/p3");}}
 
-	public static class S1 extends DummySerializer { public S1(PropertyStore ps) {super(ps, "s1", "text/s1");}}
+	public static class S1 extends DummySerializer { public S1(PropertyStore2 ps) {super(ps, "s1", "text/s1");}}
 
-	public static class S2 extends DummySerializer { public S2(PropertyStore ps) {super(ps, "s2", "text/s2");}}
+	public static class S2 extends DummySerializer { public S2(PropertyStore2 ps) {super(ps, "s2", "text/s2");}}
 
-	public static class S3 extends DummySerializer { public S3(PropertyStore ps) {super(ps, "s3", "text/s3");}}
+	public static class S3 extends DummySerializer { public S3(PropertyStore2 ps) {super(ps, "s3", "text/s3");}}
 
 	/**
 	 * Test that default Accept and Content-Type headers on servlet annotation are picked up.
@@ -101,8 +101,8 @@ public class DefaultContentTypesResource extends RestServlet {
 
 		private String name;
 
-		private DummyParser(PropertyStore propertyStore, String name, String...consumes) {
-			super(propertyStore, consumes);
+		private DummyParser(PropertyStore2 ps, String name, String...consumes) {
+			super(ps, consumes);
 			this.name = name;
 		}
 
@@ -123,8 +123,8 @@ public class DefaultContentTypesResource extends RestServlet {
 
 		private String name;
 
-		private DummySerializer(PropertyStore propertyStore, String name, String produces) {
-			super(propertyStore, produces);
+		private DummySerializer(PropertyStore2 ps, String name, String produces) {
+			super(ps, produces);
 			this.name = name;
 		}
 

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/GroupsResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/GroupsResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/GroupsResource.java
index 5c84054..690e578 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/GroupsResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/GroupsResource.java
@@ -38,8 +38,8 @@ public class GroupsResource extends RestServlet {
 
 	public static class SSerializer extends WriterSerializer {
 
-		public SSerializer(PropertyStore propertyStore) {
-			super(propertyStore, "text/s1", "text/s1", "text/s2");
+		public SSerializer(PropertyStore2 ps) {
+			super(ps, "text/s1", "text/s1", "text/s2");
 		}
 
 		@Override /* Serializer */
@@ -56,8 +56,8 @@ public class GroupsResource extends RestServlet {
 
 	public static class PParser extends ReaderParser {
 
-		public PParser(PropertyStore propertyStore) {
-			super(propertyStore, "text/p1", "text/p2");
+		public PParser(PropertyStore2 ps) {
+			super(ps, "text/p1", "text/p2");
 		}
 
 		@Override /* Parser */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/HeadersResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/HeadersResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/HeadersResource.java
index 779eb33..8f04317 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/HeadersResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/HeadersResource.java
@@ -173,14 +173,14 @@ public class HeadersResource extends RestServlet {
 	}
 
 	public static class PlainTextAnythingSerializer extends PlainTextSerializer {
-		public PlainTextAnythingSerializer(PropertyStore propertyStore) {
-			super(propertyStore, "text/plain", "*/*");
+		public PlainTextAnythingSerializer(PropertyStore2 ps) {
+			super(ps, "text/plain", "*/*");
 		}
 	}
 
 	public static class PlainTextAnythingParser extends PlainTextParser {
-		public PlainTextAnythingParser(PropertyStore propertyStore) {
-			super(propertyStore, "*/*");
+		public PlainTextAnythingParser(PropertyStore2 ps) {
+			super(ps, "*/*");
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/InheritanceResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/InheritanceResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/InheritanceResource.java
index 7ab8676..2286c3b 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/InheritanceResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/InheritanceResource.java
@@ -225,7 +225,7 @@ public class InheritanceResource extends RestServlet {
 	public static class DummyParser extends ReaderParser {
 
 		public DummyParser(String...consumes) {
-			super(PropertyStore.create(), consumes);
+			super(PropertyStore2.DEFAULT, consumes);
 		}
 
 		@Override /* Parser */
@@ -243,7 +243,7 @@ public class InheritanceResource extends RestServlet {
 	public static class DummySerializer extends WriterSerializer {
 
 		public DummySerializer(String produces) {
-			super(PropertyStore.create(), produces);
+			super(PropertyStore2.DEFAULT, produces);
 		}
 
 		@Override /* Serializer */
@@ -258,25 +258,25 @@ public class InheritanceResource extends RestServlet {
 		}
 	}
 
-	public static class P1 extends DummyParser{ public P1(PropertyStore ps) {super("text/p1");} }
+	public static class P1 extends DummyParser{ public P1(PropertyStore2 ps) {super("text/p1");} }
 
-	public static class P2 extends DummyParser{ public P2(PropertyStore ps) {super("text/p2");} }
+	public static class P2 extends DummyParser{ public P2(PropertyStore2 ps) {super("text/p2");} }
 
-	public static class P3 extends DummyParser{ public P3(PropertyStore ps) {super("text/p3");} }
+	public static class P3 extends DummyParser{ public P3(PropertyStore2 ps) {super("text/p3");} }
 
-	public static class P4 extends DummyParser{ public P4(PropertyStore ps) {super("text/p4");} }
+	public static class P4 extends DummyParser{ public P4(PropertyStore2 ps) {super("text/p4");} }
 
-	public static class P5 extends DummyParser{ public P5(PropertyStore ps) {super("text/p5");} }
+	public static class P5 extends DummyParser{ public P5(PropertyStore2 ps) {super("text/p5");} }
 
-	public static class S1 extends DummySerializer{ public S1(PropertyStore ps) {super("text/s1");} }
+	public static class S1 extends DummySerializer{ public S1(PropertyStore2 ps) {super("text/s1");} }
 
-	public static class S2 extends DummySerializer{ public S2(PropertyStore ps) {super("text/s2");} }
+	public static class S2 extends DummySerializer{ public S2(PropertyStore2 ps) {super("text/s2");} }
 
-	public static class S3 extends DummySerializer{ public S3(PropertyStore ps) {super("text/s3");} }
+	public static class S3 extends DummySerializer{ public S3(PropertyStore2 ps) {super("text/s3");} }
 
-	public static class S4 extends DummySerializer{ public S4(PropertyStore ps) {super("text/s4");} }
+	public static class S4 extends DummySerializer{ public S4(PropertyStore2 ps) {super("text/s4");} }
 
-	public static class S5 extends DummySerializer{ public S5(PropertyStore ps) {super("text/s5");} }
+	public static class S5 extends DummySerializer{ public S5(PropertyStore2 ps) {super("text/s5");} }
 
 	public static class E1 extends IdentityEncoder {
 		@Override public String[] getCodings() {

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
index b731b05..f325f1a 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
@@ -55,8 +55,8 @@ public class NlsPropertyResource extends RestServlet {
 
 	public static class TestSerializer extends WriterSerializer {
 
-		public TestSerializer(PropertyStore propertyStore) {
-			super(propertyStore, "text/plain");
+		public TestSerializer(PropertyStore2 ps) {
+			super(ps, "text/plain");
 		}
 
 		@Override /* Serializer */
@@ -65,7 +65,7 @@ public class NlsPropertyResource extends RestServlet {
 
 				@Override /* SerializerSession */
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
-					out.getWriter().write(getStringProperty("TestProperty"));
+					out.getWriter().write(getProperty("TestProperty", String.class));
 				}
 			};
 		}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
index 0a0426b..e24c357 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
@@ -43,8 +43,8 @@ public class OnPostCallResource extends RestServlet {
 
 	public static class TestSerializer extends WriterSerializer {
 
-		public TestSerializer(PropertyStore propertyStore) {
-			super(propertyStore, "test/s1", "text/s1", "text/s2", "text/s3");
+		public TestSerializer(PropertyStore2 ps) {
+			super(ps, "test/s1", "text/s1", "text/s2", "text/s3");
 		}
 
 		@Override /* Serializer */
@@ -53,7 +53,7 @@ public class OnPostCallResource extends RestServlet {
 
 				@Override /* SerializerSession */
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
-					out.getWriter().write("p1="+getStringProperty("p1")+",p2="+getStringProperty("p2")+",p3="+getStringProperty("p3")+",p4="+getStringProperty("p4")+",p5="+getStringProperty("p5")+",contentType="+getStringProperty("mediaType"));
+					out.getWriter().write("p1="+getProperty("p1", String.class)+",p2="+getProperty("p2", String.class)+",p3="+getProperty("p3", String.class)+",p4="+getProperty("p4", String.class)+",p5="+getProperty("p5", String.class)+",contentType="+getProperty("mediaType", String.class));
 				}
 
 				@Override /* SerializerSession */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
index 15574b4..5df96b7 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
@@ -41,8 +41,8 @@ public class OnPreCallResource extends RestServlet {
 
 	public static class TestParserA extends ReaderParser {
 
-		public TestParserA(PropertyStore propertyStore) {
-			super(propertyStore, "text/a1", "text/a2", "text/a3");
+		public TestParserA(PropertyStore2 ps) {
+			super(ps, "text/a1", "text/a2", "text/a3");
 		}
 
 		@Override /* Parser */
@@ -52,8 +52,8 @@ public class OnPreCallResource extends RestServlet {
 				@Override /* ParserSession */
 				@SuppressWarnings("unchecked")
 				protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws Exception {
-					String matchingContentType = getStringProperty("mediaType");
-					return (T)("p1="+getStringProperty("p1")+",p2="+getStringProperty("p2")+",p3="+getStringProperty("p3")+",p4="+getStringProperty("p4")+",p5="+getStringProperty("p5")+",contentType="+matchingContentType);
+					String matchingContentType = getProperty("mediaType", String.class);
+					return (T)("p1="+getProperty("p1", String.class)+",p2="+getProperty("p2", String.class)+",p3="+getProperty("p3", String.class)+",p4="+getProperty("p4", String.class)+",p5="+getProperty("p5", String.class)+",contentType="+matchingContentType);
 				}
 			};
 		}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/ParsersResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/ParsersResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/ParsersResource.java
index a473cc3..0c341af 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/ParsersResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/ParsersResource.java
@@ -36,8 +36,8 @@ public class ParsersResource extends RestServletDefault {
 
 	public static class TestParserA extends ReaderParser {
 
-		public TestParserA(PropertyStore propertyStore) {
-			super(propertyStore, "text/a");
+		public TestParserA(PropertyStore2 ps) {
+			super(ps, "text/a");
 		}
 
 		@Override /* Parser */
@@ -71,8 +71,8 @@ public class ParsersResource extends RestServletDefault {
 
 	public static class TestParserB extends ReaderParser {
 
-		public TestParserB(PropertyStore propertyStore) {
-			super(propertyStore, "text/b");
+		public TestParserB(PropertyStore2 ps) {
+			super(ps, "text/b");
 		}
 
 		@Override /* Parser */
@@ -98,8 +98,8 @@ public class ParsersResource extends RestServletDefault {
 
 	public static class TestParserC extends ReaderParser {
 
-		public TestParserC(PropertyStore propertyStore) {
-			super(propertyStore, "text/c");
+		public TestParserC(PropertyStore2 ps) {
+			super(ps, "text/c");
 		}
 
 		@Override /* Parser */
@@ -125,8 +125,8 @@ public class ParsersResource extends RestServletDefault {
 
 	public static class TestParserD extends ReaderParser {
 
-		public TestParserD(PropertyStore propertyStore) {
-			super(propertyStore, "text/d");
+		public TestParserD(PropertyStore2 ps) {
+			super(ps, "text/d");
 		}
 
 		@Override /* Parser */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
index 889eb63..a9e14a6 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
@@ -61,8 +61,8 @@ public class PropertiesResource extends RestServletDefault {
 
 	public static class PropertySerializer1 extends WriterSerializer {
 
-		public PropertySerializer1(PropertyStore propertyStore) {
-			super(propertyStore, "application/json", "*/json");
+		public PropertySerializer1(PropertyStore2 ps) {
+			super(ps, "application/json", "*/json");
 		}
 
 		@Override /* Serializer */
@@ -72,8 +72,8 @@ public class PropertiesResource extends RestServletDefault {
 				@Override /* SerializerSession */
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
 					out.getWriter().write(format("A1=%s,A2=%s,B1=%s,B2=%s,C=%s,R1a=%s,R1b=%s,R2=%s,R3=%s,R4=%s,R5=%s,R6=%s",
-						getStringProperty("A1"), getStringProperty("A2"), getStringProperty("B1"), getStringProperty("B2"), getStringProperty("C"),
-						getStringProperty("R1a"), getStringProperty("R1b"), getStringProperty("R2"), getStringProperty("R3"), getStringProperty("R4"), getStringProperty("R5"), getStringProperty("R6")));
+						getProperty("A1"), getProperty("A2"), getProperty("B1"), getProperty("B2"), getProperty("C"),
+						getProperty("R1a"), getProperty("R1b"), getProperty("R2"), getProperty("R3"), getProperty("R4"), getProperty("R5"), getProperty("R6")));
 				}
 			};
 		}
@@ -89,8 +89,8 @@ public class PropertiesResource extends RestServletDefault {
 
 	public static class PropertySerializer2 extends WriterSerializer {
 
-		public PropertySerializer2(PropertyStore propertyStore) {
-			super(propertyStore, "application/json", "*/json");
+		public PropertySerializer2(PropertyStore2 ps) {
+			super(ps, "application/json", "*/json");
 		}
 
 		@Override /* Serializer */
@@ -99,7 +99,7 @@ public class PropertiesResource extends RestServletDefault {
 
 				@Override /* SerializerSession */
 				protected void doSerialize(SerializerPipe out, Object o) throws Exception {
-					out.getWriter().write(format("A=%s,P=%s,H=%s", getStringProperty("A"), getStringProperty("P"), getStringProperty("h")));
+					out.getWriter().write(format("A=%s,P=%s,H=%s", getProperty("A"), getProperty("P"), getProperty("h")));
 				}
 			};
 		}

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/SerializersResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/SerializersResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/SerializersResource.java
index d9b89c9..1ab24ad 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/SerializersResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/SerializersResource.java
@@ -32,8 +32,8 @@ public class SerializersResource extends RestServletDefault {
 
 	public static class TestSerializerA extends WriterSerializer {
 
-		public TestSerializerA(PropertyStore propertyStore) {
-			super(propertyStore, "text/a");
+		public TestSerializerA(PropertyStore2 ps) {
+			super(ps, "text/a");
 		}
 
 		@Override /* Serializer */
@@ -50,8 +50,8 @@ public class SerializersResource extends RestServletDefault {
 
 	public static class TestSerializerB extends WriterSerializer {
 
-		public TestSerializerB(PropertyStore propertyStore) {
-			super(propertyStore, "text/b");
+		public TestSerializerB(PropertyStore2 ps) {
+			super(ps, "text/b");
 		}
 
 		@Override /* Serializer */
@@ -92,8 +92,8 @@ public class SerializersResource extends RestServletDefault {
 
 	public static class TestSerializerC extends WriterSerializer {
 
-		public TestSerializerC(PropertyStore propertyStore) {
-			super(propertyStore, "text/a");
+		public TestSerializerC(PropertyStore2 ps) {
+			super(ps, "text/a");
 		}
 
 		@Override /* Serializer */
@@ -118,8 +118,8 @@ public class SerializersResource extends RestServletDefault {
 
 	public static class TestSerializerD extends WriterSerializer {
 
-		public TestSerializerD(PropertyStore propertyStore) {
-			super(propertyStore, "text/d", "text/a", "text/d");
+		public TestSerializerD(PropertyStore2 ps) {
+			super(ps, "text/d", "text/a", "text/d");
 		}
 
 		@Override /* Serializer */

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/TransformsResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/TransformsResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/TransformsResource.java
index 190ecfd..18e6a8a 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/TransformsResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/TransformsResource.java
@@ -35,7 +35,7 @@ public class TransformsResource extends TransformsParentResource {
 	// Should return "A2-1".
 	//====================================================================================================
 	@RestMethod(name=GET, path="/testClassTransformOverridesParentClassTransform")
-	public A testClassTransformOverridesParentClassTransform() {
+	public A test1a() {
 		return new A();
 	}
 	@RestMethod(name=PUT, path="/testClassTransformOverridesParentClassTransform")

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
index 721ec08..be4d0f7 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
@@ -1813,7 +1813,7 @@ public final class RestCall {
 	 * @throws IOException If a connection error occurred.
 	 */
 	public <T> T getResponse(Class<T> type) throws IOException, ParseException {
-		BeanContext bc = getParser().getBeanContext();
+		BeanContext bc = getParser();
 		if (bc == null)
 			bc = BeanContext.DEFAULT;
 		return getResponse(bc.getClassMeta(type));
@@ -1904,7 +1904,7 @@ public final class RestCall {
 	 * @see BeanSession#getClassMeta(Class) for argument syntax for maps and collections.
 	 */
 	public <T> T getResponse(Type type, Type...args) throws IOException, ParseException {
-		BeanContext bc = getParser().getBeanContext();
+		BeanContext bc = getParser();
 		if (bc == null)
 			bc = BeanContext.DEFAULT;
 		return (T)getResponse(bc.getClassMeta(type, args));
@@ -1997,7 +1997,7 @@ public final class RestCall {
 	}
 
 	BeanContext getBeanContext() throws RestCallException {
-		BeanContext bc = getParser().getBeanContext();
+		BeanContext bc = getParser();
 		if (bc == null)
 			bc = BeanContext.DEFAULT;
 		return bc;

http://git-wip-us.apache.org/repos/asf/juneau/blob/227719b2/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index bf03f6c..8d8dd2f 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -12,7 +12,6 @@
 // ***************************************************************************************************************************
 package org.apache.juneau.rest.client;
 
-import static org.apache.juneau.internal.ClassUtils.*;
 import static org.apache.juneau.internal.ReflectionUtils.*;
 import static org.apache.juneau.internal.StringUtils.*;
 
@@ -62,7 +61,7 @@ import org.apache.juneau.urlencoding.*;
  * </ul>
  */
 @SuppressWarnings("rawtypes")
-public class RestClient extends CoreObject {
+public class RestClient extends BeanContext {
 
 	private static final ConcurrentHashMap<Class,PartSerializer> partSerializerCache = new ConcurrentHashMap<>();
 
@@ -101,8 +100,13 @@ public class RestClient extends CoreObject {
 		return new RestClientBuilder();
 	}
 
+	@Override /* Context */
+	public RestClientBuilder builder() {
+		return new RestClientBuilder(getPropertyStore());
+	}
+
 	RestClient(
-			PropertyStore propertyStore,
+			PropertyStore2 ps,
 			CloseableHttpClient httpClient,
 			boolean keepHttpClientOpen,
 			Serializer serializer,
@@ -118,7 +122,7 @@ public class RestClient extends CoreObject {
 			boolean debug,
 			ExecutorService executorService,
 			boolean executorServiceShutdownOnClose) {
-		super(propertyStore);
+		super(ps);
 		this.httpClient = httpClient;
 		this.keepHttpClientOpen = keepHttpClientOpen;
 		this.serializer = serializer;
@@ -678,7 +682,7 @@ public class RestClient extends CoreObject {
 								rc.input(args[rmm.getBodyArg()]);
 
 							if (rmm.getRequestBeanArgs().length > 0) {
-								BeanSession bs = getBeanContext().createSession();
+								BeanSession bs = createBeanSession();
 								for (RemoteMethodArg rma : rmm.getRequestBeanArgs()) {
 									BeanMap<?> bm = bs.toBeanMap(args[rma.index]); 
 
@@ -767,7 +771,7 @@ public class RestClient extends CoreObject {
 		return n;
 	}
 
-	static final PartSerializer getPartSerializer(Class c, PartSerializer c2) {
+	final PartSerializer getPartSerializer(Class c, PartSerializer c2) {
 		if (c2 != null)
 			return c2;
 		if (c == PartSerializer.class)


Mime
View raw message