juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [3/7] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'
Date Sat, 27 Aug 2016 14:14:46 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/main/java/overview.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/overview.html b/juneau-core/src/main/java/overview.html
index 8d0c17f..c8163c6 100644
--- a/juneau-core/src/main/java/overview.html
+++ b/juneau-core/src/main/java/overview.html
@@ -422,9 +422,9 @@
 				<td style='text-align:center'>4</td>
 				<td>
 					<b>Transformed objects</b><br>
-					These are objects that are not directly serializable, but have {@link org.apache.juneau.transform.PojoTransform PojoTransforms} associated with them.  
+					These are objects that are not directly serializable, but have {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated with them.  
 					The purpose of an object transform is to convert an object to another object that is easier to serialize and parse.  
-					For example, the {@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform can be used to serialize {@link java.util.Date} objects 
+					For example, the {@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform can be used to serialize {@link java.util.Date} objects 
 						to ISO8601 strings, and parse them back into {@link java.util.Date} objects.
 				</td>
 				<td>&nbsp;</td>
@@ -824,50 +824,50 @@
 	<h4 class='topic' onclick='toggle(this)'>2.7 - Transforms</h4>
 	<div class='topic'>
 		<p>
-			The programmatic equivalent to the annotations are the {@link org.apache.juneau.transform.BeanTransform} and 
-			{@link org.apache.juneau.transform.PojoTransform} classes.  
+			The programmatic equivalent to the annotations are the {@link org.apache.juneau.transform.BeanFilter} and 
+			{@link org.apache.juneau.transform.PojoSwap} classes.  
 		</p>
 		<p>
-			The following example is equivalent to specifying the <l>@Bean</l> annotation in the previous example using a bean transform:
+			The following example is equivalent to specifying the <l>@Bean</l> annotation in the previous example using a bean filter:
 		</p>
 		<p class='bcode'>
 	<jc>// Define transform that returns properties in the following order: "street", "city", "state"</jc>
-	<jk>public class</jk> AddressTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
-		<jk>public</jk> AddressTransform() {
+	<jk>public class</jk> AddressFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+		<jk>public</jk> AddressFilter() {
 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
 		}
 	}
 	
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressFilter.<jk>class</jk>);
 	Address a = getAddress();
 	String json = s.serialize(a);  <jc>// Prints "{street:'...',city:'...',state;'...'}"</jc>
 		</p>
 		<p>
-			The {@link org.apache.juneau.transform.PojoTransform} class is a critical component of Juneau that allows serializers and parsers to
+			The {@link org.apache.juneau.transform.PojoSwap} class is a critical component of Juneau that allows serializers and parsers to
 			be able to handle virtually any Java object.
 			Simply put, they can be thought of as 'transformers' that convert non-serializable objects to serializable objects and vice versa.
 		</p>
 		<p>
 			For example, <l>Date</l> objects are not normally serializable.
 			(Technically, they look like beans with getters/setters and so get serialized as such, which typically is not the desired result.)
-			The following POJO transform can be used to represent dates in ISO8601 format:
+			The following POJO swap can be used to represent dates in ISO8601 format:
 		</p>
 		<p class='bcode'>
 	<jc>// Sample transform for converting Dates to ISO8601 strings.</jc>
-	<jk>public class</jk> MyDateTransform <jk>extends</jk> PojoTransform&lt;Date,String&gt; {
+	<jk>public class</jk> MyDateSwap <jk>extends</jk> PojoSwap&lt;Date,String&gt; {
 		
 		<jc>// ISO8601 formatter.</jc>
 		<jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
 		
 		<jd>/** Converts a Date object to an ISO8601 string. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> String transform(Date o) {
+		<jk>public</jk> String swap(Date o) {
 			<jk>return</jk> <jf>format</jf>.format(o);
 		}
 		
 		<jd>/** Converts an ISO8601 string to a Date object. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> Date normalize(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
+		<jk>public</jk> Date unswap(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
 			<jk>try</jk> {
 				<jk>return</jk> <jf>format</jf>.parse(o);
 			} <jk>catch</jk> (java.text.ParseException e) {
@@ -886,11 +886,11 @@
 	}
 
 	<jc>// Create a new JSON serializer, associate our date transform with it, and serialize a sample bean.</jc>
-	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateTransform.<jk>class</jk>);
+	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateSwap.<jk>class</jk>);
 	String json = serializer.serialize(<jk>new</jk> MyBean());	<jc>// == "{date:'2012-03-03T04:05:06-0500'}"</jc>
 	
 	<jc>// Create a JSON parser, associate our date transform with it, and reconstruct our bean (including the date).</jc>
-	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateTransform.<jk>class</jk>);
+	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateSwap.<jk>class</jk>);
 	MyBean bean = parser.parse(json, MyBean.<jk>class</jk>);
 	<jk>int</jk> day = bean.<jf>date</jf>.getDay(); 						<jc>// == 3</jc>
 		</p>
@@ -1245,7 +1245,7 @@
 		<jk>public</jk> URI <jf>addressBookUri</jf>; 
 		<jk>public int</jk> <jf>id</jf>; 
 		<jk>public</jk> String <jf>name</jf>; 
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>; 
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>; 
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf>; 
 	} 
 	&nbsp;
@@ -2088,7 +2088,7 @@
 		<jk>public static class</jk> FormInputBean { 
 			<jk>public</jk> String aString; 
 			<jk>public int</jk> aNumber; 
-			<ja>@BeanProperty</ja>(transform=CalendarTransform.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
+			<ja>@BeanProperty</ja>(transform=CalendarSwap.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
 			<jk>public</jk> Calendar aDate; 
 		} 
 	}		
@@ -2220,7 +2220,7 @@
 			<jc>// Interpret these as their parent classes, not subclasses</jc>
 			HttpServletRequest.<jk>class</jk>, HttpSession.<jk>class</jk>, ServletContext.<jk>class</jk>,
 			<jc>// Add a special transform for Enumerations</jc>
-			EnumerationTransform.<jk>class</jk>
+			EnumerationSwap.<jk>class</jk>
 		}
 	)
 	<jk>public class</jk> RequestEchoResource <jk>extends</jk> Resource {
@@ -2261,14 +2261,14 @@
 		<jc>// You'll just reuse the parent serializer group</jc>
 		SerializerGroup serializerGroup = <jk>super</jk>.createSerializers(properties, transforms);
 		
-		<jc>// Add bean transforms for the HttpServletRequest, HttpSession, and ServletContext objects
+		<jc>// Add bean filters for the HttpServletRequest, HttpSession, and ServletContext objects
 		//		so that you don't show vendor-specific properties on subclasses.
 		// Add Enumeration transform to be able to render the contents of Enumeration properties.
 		// The max depth and detect recursion options prevent any possible runaway serializations.  
 		// This shouldn't happen, but future JEE APIs may introduce deep hierarchies or loops.</jc>
 		serializerGroup
 			.addTransforms(HttpServletRequest.<jk>class</jk>, HttpSession.<jk>class</jk>, ServletContext.<jk>class</jk>)
-			.addTransforms(EnumerationTransform.<jk>class</jk>)
+			.addTransforms(EnumerationSwap.<jk>class</jk>)
 			.setProperty(<jsf>SERIALIZER_maxDepth</jsf>, 10)
 			.setProperty(<jsf>SERIALIZER_detectRecursions</jsf>, <jk>true</jk>);
 			.setProperty(<jsf>HTMLDOC_links</jsf>, <js>"{...}"</js>);
@@ -2522,7 +2522,7 @@
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
 		<jk>public</jk> String <jf>id</jf>;
 		<jk>public</jk> String <jf>name</jf>;
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf> = new LinkedList&lt;Address&gt;();
 		
 		<jd>/** Bean constructor - Needed for instantiating on server side */</jd> 
@@ -2566,7 +2566,7 @@
 						resource.  
 					This property has special meaning for the XML and RDF serializizers.  The XML serializer serializes this as a <l>uri</l> attribute instead of an <l>&lt;uri&gt;</l> element, and 
 						the RDF serializer uses this property for the value of the <l>rdf:resource</l> attribute.
-				<li>The <code><ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>)</code> annotation causes the date field to 
+				<li>The <code><ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>)</code> annotation causes the date field to 
 						be serialized in the format <l>"MM dd, yyyy"</l>.
 					This could have also been specified globally on the resource level through the {@link org.apache.juneau.server.annotation.RestResource#properties} annotation.
 			</ul>
@@ -2625,7 +2625,7 @@
 		
 		<jc>// Bean properties</jc>
 		<jk>public</jk> String <jf>name</jf>;
-		<ja>@BeanProperty(</ja>transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty(</ja>transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;CreateAddress&gt; <jf>addresses</jf>;
 		
 		<jd>/** Bean constructor - Needed for instantiating on server side */</jd>
@@ -2900,9 +2900,9 @@
 				<jk>new</jk> Column(<js>"age"</js>, <js>"xs:int"</js>), 
 				<jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>) 
 				.addTransform( 
-					<jk>new</jk> PojoTransform&lt;Person,Integer&gt;() { 
-						<ja>@Override</ja> /* PojoTransform */ 
-						<jk>public</jk> Integer transform(Person p) { 
+					<jk>new</jk> PojoSwap&lt;Person,Integer&gt;() { 
+						<ja>@Override</ja> /* PojoSwap */ 
+						<jk>public</jk> Integer swap(Person p) { 
 							<jk>return</jk> p.addresses.size(); 
 						} 
 					} 
@@ -4456,25 +4456,25 @@
 		<div class='topic'>
 			<p>
 				The {@link org.apache.juneau.server.annotation.RestResource#transforms()} annotation can be used to add 
-				POJO transforms to all the serializers and parsers registered with a servlet.
+				POJO swaps to all the serializers and parsers registered with a servlet.
 			</p>
 			<p>
-				In this example, you define a POJO transform that converts doubles to localized-format strings using
+				In this example, you define a POJO swap that converts doubles to localized-format strings using
 				the <l>NumberFormat</l> Java class.
 			</p>
 			<p class='bcode'>
 	<ja>@RestResource</ja>(
 		transforms={
-			MyRestService.LongTransform.<jk>class</jk>
+			MyRestService.DoubleSwap.<jk>class</jk>
 		}
 	)
 	<jk>public class</jk> MyRestService <jk>extends</jk> JazzDefaultRestResource {
 	
 		<jk>private static final</jk> NumberFormat <jsf>FORMAT</jsf> = NumberFormat.<jsm>getInstance()</jsm>;
 
-		<jk>public static class</jk> DoubleTransform <jk>extends</jk> PojoTransform&lt;Double,String&gt; {
-			<ja>@Override</ja> <jc>/* PojoTransform */</jc>
-			<jk>public</jk> String transform(Double o) <jk>throws</jk> SerializeException {
+		<jk>public static class</jk> DoubleSwap <jk>extends</jk> PojoSwap&lt;Double,String&gt; {
+			<ja>@Override</ja> <jc>/* PojoSwap */</jc>
+			<jk>public</jk> String swap(Double o) <jk>throws</jk> SerializeException {
 				<jk>return</jk> <jsf>FORMAT</jsf>.format(o);
 			}		
 		}
@@ -4499,7 +4499,7 @@
 	<ja>@Override</ja>
 	<jk>protected</jk> SerializerGroup createSerializers(ObjectMap properties, Class[] transforms) <jk>throws</jk> Exception {
 		SerializerGroup g = <jk>super</jk>.createSerializers(properties, transforms);
-		g.getSerializer(<js>"text/html"</js>).addTransforms(DoubleTransform.<jk>class</jk>); 
+		g.getSerializer(<js>"text/html"</js>).addTransforms(DoubleSwap.<jk>class</jk>); 
 		<jk>return</jk> g;
 	}
 			</p>
@@ -4733,7 +4733,7 @@
 			<li>Parsers can now parse directly from {@link java.io.File Files} and other types.
 				See {@link org.apache.juneau.parser.Parser#parse(Object,ClassMeta)}
 			<li>Parsers will automatically covert numeric input to POJOs that have numeric constructors (e.g. <code>java.util.Date</code>).
-			<li>Renamed 'Filters' to 'Transforms'.  Filters is just too overloaded a term.
+			<li>Renamed 'Filters' to 'BeanFilters' and 'PojoSwaps'.  Filters is just too overloaded a term.
 			<li>Internal utility classes moved to a new <code>org.apache.juneau.internal</code> package.
 				These internal utility classes are not meant for consumption outside the Juneau codebase.
 			<li>New methods on {@link org.apache.juneau.parser.Parser}:
@@ -4749,10 +4749,10 @@
 				</ul>
 			</li>
 			<li>New {@link org.apache.juneau.annotation.Bean#sort() @Bean.sort()} annotation.
-			<li>New methods on {@link org.apache.juneau.transform.BeanTransform}:
+			<li>New methods on {@link org.apache.juneau.transform.BeanFilter}:
 				<ul>
-					<li>{@link org.apache.juneau.transform.BeanTransform#isSortProperties()}
-					<li>{@link org.apache.juneau.transform.BeanTransform#setSortProperties(boolean)}
+					<li>{@link org.apache.juneau.transform.BeanFilter#isSortProperties()}
+					<li>{@link org.apache.juneau.transform.BeanFilter#setSortProperties(boolean)}
 				</ul>
 			</li>
 			<li>Added <ja>@Bean.properties</ja> annotations on various DTO beans to make the ordering consistent
@@ -5037,7 +5037,7 @@
 			<li>New <del><code>StringVar.doResolve(String)</code></del> method.
 			<li>New <del><code>StringVarResolver.DEFAULT</code></del> field.
 			<li>Eliminated dependency on <code>javax.mail.internet.MimeUtility</code> by implementing our own {@link org.apache.juneau.internal.StringUtils#base64Encode(byte[])} method.
-			<li>{@link org.apache.juneau.transforms.CalendarTransform} and {@link org.apache.juneau.transforms.DateTransform} classes now handle blank input better.  Returns <jk>null</jk> instead of throwing an exception.
+			<li>{@link org.apache.juneau.transforms.CalendarSwap} and {@link org.apache.juneau.transforms.DateSwap} classes now handle blank input better.  Returns <jk>null</jk> instead of throwing an exception.
 			<li>{@link org.apache.juneau.html.HtmlDocSerializer} specifies the default CSS location as <code>/servletPath/style.css</code> instead of <code>/servletPath/htdocs/juneau.css</code>.  
 				This coincides with enhancements made in the server code for specifying styles.
 			<li>{@link org.apache.juneau.html.HtmlDocSerializer} wraps output in two div tags instead of one (e.g. <code>&lt;div class='outerdata'&gt;&lt;div class='data' id='data'&gt;...&lt;/div&gt;&lt;/div&gt;</code>).
@@ -6031,11 +6031,11 @@
 			Juno 5.1.0.6 is a moderate update.
 		</p>
 		<ul class='spaced-list'>
-			<li>Simplified API for {@link org.apache.juneau.transform.PojoTransform}.  
-				Since it's rarely used, the <code>beanContext</code> parameter was replaced with a {@link org.apache.juneau.transform.PojoTransform#getBeanContext()} method on
+			<li>Simplified API for {@link org.apache.juneau.transform.PojoSwap}.  
+				Since it's rarely used, the <code>beanContext</code> parameter was replaced with a {@link org.apache.juneau.transform.PojoSwap#getBeanContext()} method on
 				the class.
-			<li>New simplified way of defining POJO filters without needing to extend {@link org.apache.juneau.transform.PojoTransform}.
-				See {@link org.apache.juneau.transform.SurrogateTransform} for details.
+			<li>New simplified way of defining POJO filters without needing to extend {@link org.apache.juneau.transform.PojoSwap}.
+				See {@link org.apache.juneau.transform.SurrogateSwap} for details.
 			<li>New {@link org.apache.juneau.html.annotation.Html @Html} annotation.
 				Will allow the definition of standard XHTML DTOs in future releases.  
 				For now, {@link org.apache.juneau.html.dto.Img} is an example of defining an XHTML element using Juno DTOs.
@@ -6126,8 +6126,8 @@
 			<li>New {@link org.apache.juneau.json.annotation.Json#wrapperAttr() @Json.wrapperAttr()}	annotation that automatically wraps beans and objects in a wrapper
 				attribute when serializing to or parsing from JSON.
 			<li>Changed the default ordering of bean properties to be in parent-to-child class order.
-			<li>New {@link org.apache.juneau.transform.BeanTransform#readProperty(Object,String,Object) readProperty()} and {@link org.apache.juneau.transform.BeanTransform#writeProperty(Object,String,Object) writeProperty()}
-				methods added to {@link org.apache.juneau.transform.BeanTransform} class to allow individualized serialization and parsing behavior on a class-by-class basis.
+			<li>New {@link org.apache.juneau.transform.BeanFilter#readProperty(Object,String,Object) readProperty()} and {@link org.apache.juneau.transform.BeanFilter#writeProperty(Object,String,Object) writeProperty()}
+				methods added to {@link org.apache.juneau.transform.BeanFilter} class to allow individualized serialization and parsing behavior on a class-by-class basis.
 			<li>Eliminated previous restriction where bean subtype attributes had to be listed first in JSON objects when using the {@link org.apache.juneau.annotation.Bean#subTypeProperty()} annotation.
 				The previous behavior was not strictly JSON-compliant since JSON objects are supposed to consist of unordered lists of key/value pairs.
 				While targeted for JSON, the restriction is also lifted for all other parsers.  	
@@ -6346,7 +6346,7 @@
 				New {@link org.apache.juneau.annotation.Bean#stopClass @Bean.stopClass} annotation for specifying stop classes for bean properties.
 			</li>
 			<li>
-				New {@link org.apache.juneau.transform.BeanTransform#setStopClass(Class)} which is the program equivalent to the annotation above.
+				New {@link org.apache.juneau.transform.BeanFilter#setStopClass(Class)} which is the program equivalent to the annotation above.
 			</li>
 			<li>
 				New methods on {@link org.apache.juneau.dto.ResultSetList}:
@@ -6489,7 +6489,7 @@
 				The new class hierarchy is much simpler to understand.
 			</li>
 			<li>
-				Added {@link org.apache.juneau.transforms.XMLGregorianCalendarTransform} to convert these to ISO8601 strings during serialization, and vice versa during parsing.
+				Added {@link org.apache.juneau.transforms.XMLGregorianCalendarSwap} to convert these to ISO8601 strings during serialization, and vice versa during parsing.
 			</li>
 			<li>
 				Added a {@link org.apache.juneau.json.JsonParserContext#JSON_strictMode strict} mode to {@link org.apache.juneau.json.JsonParser}.
@@ -6528,7 +6528,7 @@
 			<li>
 				Revamped the API for filter support:
 				<ul>
-					<li>Updated {@link org.apache.juneau.transform.BeanTransform} class to mirror the {@link org.apache.juneau.annotation.Bean @Bean} annotation.</li>
+					<li>Updated {@link org.apache.juneau.transform.BeanFilter} class to mirror the {@link org.apache.juneau.annotation.Bean @Bean} annotation.</li>
 					<li>Introduced support for bean {@link org.apache.juneau.annotation.Bean#subTypeProperty() subtypes}. </li>
 					<li>Replaced <code><ja>@Bean</ja>(filter=xxx)</code> with new {@link org.apache.juneau.annotation.Transform @Transform} annotation.</li>
 				</ul>
@@ -6548,8 +6548,8 @@
 			<li>
 				New predefined DateFilters with millisecond precision:
 				<ul>
-					<li><code>org.apache.juneau.transforms.DateTransform.ISO8601DTP</code></li>
-					<li><code>org.apache.juneau.transforms.DateTransform.ISO8601DTZP</code></li>
+					<li><code>org.apache.juneau.transforms.DateSwap.ISO8601DTP</code></li>
+					<li><code>org.apache.juneau.transforms.DateSwap.ISO8601DTZP</code></li>
 				</ul>
 			</li>
 		</ul>		
@@ -6686,7 +6686,7 @@
 				Removed <code><ja>@Xml</ja>.valAttr</code> annotation since it's now redundant with <code><ja>@Xml</ja>(format=<jsf>CONTENT</jsf>)</code>.
  			</li>
  			<li>
-				Fixed timezone bug in {@link org.apache.juneau.transforms.CalendarTransform}.
+				Fixed timezone bug in {@link org.apache.juneau.transforms.CalendarSwap}.
 			</li>
  			<li>
 				Simplified <code>Serializer.serialize(Object,Object,SerializerContext)</code> method.
@@ -6992,7 +6992,7 @@
 				New {@link org.apache.juneau.transform} package.
 				<ul>
 					<li>Cleaner class structure.</li>
-					<li>Improved {@link org.apache.juneau.transform.BeanTransform} class for defining property filters on beans.</li>
+					<li>Improved {@link org.apache.juneau.transform.BeanFilter} class for defining property filters on beans.</li>
 					<li>Improved {@link org.apache.juneau.utils.PojoQuery} class for defining filters on objects (previously called <code>ObjectFilter</code>).</li>
          		</ul>
          	</li>
@@ -7033,7 +7033,7 @@
 				<code>JsonMap</code> and <code>JsonList</code> changed to {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} to better reflect that they're not limited to just JSON support.
      		</li>
      		<li>
-				Renamed <code>PojoTransform</code> to {@link org.apache.juneau.utils.PojoQuery} to not confuse it with the new Filter API.
+				Renamed <code>PojoSwap</code> to {@link org.apache.juneau.utils.PojoQuery} to not confuse it with the new Filter API.
 			</li>
 		</ul>
 		<h6 class='topic'>REST server API changes</h6>
@@ -7561,8 +7561,8 @@
 				The API for handling non-standard POJOs has been simplified by introducing the concept of a {@link org.apache.juneau.transform.Transform} class, which is associated with the <code>BeanContext</code> class (and thus the Serializer and Parser classes too) through the <code>BeanContext.addTransforms(Class[])</code> method.<br>
 				Two new subclasses of {@link org.apache.juneau.transform.Transform}:
 				<ul>
-					<li>{@link org.apache.juneau.transform.BeanTransform} - Filter POJO beans.</li>
-					<li>{@link org.apache.juneau.transform.PojoTransform} - Filter POJOs that aren't beans.</li>
+					<li>{@link org.apache.juneau.transform.BeanFilter} - Filter POJO beans.</li>
+					<li>{@link org.apache.juneau.transform.PojoSwap} - Filter POJOs that aren't beans.</li>
 				</ul>
 				This new API replaces the previous separate <code>Cast</code> and <code>BeanFilter</code> APIs which were considerably more complicated and puts them under a common API. 
 			</li>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
index e57abba..dab2579 100755
--- a/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
@@ -732,31 +732,31 @@ public class BeanConfigTest {
 		p2.setProperty(BEAN_notBeanPackages_remove, "bar");
 		assertSameCache(p1, p2);
 
-		p1.addTransforms(DummyPojoTransformA.class);
+		p1.addTransforms(DummyPojoSwapA.class);
 		assertDifferentCache(p1, p2);
-		p2.addTransforms(DummyPojoTransformA.class);
+		p2.addTransforms(DummyPojoSwapA.class);
 		assertSameCache(p1, p2);
-		p1.addTransforms(DummyPojoTransformB.class,DummyPojoTransformC.class);  // Order of filters is important!
-		p2.addTransforms(DummyPojoTransformC.class,DummyPojoTransformB.class);
+		p1.addTransforms(DummyPojoSwapB.class,DummyPojoSwapC.class);  // Order of filters is important!
+		p2.addTransforms(DummyPojoSwapC.class,DummyPojoSwapB.class);
 		assertDifferentCache(p1, p2);
 
 		p1 = new JsonParser();
 		p2 = new JsonParser();
-		p1.addTransforms(DummyBeanTransformA.class);
+		p1.addTransforms(DummyBeanFilterA.class);
 		assertDifferentCache(p1, p2);
-		p2.addTransforms(DummyBeanTransformA.class);
+		p2.addTransforms(DummyBeanFilterA.class);
 		assertSameCache(p1, p2);
-		p1.addTransforms(DummyBeanTransformB.class,DummyBeanTransformC.class);  // Order of filters is important!
-		p2.addTransforms(DummyBeanTransformC.class,DummyBeanTransformB.class);
+		p1.addTransforms(DummyBeanFilterB.class,DummyBeanFilterC.class);  // Order of filters is important!
+		p2.addTransforms(DummyBeanFilterC.class,DummyBeanFilterB.class);
 		assertDifferentCache(p1, p2);
 	}
 
-	public static class DummyPojoTransformA extends PojoTransform<A,ObjectMap> {}
-	public static class DummyPojoTransformB extends PojoTransform<B,ObjectMap> {}
-	public static class DummyPojoTransformC extends PojoTransform<C,ObjectMap> {}
-	public static class DummyBeanTransformA extends BeanTransform<A> {}
-	public static class DummyBeanTransformB extends BeanTransform<B> {}
-	public static class DummyBeanTransformC extends BeanTransform<C> {}
+	public static class DummyPojoSwapA extends PojoSwap<A,ObjectMap> {}
+	public static class DummyPojoSwapB extends PojoSwap<B,ObjectMap> {}
+	public static class DummyPojoSwapC extends PojoSwap<C,ObjectMap> {}
+	public static class DummyBeanFilterA extends BeanFilter<A> {}
+	public static class DummyBeanFilterB extends BeanFilter<B> {}
+	public static class DummyBeanFilterC extends BeanFilter<C> {}
 	public static class C {}
 
 	private void assertSameCache(Parser p1, Parser p2) {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
new file mode 100755
index 0000000..b1b1740
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
@@ -0,0 +1,145 @@
+/***************************************************************************************************************************
+ * 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;
+
+import static org.junit.Assert.*;
+
+import java.util.*;
+
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.json.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class BeanFilterTest {
+
+	//====================================================================================================
+	// Test sub types
+	//====================================================================================================
+	@Test
+	public void testSubTypes() throws Exception {
+		JsonSerializer s = JsonSerializer.DEFAULT_LAX;
+		JsonParser p = JsonParser.DEFAULT;
+
+		A1 a1 = new A1();
+		a1.f1 = "f1";
+		a1.fb = new B2();
+		((B2)a1.fb).f2 = "f2";
+		String r = s.serialize(a1);
+		assertEquals("{subType:'A1',f0:'f0',fb:{subType:'B2',f0b:'f0b',f2:'f2'},f1:'f1'}", r);
+
+		A a = p.parse(r, A.class);
+		assertTrue(a instanceof A1);
+		assertTrue(a.fb instanceof B2);
+		assertEquals("f1", ((A1)a).f1);
+		assertEquals("f2", ((B2)a.fb).f2);
+
+		// Try out-of-order creation.
+		r = "{f0:'f0',f1:'f1',subType:'A1',fb:{f0b:'f0b',f2:'f2',subType:'B2'}}";
+		a = p.parse(r, A.class);
+		assertTrue(a instanceof A1);
+		assertTrue(a.fb instanceof B2);
+		assertEquals("f1", ((A1)a).f1);
+		assertEquals("f2", ((B2)a.fb).f2);
+	}
+
+	@Bean(
+		subTypeProperty="subType",
+		subTypes={
+			@BeanSubType(type=A1.class, id="A1"),
+			@BeanSubType(type=A2.class, id="A2")
+		}
+	)
+	public static abstract class A {
+		public String f0 = "f0";
+		public B fb;
+	}
+
+	public static class A1 extends A {
+		public String f1;
+	}
+
+	public static class A2 extends A {
+		public String f2;
+	}
+
+	@Bean(
+		subTypeProperty="subType",
+		subTypes={
+			@BeanSubType(type=B1.class, id="B1"),
+			@BeanSubType(type=B2.class, id="B2")
+		}
+	)
+	public static abstract class B {
+		public String f0b = "f0b";
+	}
+
+	public static class B1 extends B {
+		public String f1;
+	}
+
+	public static class B2 extends B {
+		public String f2;
+	}
+
+	//====================================================================================================
+	// Test parent class used as transform
+	//====================================================================================================
+	@Test
+	public void testParentClassTransform() throws Exception {
+		JsonSerializer s = new JsonSerializer.Simple().addTransforms(C1.class);
+
+		C1 c1 = new C2();
+		String r = s.serialize(c1);
+		assertEquals("{f0:'f0'}", r);
+
+		List<C1> l = new LinkedList<C1>();
+		l.add(new C2());
+		r = s.serialize(l);
+		assertEquals("[{f0:'f0'}]", r);
+	}
+
+	public static class C1 {
+		public String f0 = "f0";
+	}
+
+	public static class C2 extends C1 {
+		public String f1 = "f1";
+	}
+
+	//====================================================================================================
+	// Test non-static parent class used as transform
+	//====================================================================================================
+	@Test
+	public void testParentClassTransform2() throws Exception {
+		JsonSerializer s = new JsonSerializer.Simple().addTransforms(D1.class);
+
+		D1 d1 = new D2();
+		String r = s.serialize(d1);
+		assertEquals("{f0:'f0'}", r);
+
+		List<D1> l = new LinkedList<D1>();
+		l.add(new D2());
+		r = s.serialize(l);
+		assertEquals("[{f0:'f0'}]", r);
+	}
+
+	public class D1 {
+		public String f0 = "f0";
+	}
+
+	public class D2 extends D1 {
+		public String f1 = "f1";
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
index f7e3b12..b1c4b97 100755
--- a/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
@@ -1481,11 +1481,11 @@ public class BeanMapTest {
 	}
 
 	//====================================================================================================
-	// testCastToLinkedListUsingTransform - cast() to LinkedList<Calendar> using CalendarTransform
+	// testCastToLinkedListUsingTransform - cast() to LinkedList<Calendar> using CalendarSwap
 	//====================================================================================================
 	@Test
 	public void testCastToLinkedListUsingTransform() throws Exception {
-		BeanContext bc = ContextFactory.create().addTransforms(CalendarTransform.ISO8601DTZ.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(CalendarSwap.ISO8601DTZ.class).getBeanContext();
 
 		// With _class
 		ObjectMap m = new ObjectMap(bc);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
deleted file mode 100755
index 0ee689c..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
+++ /dev/null
@@ -1,145 +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;
-
-import static org.junit.Assert.*;
-
-import java.util.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.json.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class BeanTransformTest {
-
-	//====================================================================================================
-	// Test sub types
-	//====================================================================================================
-	@Test
-	public void testSubTypes() throws Exception {
-		JsonSerializer s = JsonSerializer.DEFAULT_LAX;
-		JsonParser p = JsonParser.DEFAULT;
-
-		A1 a1 = new A1();
-		a1.f1 = "f1";
-		a1.fb = new B2();
-		((B2)a1.fb).f2 = "f2";
-		String r = s.serialize(a1);
-		assertEquals("{subType:'A1',f0:'f0',fb:{subType:'B2',f0b:'f0b',f2:'f2'},f1:'f1'}", r);
-
-		A a = p.parse(r, A.class);
-		assertTrue(a instanceof A1);
-		assertTrue(a.fb instanceof B2);
-		assertEquals("f1", ((A1)a).f1);
-		assertEquals("f2", ((B2)a.fb).f2);
-
-		// Try out-of-order creation.
-		r = "{f0:'f0',f1:'f1',subType:'A1',fb:{f0b:'f0b',f2:'f2',subType:'B2'}}";
-		a = p.parse(r, A.class);
-		assertTrue(a instanceof A1);
-		assertTrue(a.fb instanceof B2);
-		assertEquals("f1", ((A1)a).f1);
-		assertEquals("f2", ((B2)a.fb).f2);
-	}
-
-	@Bean(
-		subTypeProperty="subType",
-		subTypes={
-			@BeanSubType(type=A1.class, id="A1"),
-			@BeanSubType(type=A2.class, id="A2")
-		}
-	)
-	public static abstract class A {
-		public String f0 = "f0";
-		public B fb;
-	}
-
-	public static class A1 extends A {
-		public String f1;
-	}
-
-	public static class A2 extends A {
-		public String f2;
-	}
-
-	@Bean(
-		subTypeProperty="subType",
-		subTypes={
-			@BeanSubType(type=B1.class, id="B1"),
-			@BeanSubType(type=B2.class, id="B2")
-		}
-	)
-	public static abstract class B {
-		public String f0b = "f0b";
-	}
-
-	public static class B1 extends B {
-		public String f1;
-	}
-
-	public static class B2 extends B {
-		public String f2;
-	}
-
-	//====================================================================================================
-	// Test parent class used as transform
-	//====================================================================================================
-	@Test
-	public void testParentClassTransform() throws Exception {
-		JsonSerializer s = new JsonSerializer.Simple().addTransforms(C1.class);
-
-		C1 c1 = new C2();
-		String r = s.serialize(c1);
-		assertEquals("{f0:'f0'}", r);
-
-		List<C1> l = new LinkedList<C1>();
-		l.add(new C2());
-		r = s.serialize(l);
-		assertEquals("[{f0:'f0'}]", r);
-	}
-
-	public static class C1 {
-		public String f0 = "f0";
-	}
-
-	public static class C2 extends C1 {
-		public String f1 = "f1";
-	}
-
-	//====================================================================================================
-	// Test non-static parent class used as transform
-	//====================================================================================================
-	@Test
-	public void testParentClassTransform2() throws Exception {
-		JsonSerializer s = new JsonSerializer.Simple().addTransforms(D1.class);
-
-		D1 d1 = new D2();
-		String r = s.serialize(d1);
-		assertEquals("{f0:'f0'}", r);
-
-		List<D1> l = new LinkedList<D1>();
-		l.add(new D2());
-		r = s.serialize(l);
-		assertEquals("[{f0:'f0'}]", r);
-	}
-
-	public class D1 {
-		public String f0 = "f0";
-	}
-
-	public class D2 extends D1 {
-		public String f1 = "f1";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java b/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
index 16daad9..d6a8dcd 100755
--- a/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
@@ -121,148 +121,148 @@ public class ClassMetaTest {
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertFalse(ooo.hasChildPojoTransforms());
-		assertFalse(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertNull(hi2.getPojoTransform());
-		assertNull(hc2.getPojoTransform());
+		assertFalse(ooo.hasChildPojoSwaps());
+		assertFalse(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertNull(hi2.getPojoSwap());
+		assertNull(hc2.getPojoSwap());
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), HC2.class);
 
-		bc = ContextFactory.create().addTransforms(HI1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertEquals(hc1.getPojoTransform().getClass(), HC1Transform.class);
-		assertNull(hi2.getPojoTransform());
-		assertEquals(hc2.getPojoTransform().getClass(), HC1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertEquals(hc1.getPojoSwap().getClass(), HC1Swap.class);
+		assertNull(hi2.getPojoSwap());
+		assertEquals(hc2.getPojoSwap().getClass(), HC1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HI2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertEquals(hi2.getPojoTransform().getClass(), HI2Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertEquals(hi2.getPojoSwap().getClass(), HI2Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertNull(hi2.getPojoTransform());
-		assertEquals(hc2.getPojoTransform().getClass(), HC2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertNull(hi2.getPojoSwap());
+		assertEquals(hc2.getPojoSwap().getClass(), HC2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HI1Transform.class,HC1Transform.class,HI2Transform.class,HC2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI1Swap.class,HC1Swap.class,HI2Swap.class,HC2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC2Transform.class,HI2Transform.class,HC1Transform.class,HI1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC2Swap.class,HI2Swap.class,HC1Swap.class,HI1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HC1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI2Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HC2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HC1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI2Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HC2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
@@ -274,8 +274,8 @@ public class ClassMetaTest {
 	public class HC1 implements HI1 {}
 	public interface HI2 extends HI1 {}
 	public class HC2 extends HC1 implements HI2 {}
-	public static class HC1Transform extends PojoTransform<HC1,Map> {}
-	public static class HI1Transform extends PojoTransform<HI1,Map> {}
-	public static class HC2Transform extends PojoTransform<HC2,Map> {}
-	public static class HI2Transform extends PojoTransform<HI2,Map> {}
+	public static class HC1Swap extends PojoSwap<HC1,Map> {}
+	public static class HI1Swap extends PojoSwap<HI1,Map> {}
+	public static class HC2Swap extends PojoSwap<HC2,Map> {}
+	public static class HI2Swap extends PojoSwap<HI2,Map> {}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java b/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
index 44b64c3..0c30966 100755
--- a/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
@@ -134,7 +134,7 @@ public class DataConversionTest {
 	@Test
 	public void testObjectTransforms() throws Exception {
 		String s = "Jan 12, 2001";
-		BeanContext bc = ContextFactory.create().addTransforms(CalendarTransform.Medium.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(CalendarSwap.Medium.class).getBeanContext();
 		Calendar c = bc.convertToType(s, GregorianCalendar.class);
 		assertEquals(2001, c.get(Calendar.YEAR));
 		c = bc.convertToType(s, Calendar.class);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java b/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
new file mode 100755
index 0000000..3867a34
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
@@ -0,0 +1,57 @@
+/***************************************************************************************************************************
+ * 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;
+
+import static org.junit.Assert.*;
+
+import org.apache.juneau.json.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class PojoSwapTest {
+
+	//====================================================================================================
+	// Test same type
+	// If you define a PojoSwap<String,String> filter, then it should be invoked on all strings.
+	//====================================================================================================
+	@Test
+	public void testSameType() throws Exception {
+		JsonSerializer s = JsonSerializer.DEFAULT_LAX.clone().addTransforms(ATransform.class);
+		JsonParser p = JsonParser.DEFAULT.clone().addTransforms(ATransform.class);
+		String r;
+
+		r = s.serialize("foobar");
+		assertEquals("'xfoobarx'", r);
+		r = p.parse(r, String.class);
+		assertEquals("foobar", r);
+
+		ObjectMap m = new ObjectMap("{foo:'bar'}");
+		r = s.serialize(m);
+		assertEquals("{xfoox:'xbarx'}", r);
+	}
+
+	public static class ATransform extends PojoSwap<String,String> {
+		@Override
+		public String swap(String o) throws SerializeException {
+			return "x" + o + "x";
+		}
+
+		@Override
+		public String unswap(String f, ClassMeta<?> hint) throws ParseException {
+			return f.substring(1, f.length()-1);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
deleted file mode 100755
index 737adee..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
+++ /dev/null
@@ -1,57 +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;
-
-import static org.junit.Assert.*;
-
-import org.apache.juneau.json.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class PojoTransformTest {
-
-	//====================================================================================================
-	// Test same type
-	// If you define a PojoTransform<String,String> filter, then it should be invoked on all strings.
-	//====================================================================================================
-	@Test
-	public void testSameType() throws Exception {
-		JsonSerializer s = JsonSerializer.DEFAULT_LAX.clone().addTransforms(ATransform.class);
-		JsonParser p = JsonParser.DEFAULT.clone().addTransforms(ATransform.class);
-		String r;
-
-		r = s.serialize("foobar");
-		assertEquals("'xfoobarx'", r);
-		r = p.parse(r, String.class);
-		assertEquals("foobar", r);
-
-		ObjectMap m = new ObjectMap("{foo:'bar'}");
-		r = s.serialize(m);
-		assertEquals("{xfoox:'xbarx'}", r);
-	}
-
-	public static class ATransform extends PojoTransform<String,String> {
-		@Override
-		public String transform(String o) throws SerializeException {
-			return "x" + o + "x";
-		}
-
-		@Override
-		public String normalize(String f, ClassMeta<?> hint) throws ParseException {
-			return f.substring(1, f.length()-1);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/TestUtils.java b/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
index 2194571..18379cc 100755
--- a/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
@@ -52,10 +52,10 @@ public class TestUtils {
 
 
 	private static JsonSerializer js2 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class);
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class);
 
 	private static JsonSerializer js3 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class)
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class)
 		.setProperty(BEAN_sortProperties, true);
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
index 8fa5506..743c543 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
@@ -219,14 +219,14 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	//====================================================================================================
 	@Test
 	public void testSubTypesUsingAnnotation() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarTransform.class);
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		B1 b1 = B1.create();
 		Object r = s.serialize(b1);
@@ -290,18 +290,18 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(subTypes=xxx) using BeanTransform
+	// Test @Bean(subTypes=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
-	public void testSubTypesUsingBeanTransform() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarTransform.class);
+	public void testSubTypesUsingBeanFilter() throws Exception {
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(CTransform.class, XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(CTransform.class, XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(CTransform.class, XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(CTransform.class, XMLGregorianCalendarSwap.class);
 
 		C1 c1 = C1.create();
 		Object r = s.serialize(c1);
@@ -356,7 +356,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		}
 	}
 
-	public static class CTransform extends BeanTransform<C> {
+	public static class CTransform extends BeanFilter<C> {
 		public CTransform() {
 			setSubTypeProperty("subType");
 			addSubType(C1.class, "C1");
@@ -414,16 +414,16 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 
 
 	//====================================================================================================
-	// Test @Bean(subTypes=xxx) with real bean property using BeanTransform
+	// Test @Bean(subTypes=xxx) with real bean property using BeanFilter
 	//====================================================================================================
 	@Test
-	public void testSubTypePropertyWithRealPropertyUsingBeanTransform() throws Exception {
+	public void testSubTypePropertyWithRealPropertyUsingBeanFilter() throws Exception {
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(CATransform.class);
-		Parser p = getParser().clone().addTransforms(CATransform.class);
+		Serializer s = getSerializer().clone().addTransforms(CAFilter.class);
+		Parser p = getParser().clone().addTransforms(CAFilter.class);
 
 		CA1 c1 = CA1.create();
 		Object r = s.serialize(c1);
@@ -453,8 +453,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		public String f2;
 	}
 
-	public static class CATransform extends BeanTransform<CA> {
-		public CATransform() {
+	public static class CAFilter extends BeanFilter<CA> {
+		public CAFilter() {
 			setSubTypeProperty("subType");
 			addSubType(CA1.class, "CA1");
 			addSubType(CA2.class, "CA2");
@@ -492,18 +492,18 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(properties=xxx) using BeanTransform
+	// Test @Bean(properties=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testPropertiesUsingTransform() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(D2Transform.class);
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(D2Filter.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(D2Transform.class);
-		Parser p = getParser().clone().addTransforms(D2Transform.class);
+		Serializer s = getSerializer().clone().addTransforms(D2Filter.class);
+		Parser p = getParser().clone().addTransforms(D2Filter.class);
 
 		D2 d = new D2().init();
 		Object r = s.serialize(d);
@@ -521,8 +521,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class D2Transform extends BeanTransform<D2> {
-		public D2Transform() {
+	public static class D2Filter extends BeanFilter<D2> {
+		public D2Filter() {
 			setProperties("f3","f2");
 		}
 	}
@@ -557,7 +557,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(excludeProperties=xxx) using BeanTransform
+	// Test @Bean(excludeProperties=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testExcludePropertiesUsingTransform() throws Exception {
@@ -565,8 +565,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(E2Transform.class);
-		Parser p = getParser().clone().addTransforms(E2Transform.class);
+		Serializer s = getSerializer().clone().addTransforms(E2Filter.class);
+		Parser p = getParser().clone().addTransforms(E2Filter.class);
 
 		E2 e = new E2().init();
 		Object r = s.serialize(e);
@@ -583,8 +583,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class E2Transform extends BeanTransform<E2> {
-		public E2Transform() {
+	public static class E2Filter extends BeanFilter<E2> {
+		public E2Filter() {
 			setExcludeProperties("f2");
 		}
 	}
@@ -622,7 +622,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(interfaceClass=xxx) using BeanTransform
+	// Test @Bean(interfaceClass=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testInterfaceClassUsingTransform() throws Exception {
@@ -636,8 +636,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return;
 
 		// --- Transform defined on parent class ---
-		s = getSerializer().clone().addTransforms(FB1Transform.class);
-		p = getParser().clone().addTransforms(FB1Transform.class);
+		s = getSerializer().clone().addTransforms(FB1Filter.class);
+		p = getParser().clone().addTransforms(FB1Filter.class);
 
 		t = new FB2().init();
 		r = s.serialize(t);
@@ -645,8 +645,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		assertObjectEquals("{f1:'f1'}", t);
 
 		// --- Transform defined on child class class ---
-		s = getSerializer().clone().addTransforms(FB2Transform.class);
-		p = getParser().clone().addTransforms(FB2Transform.class);
+		s = getSerializer().clone().addTransforms(FB2Filter.class);
+		p = getParser().clone().addTransforms(FB2Filter.class);
 
 		t = new FB2().init();
 		r = s.serialize(t);
@@ -675,13 +675,13 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class FB1Transform extends BeanTransform<FB1> {
-		public FB1Transform() {
+	public static class FB1Filter extends BeanFilter<FB1> {
+		public FB1Filter() {
 			setInterfaceClass(FB1.class);
 		}
 	}
-	public static class FB2Transform extends BeanTransform<FB2> {
-		public FB2Transform() {
+	public static class FB2Filter extends BeanFilter<FB2> {
+		public FB2Filter() {
 			setInterfaceClass(FB1.class);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
index 3b1bf5a..66c2118 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
@@ -42,9 +42,9 @@ public class RoundTripMapsTest extends RoundTripTest {
 	@Override /* RoundTripTest */
 	public Class<?>[] getTransforms() {
 		return new Class<?>[]{
-			ByteArrayBase64Transform.class,
-			DateTransform.ISO8601DTZ.class,
-			CalendarLongTransform.class,
+			ByteArrayBase64Swap.class,
+			DateSwap.ISO8601DTZ.class,
+			CalendarLongSwap.class,
 		};
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
index 8433862..3f3fc0d 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
@@ -46,9 +46,9 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	@Test
 	public void testTransformBeans1() throws Exception {
 		Class<?>[] f = {
-			ByteArrayBase64Transform.class,
-			CalendarTransform.ISO8601DTZ.class,
-			DateTransform.ISO8601DTZ.class
+			ByteArrayBase64Swap.class,
+			CalendarSwap.ISO8601DTZ.class,
+			DateSwap.ISO8601DTZ.class
 		};
 		s.addTransforms(f);
 		if (p != null)
@@ -56,7 +56,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		A t = new A().init();
 		t = roundTrip(t, A.class);
 
-		// ByteArrayBase64Transform
+		// ByteArrayBase64Swap
 		assertEquals(3, t.fByte[3]);
 		assertNull(t.fnByte);
 		assertEquals(5, t.faByte[2][1]);
@@ -65,7 +65,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertEquals(6, t.fmByte.get("bar")[2]);
 		assertNull(t.fmByte.get("baz"));
 
-		// CalendarTransform
+		// CalendarSwap
 		t.fCalendar.setTimeZone(TimeZone.getTimeZone("GMT"));
 		assertEquals(2001, t.fCalendar.get(Calendar.YEAR));
 		assertEquals(01, t.fCalendar.get(Calendar.MONTH));
@@ -84,7 +84,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertNull(t.fnCalendar);
 		assertNull(t.fn2Calendar);
 
-		// DateTransform
+		// DateSwap
 		assertEquals(1000, t.fDate.getTime());
 		assertNull(t.fnDate);
 		assertEquals(3000, t.faDate[2].getTime());
@@ -96,7 +96,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 
 	public static class A {
 
-		// Test ByteArrayBase64Transform
+		// Test ByteArrayBase64Swap
 		public byte[] fByte;
 		public byte[] fnByte;
 		public byte[][] faByte;
@@ -166,9 +166,9 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	@Test
 	public void testTransformBeans2() throws Exception {
 		Class<?>[] f = {
-			ByteArrayBase64Transform.class,
-			CalendarTransform.Medium.class,
-			DateTransform.RFC2822DT.class,
+			ByteArrayBase64Swap.class,
+			CalendarSwap.Medium.class,
+			DateSwap.RFC2822DT.class,
 		};
 		s.addTransforms(f);
 		if (p != null)
@@ -176,7 +176,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		A t = new A().init();
 		t = roundTrip(t, A.class);
 
-		// ByteArrayBase64Transform
+		// ByteArrayBase64Swap
 		assertEquals(3, t.fByte[3]);
 		assertNull(t.fnByte);
 		assertEquals(5, t.faByte[2][1]);
@@ -185,7 +185,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertEquals(6, t.fmByte.get("bar")[2]);
 		assertNull(t.fmByte.get("baz"));
 
-		// CalendarTransform
+		// CalendarSwap
 		t.fCalendar.setTimeZone(TimeZone.getTimeZone("GMT"));
 		assertEquals(2001, t.fCalendar.get(Calendar.YEAR));
 		assertEquals(01, t.fCalendar.get(Calendar.MONTH));
@@ -206,7 +206,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertNull(t.fnCalendar);
 		assertNull(t.fn2Calendar);
 
-		// DateTransform
+		// DateSwap
 		assertEquals(1000, t.fDate.getTime());
 		assertNull(t.fnDate);
 		assertEquals(3000, t.faDate[2].getTime());
@@ -233,13 +233,13 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		public String f1;
 	}
 
-	public static class BTransform extends PojoTransform<B,String> {
-		@Override /* PojoTransform */
-		public String transform(B o) throws SerializeException {
+	public static class BTransform extends PojoSwap<B,String> {
+		@Override /* PojoSwap */
+		public String swap(B o) throws SerializeException {
 			return o.f1;
 		}
-		@Override /* PojoTransform */
-		public B normalize(String f, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public B unswap(String f, ClassMeta<?> hint) throws ParseException {
 			B b1 = new B();
 			b1.f1 = f;
 			return b1;
@@ -247,7 +247,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// testXMLGregorianCalendar - Test XMLGregorianCalendarTransform class.
+	// testXMLGregorianCalendar - Test XMLGregorianCalendarSwap class.
 	//====================================================================================================
 	@Test
 	public void testXMLGregorianCalendar() throws Exception {
@@ -258,8 +258,8 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		GregorianCalendar gc = new GregorianCalendar();
 		XMLGregorianCalendar c = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);
 
-		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		Object r = s.serialize(c);
 		XMLGregorianCalendar c2 = p.parse(r, XMLGregorianCalendar.class);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java b/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
index 79c8748..a988ea2 100755
--- a/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
@@ -100,26 +100,26 @@ public class HtmlTest {
 		public String f2 = "f2";
 	}
 
-	@Pojo(transform=A4Transform.class)
+	@Pojo(transform=A4Swap.class)
 	public static class A4 {
 		public String f2 = "f2";
 	}
 
-	public static class A4Transform extends PojoTransform<A4,A1> {
-		@Override /* PojoTransform */
-		public A1 transform(A4 o) throws SerializeException {
+	public static class A4Swap extends PojoSwap<A4,A1> {
+		@Override /* PojoSwap */
+		public A1 swap(A4 o) throws SerializeException {
 			return new A1();
 		}
 	}
 
-	@Pojo(transform=A5Transform.class)
+	@Pojo(transform=A5Swap.class)
 	public static class A5 {
 		public String f2 = "f2";
 	}
 
-	public static class A5Transform extends PojoTransform<A5,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(A5 o) {
+	public static class A5Swap extends PojoSwap<A5,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(A5 o) {
 			return new ObjectMap().append("f1", "f1");
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java b/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
index f185979..24c9479 100755
--- a/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
@@ -106,7 +106,7 @@ public class RdfParserTest {
 		public String f2;
 		@BeanProperty(beanUri=true) public URI f3;
 		public URI f4a, f4b;
-		@BeanProperty(transform=CalendarTransform.ISO8601DTZ.class) public Calendar f5;
+		@BeanProperty(transform=CalendarSwap.ISO8601DTZ.class) public Calendar f5;
 		public LinkedList<A1> f6 = new LinkedList<A1>();
 
 		public A init() throws Exception {
@@ -131,7 +131,7 @@ public class RdfParserTest {
 		public String f2;
 		@BeanProperty(beanUri=true) public URI f3;
 		public URI f4a, f4b;
-		@BeanProperty(transform=CalendarTransform.ISO8601DTZ.class) public Calendar f5;
+		@BeanProperty(transform=CalendarSwap.ISO8601DTZ.class) public Calendar f5;
 
 		public A1 init() throws Exception {
 			f1 = 1;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
new file mode 100755
index 0000000..ec2da25
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
@@ -0,0 +1,205 @@
+/***************************************************************************************************************************
+ * 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.transforms;
+
+import static org.apache.juneau.TestUtils.*;
+import static org.junit.Assert.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class BeanFilterTest {
+
+	//====================================================================================================
+	// Transformed interfaces
+	//====================================================================================================
+	@Test
+	public void testTransformedInterfaces() throws Exception {
+		BeanContext bc;
+		BeanMap<A3> bm;
+
+		bc = ContextFactory.create().addTransforms(A1.class).getBeanContext();
+		bm = bc.newBeanMap(A3.class);
+		assertEquals("f1", bm.get("f1"));
+		assertNull(bm.get("f2"));
+		assertNull(bm.get("f3"));
+
+		bc = ContextFactory.create().addTransforms(A2.class).getBeanContext();
+		bm = bc.newBeanMap(A3.class);
+		assertEquals("f1", bm.get("f1"));
+		assertEquals("f2", bm.get("f2"));
+		assertNull(bm.get("f3"));
+	}
+
+	public static interface A1 {
+		public String getF1();
+	}
+
+	public static interface A2 extends A1 {
+		public String getF2();
+	}
+
+	public static class A3 implements A2 {
+		@Override /* A1 */
+		public String getF1() {
+			return "f1";
+		}
+		@Override /* A2 */
+		public String getF2() {
+			return "f2";
+		}
+		public String getF3() {
+			return "f3";
+		}
+	}
+
+	//====================================================================================================
+	// Transformed abstract classes
+	//====================================================================================================
+	@Test
+	public void testTransformedAbstractClasses() throws Exception {
+		BeanContext bc;
+		BeanMap<Test2> bm;
+
+		bc = ContextFactory.create().addTransforms(B1.class).getBeanContext();
+		bm = bc.newBeanMap(Test2.class);
+		assertEquals("f1", bm.get("f1"));
+		assertNull(bm.get("f2"));
+		assertNull(bm.get("f3"));
+
+		bc = ContextFactory.create().addTransforms(B2.class).getBeanContext();
+		bm = bc.newBeanMap(Test2.class);
+		assertEquals("f1", bm.get("f1"));
+		assertEquals("f2", bm.get("f2"));
+		assertNull(bm.get("f3"));
+	}
+
+	public abstract static class B1 {
+		public abstract String getF1();
+	}
+
+	public abstract static class B2 extends B1 {
+		@Override /* B1 */
+		public abstract String getF1();
+		public abstract String getF2();
+	}
+
+	public static class Test2 extends B2 {
+		@Override /* B1 */
+		public String getF1() {
+			return "f1";
+		}
+		@Override /* B2 */
+		public String getF2() {
+			return "f2";
+		}
+		public String getF3() {
+			return "f3";
+		}
+	}
+
+	//====================================================================================================
+	// Transformed with stop classes
+	//====================================================================================================
+	@Test
+	public void testTransformedWithStopClass() throws Exception {
+		C3 c3 = new C3();
+		assertObjectEquals("{f3:3,p3:3}", c3);
+	}
+
+	public class C1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	public class C2 extends C1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(stopClass=C2.class)
+	public class C3 extends C2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassOnParentClass() throws Exception {
+		D3 d3 = new D3();
+		assertObjectEquals("{f3:3,p3:3}", d3);
+	}
+
+	public class D1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	@Bean(stopClass=D2.class)
+	public class D2 extends D1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	public class D3 extends D2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassOnParentClassWithOverriddenAnnotation() throws Exception {
+		E3 e3 = new E3();
+		assertObjectEquals("{f3:3,p3:3}", e3);
+	}
+
+	public class E1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	@Bean(stopClass=E2.class)
+	public class E2 extends E1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(excludeProperties={"foo"})
+	public class E3 extends E2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassesAtMulitpleLevels() throws Exception {
+		F3 e3 = new F3();
+		assertObjectEquals("{f3:3,p3:3}", e3);
+	}
+
+	@Bean(stopClass=F1.class)
+	public class F1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	public class F2 extends F1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(stopClass=F2.class)
+	public class F3 extends F2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
index edda28e..e3f5942 100755
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
@@ -26,7 +26,7 @@ public class BeanMapTest {
 	//====================================================================================================
 	@Test
 	public void testFilteredEntry() throws Exception {
-		BeanContext bc = ContextFactory.create().addTransforms(ByteArrayBase64Transform.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(ByteArrayBase64Swap.class).getBeanContext();
 		BeanMap<A> m = bc.forBean(new A());
 
 		assertEquals("AQID", m.get("f1"));
@@ -81,16 +81,16 @@ public class BeanMapTest {
 		public String f2;
 	}
 
-	public static class B1Filter extends PojoTransform<B1,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(B1 b1) {
+	public static class B1Filter extends PojoSwap<B1,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(B1 b1) {
 			return new ObjectMap().append("type", "b1").append("f1", b1.f1);
 		}
 	}
 
-	public static class B2Filter extends PojoTransform<B2,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(B2 b2) {
+	public static class B2Filter extends PojoSwap<B2,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(B2 b2) {
 			return new ObjectMap().append("type", "b2").append("f1", b2.f1);
 		}
 	}


Mime
View raw message