You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2016/07/26 16:11:29 UTC

svn commit: r1754151 [2/3] - in /velocity/engine/trunk: src/changes/ velocity-engine-core/src/main/java/org/apache/velocity/app/ velocity-engine-core/src/main/java/org/apache/velocity/runtime/ velocity-engine-core/src/main/java/org/apache/velocity/runt...

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java Tue Jul 26 16:11:28 2016
@@ -62,22 +62,26 @@ public abstract class BaseTestCase exten
         }
     }
 
-    protected void setUp() throws Exception
+    protected VelocityEngine createEngine()
     {
-        engine = new VelocityEngine();
-
-        //by default, make the engine's log output go to the test-report
-        log = new TestLogger(false, false);
-        engine.setProperty(RuntimeConstants.RUNTIME_LOG_INSTANCE, log);
+        VelocityEngine ret = new VelocityEngine();
+        ret.setProperty(RuntimeConstants.RUNTIME_LOG_INSTANCE, log);
 
         // use string resource loader by default, instead of file
-        engine.setProperty(RuntimeConstants.RESOURCE_LOADER, "file,string");
-        engine.addProperty("string.resource.loader.class", StringResourceLoader.class.getName());
-        engine.addProperty("string.resource.loader.repository.name", stringRepoName);
-        engine.addProperty("string.resource.loader.repository.static", "false");
+        ret.setProperty(RuntimeConstants.RESOURCE_LOADER, "file,string");
+        ret.addProperty("string.resource.loader.class", StringResourceLoader.class.getName());
+        ret.addProperty("string.resource.loader.repository.name", stringRepoName);
+        ret.addProperty("string.resource.loader.repository.static", "false");
 
-        setUpEngine(engine);
+        setUpEngine(ret);
+        return ret;
+    }
 
+    protected void setUp() throws Exception
+    {
+        //by default, make the engine's log output go to the test-report
+        log = new TestLogger(false, false);
+        engine = createEngine();
         context = new VelocityContext();
         setUpContext(context);
     }

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ClassloaderChangeTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ClassloaderChangeTestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ClassloaderChangeTestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ClassloaderChangeTestCase.java Tue Jul 26 16:11:28 2016
@@ -26,7 +26,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.test.misc.TestLogger;
-import org.apache.velocity.util.introspection.IntrospectorCacheImpl;
+import org.apache.velocity.util.introspection.IntrospectorCache;
 
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -126,7 +126,7 @@ public class ClassloaderChangeTestCase e
             fail("Output from doIt() incorrect");
         }
 
-        if (!logger.getLog().contains(IntrospectorCacheImpl.CACHEDUMP_MSG))
+        if (!logger.getLog().contains(IntrospectorCache.CACHEDUMP_MSG))
         {
             fail("Didn't see introspector cache dump.");
         }

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java Tue Jul 26 16:11:28 2016
@@ -24,6 +24,7 @@ import junit.framework.TestSuite;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.runtime.RuntimeSingleton;
 import org.apache.velocity.test.misc.TestLogger;
+import org.apache.velocity.util.introspection.Introspector;
 
 import java.lang.reflect.Method;
 
@@ -70,7 +71,9 @@ public class Introspector2TestCase exten
 
         Object[] params = { new Foo(), new Foo() };
 
-        method = RuntimeSingleton.getIntrospector()
+        Introspector introspector = new Introspector(log);
+
+        method = introspector
             .getMethod( Tester.class, "find", params );
 
         if ( method == null)
@@ -87,7 +90,7 @@ public class Introspector2TestCase exten
          *  now test for failure due to ambiguity
          */
 
-        method = RuntimeSingleton.getIntrospector()
+        method = introspector
             .getMethod( Tester2.class, "find", params );
 
         if ( method != null)

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java Tue Jul 26 16:11:28 2016
@@ -22,6 +22,7 @@ package org.apache.velocity.test;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.velocity.runtime.RuntimeSingleton;
+import org.apache.velocity.util.introspection.Introspector;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -66,19 +67,20 @@ public class Introspector3TestCase exten
         Object[] longInt = {  new Long(1), new Integer(2) };
         Object[] longLong = {  new Long(1), new Long(2) };
 
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        Introspector introspector = new Introspector(log);
+        method = introspector.getMethod(
             MethodProvider.class, "lii", listIntInt);
         result = (String) method.invoke(mp, listIntInt);
 
         assertTrue(result.equals("lii"));
 
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        method = introspector.getMethod(
             MethodProvider.class, "ii", intInt);
         result = (String) method.invoke(mp, intInt);
 
         assertTrue(result.equals("ii"));
 
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        method = introspector.getMethod(
             MethodProvider.class, "ll", longInt);
         result = (String) method.invoke(mp, longInt);
 
@@ -88,13 +90,13 @@ public class Introspector3TestCase exten
          * test overloading with primitives
          */
 
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        method = introspector.getMethod(
             MethodProvider.class, "ll", longLong);
         result = (String) method.invoke(mp, longLong);
 
         assertTrue(result.equals("ll"));
 
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        method = introspector.getMethod(
             MethodProvider.class, "lll", listLongList);
         result = (String) method.invoke(mp, listLongList);
 
@@ -105,7 +107,7 @@ public class Introspector3TestCase exten
          */
 
         Object [] oa = {null, new Integer(0)};
-        method = RuntimeSingleton.getIntrospector().getMethod(
+        method = introspector.getMethod(
             MethodProvider.class, "lll", oa );
         result = (String) method.invoke(mp, oa);
 

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java Tue Jul 26 16:11:28 2016
@@ -22,6 +22,8 @@ package org.apache.velocity.test;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.velocity.runtime.RuntimeSingleton;
+import org.apache.velocity.test.misc.TestLogger;
+import org.apache.velocity.util.introspection.Introspector;
 
 import java.lang.reflect.Method;
 
@@ -41,9 +43,13 @@ public class IntrospectorTestCase extend
 {
     private static MethodProvider mp;
 
+    private Introspector introspector;
+    
     public void setUp()
     {
         mp = new MethodProvider();
+        log = new TestLogger();
+        introspector = new Introspector(log);
     }
 
     /**
@@ -71,8 +77,8 @@ public class IntrospectorTestCase extend
         // Test boolean primitive.
         Object[] booleanParams = { new Boolean(true) };
         String type = "boolean";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", booleanParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", booleanParams);
         String result = (String) method.invoke(mp, booleanParams);
 
         assertEquals("Method could not be found", type, result);
@@ -84,8 +90,8 @@ public class IntrospectorTestCase extend
         // Test byte primitive.
         Object[] byteParams = { new Byte("1") };
         String type = "byte";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", byteParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", byteParams);
         String result = (String) method.invoke(mp, byteParams);
 
         assertEquals("Method could not be found", type, result);
@@ -97,8 +103,8 @@ public class IntrospectorTestCase extend
         // Test char primitive.
         Object[] characterParams = { new Character('a') };
         String type = "character";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", characterParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", characterParams);
         String result = (String) method.invoke(mp, characterParams);
 
         assertEquals("Method could not be found", type, result);
@@ -111,8 +117,8 @@ public class IntrospectorTestCase extend
         // Test double primitive.
         Object[] doubleParams = { new Double((double)1) };
         String type = "double";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", doubleParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", doubleParams);
         String result = (String) method.invoke(mp, doubleParams);
 
         assertEquals("Method could not be found", type, result);
@@ -125,8 +131,8 @@ public class IntrospectorTestCase extend
         // Test float primitive.
         Object[] floatParams = { new Float((float)1) };
         String type = "float";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", floatParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", floatParams);
         String result = (String) method.invoke(mp, floatParams);
 
         assertEquals("Method could not be found", type, result);
@@ -139,8 +145,8 @@ public class IntrospectorTestCase extend
         // Test integer primitive.
         Object[] integerParams = { new Integer((int)1) };
         String type = "integer";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", integerParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", integerParams);
         String result = (String) method.invoke(mp, integerParams);
 
         assertEquals("Method could not be found", type, result);
@@ -153,8 +159,8 @@ public class IntrospectorTestCase extend
         // Test long primitive.
         Object[] longParams = { new Long((long)1) };
         String type = "long";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", longParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", longParams);
         String result = (String) method.invoke(mp, longParams);
 
         assertEquals("Method could not be found", type, result);
@@ -166,8 +172,8 @@ public class IntrospectorTestCase extend
         // Test short primitive.
         Object[] shortParams = { new Short((short)1) };
         String type = "short";
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, type + "Method", shortParams);
+        Method method = introspector.getMethod(
+                MethodProvider.class, type + "Method", shortParams);
         String result = (String) method.invoke(mp, shortParams);
 
         assertEquals("Method could not be found", type, result);
@@ -180,8 +186,8 @@ public class IntrospectorTestCase extend
 
         Object[] params = {};
 
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, "untouchable", params);
+        Method method = introspector.getMethod(
+                MethodProvider.class, "untouchable", params);
 
         assertNull("able to access a private-access method.", method);
     }
@@ -192,8 +198,8 @@ public class IntrospectorTestCase extend
         // Test really untouchable
         Object[] params = {};
 
-        Method method = RuntimeSingleton.getIntrospector().getMethod(
-            MethodProvider.class, "reallyuntouchable", params);
+        Method method = introspector.getMethod(
+                MethodProvider.class, "reallyuntouchable", params);
 
         assertNull("able to access a private-access method.", method);
     }

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java Tue Jul 26 16:11:28 2016
@@ -19,10 +19,13 @@ package org.apache.velocity.test;
  * under the License.    
  */
 
+import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.exception.MethodInvocationException;
 import org.apache.velocity.exception.ParseErrorException;
 import org.apache.velocity.exception.VelocityException;
 import org.apache.velocity.runtime.RuntimeConstants;
+import org.apache.velocity.runtime.resource.loader.StringResourceLoader;
+import org.apache.velocity.test.misc.TestLogger;
 
 /**
  * Test strict reference mode turned on by the velocity property
@@ -35,10 +38,21 @@ public class StrictReferenceTestCase ext
         super(name);
     }
 
+    // second engine to test WITH conversions
+    VelocityEngine engine2;
+
     public void setUp() throws Exception
     {
         super.setUp();
+
+        /* first engine without conversions */
         engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE);
+        engine.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, "none");
+
+        /* second engine with conversions */
+        engine2 = createEngine();
+        engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE);
+
         context.put("NULL", null);
         context.put("bar", null);
         context.put("TRUE", Boolean.TRUE);

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java?rev=1754151&r1=1754150&r2=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java Tue Jul 26 16:11:28 2016
@@ -80,9 +80,9 @@ public class VelTools66TestCase
     {
         Method verifyMethod = TestInterface.class.getMethod("getTestValue", new Class[0]);
 
-
         RuntimeInstance ri = new RuntimeInstance();
-        Introspector introspector = ri.getIntrospector();
+        log = new TestLogger();
+        Introspector introspector = new Introspector(log);
 
         Method testMethod = introspector.getMethod(TestObject.class, "getTestValue", new Object[0]);
         assertNotNull(testMethod);

Copied: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java (from r1753736, velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java)
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java?p2=velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java&p1=velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java&r1=1753736&r2=1754151&rev=1754151&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java (original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java Tue Jul 26 16:11:28 2016
@@ -16,31 +16,44 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.velocity.test;
+package org.apache.velocity.test.util.introspection;
 
 import junit.framework.TestSuite;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.app.event.MethodExceptionEventHandler;
 import org.apache.velocity.runtime.RuntimeConstants;
+import org.apache.velocity.runtime.RuntimeInstance;
+import org.apache.velocity.test.BaseTestCase;
 import org.apache.velocity.test.misc.TestLogger;
+import org.apache.velocity.util.introspection.ConversionHandler;
+import org.apache.velocity.util.introspection.ConversionHandlerImpl;
+import org.apache.velocity.util.introspection.Converter;
+import org.apache.velocity.util.introspection.Info;
+import org.apache.velocity.util.introspection.IntrospectionUtils;
+import org.apache.velocity.util.introspection.Uberspect;
+import org.apache.velocity.util.introspection.UberspectImpl;
 
 import java.io.BufferedWriter;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
+import java.io.StringWriter;
 import java.io.Writer;
+import java.util.Map;
+import java.util.TreeMap;
 
 /**
- * Test case for including macro libraries via the #parse method.
+ * Test case for conversion handler
  */
-public class ParseWithMacroLibsTestCase extends BaseTestCase
+public class ConversionHandlerTestCase extends BaseTestCase
 {
-    private static final String RESULT_DIR = TEST_RESULT_DIR + "/parsemacros";
+    private static final String RESULT_DIR = TEST_RESULT_DIR + "/conversion";
 
-    private static final String COMPARE_DIR = TEST_COMPARE_DIR + "/parsemacros/compare";
+    private static final String COMPARE_DIR = TEST_COMPARE_DIR + "/conversion/compare";
 
-    public ParseWithMacroLibsTestCase(String name)
+    public ConversionHandlerTestCase(String name)
     {
         super(name);
     }
@@ -57,83 +70,74 @@ public class ParseWithMacroLibsTestCase
      */
     public static junit.framework.Test suite()
     {
-        return new TestSuite(ParseWithMacroLibsTestCase.class);
+        return new TestSuite(ConversionHandlerTestCase.class);
     }
     
-    public void testParseMacroLocalCacheOn()
+    public void testConversionsWithoutHandler()
     throws Exception
     {
         /*
          *  local scope, cache on
          */
-        VelocityEngine ve = createEngine(true, true);
+        VelocityEngine ve = createEngine(false);
 
-        // render twice to make sure there is no difference with cached templates
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false);
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false);
-        
-        // run again with different macro library
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false);
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false);
+        testConversions(ve, "test_conv.vtl", "test_conv_without_handler");
     }
 
-    /**
-     * Runs the tests with global namespace.
-     */
-    public void testParseMacroLocalCacheOff()
-    throws Exception
+    public void testConversionsWithHandler()
+            throws Exception
     {
         /*
-         *  local scope, cache off
+         *  local scope, cache on
          */
-        VelocityEngine ve = createEngine(false, true);
-
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_2", true);
+        VelocityEngine ve = createEngine(true);
 
-        // run again with different macro library
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_2b", true);
+        testConversions(ve, "test_conv.vtl", "test_conv_with_handler");
     }
 
-    public void testParseMacroGlobalCacheOn()
-    throws Exception
+    public void testConversionMatrix()
+            throws Exception
     {
-        /*
-         *  global scope, cache on
-         */
-        VelocityEngine ve = createEngine(true, false);
-
-        // render twice to make sure there is no difference with cached templates
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_3", false);
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_3", false);
-
-        // run again with different macro library
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false);
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false);
+        VelocityEngine ve = createEngine(true);
+        testConversions(ve, "matrix.vhtml", "matrix");
     }
-    
-    public void testParseMacroGlobalCacheOff()
-    throws Exception
-    {
-        /*
-         *  global scope, cache off
-         */
-        VelocityEngine ve = createEngine(false, false);
-
-        testParseMacro(ve, "vm_library1.vm", "parseMacro1_4", true);
-        
-        // run again with different macro library
-        testParseMacro(ve, "vm_library2.vm", "parseMacro1_4b", true);
 
+    public void testCustomConverter()
+    {
+        RuntimeInstance ve = new RuntimeInstance();
+        ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
+        ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log);
+        ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file");
+        ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/conversion");
+        ve.init();
+        Uberspect uberspect = ve.getUberspect();
+        assertTrue(uberspect instanceof UberspectImpl);
+        UberspectImpl ui = (UberspectImpl)uberspect;
+        ConversionHandler ch = ui.getConversionHandler();
+        assertTrue(ch != null);
+        ch.addConverter(Float.class, Obj.class, new Converter<Float>()
+        {
+            @Override
+            public Float convert(Object o)
+            {
+                return 4.5f;
+            }
+        });
+        VelocityContext context = new VelocityContext();
+        context.put("obj", new Obj());
+        Writer writer = new StringWriter();
+        ve.evaluate(context, writer, "test", "$obj.integralFloat($obj) / $obj.objectFloat($obj)");
+        assertEquals("float ok: 4.5 / Float ok: 4.5", writer.toString());
     }
-    
+
     /**
-     * Test #parse with macros.  Can be used to test different engine configurations
+     * Test conversions
      * @param ve
+     * @param templateFile template
      * @param outputBaseFileName
-     * @param testCachingOff
      * @throws Exception
      */
-    private void testParseMacro(VelocityEngine ve, String includeFile, String outputBaseFileName, boolean testCachingOff)
+    private void testConversions(VelocityEngine ve, String templateFile, String outputBaseFileName)
             throws Exception
     {
         assureResultsDirectoryExists(RESULT_DIR);
@@ -141,12 +145,11 @@ public class ParseWithMacroLibsTestCase
         FileOutputStream fos = new FileOutputStream (getFileName(
                 RESULT_DIR, outputBaseFileName, RESULT_FILE_EXT));
 
-        VelocityContext context = new VelocityContext();
-        context.put("includefile", includeFile);
+        VelocityContext context = createContext();
 
         Writer writer = new BufferedWriter(new OutputStreamWriter(fos));
 
-        Template template = ve.getTemplate("parseMacro1.vm");
+        Template template = ve.getTemplate(templateFile);
         template.merge(context, writer);
 
         /**
@@ -168,140 +171,143 @@ public class ParseWithMacroLibsTestCase
             
             fail(msg);
         }
-
-        /*
-         * Show that caching is turned off
-         */
-        if (testCachingOff)
-        {
-            Template t1 = ve.getTemplate("parseMacro1.vm");
-            Template t2 = ve.getTemplate("parseMacro1.vm");
-
-            assertNotSame("Different objects", t1, t2);
-        }
     }
 
     /**
      * Return and initialize engine
      * @return
      */
-    private VelocityEngine createEngine(boolean cache, boolean local)
+    private VelocityEngine createEngine(boolean withConversionsHandler)
     throws Exception
     {
         VelocityEngine ve = new VelocityEngine();
         ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
-        ve.setProperty("velocimacro.permissions.allow.inline.to.replace.global",
-                new Boolean(local));
-        ve.setProperty("file.resource.loader.cache", new Boolean(cache));
-        ve.setProperty(
-                Velocity.RUNTIME_LOG_INSTANCE, new TestLogger());
+        ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log);
         ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file");
-        ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
-                TEST_COMPARE_DIR + "/parsemacros");
+        ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/conversion");
+        if (withConversionsHandler)
+        {
+            ve.setProperty(RuntimeConstants.EVENTHANDLER_METHODEXCEPTION, PrintException.class.getName());
+        }
+        else
+        {
+            ve.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, "none");
+        }
         ve.init();
         
         return ve;
     }
-    
-    
-    /**
-     * Test whether the literal text is given if a definition cannot be
-     * found for a macro.
-     *
-     * @throws Exception
-     */
-    public void testParseMacrosWithNoDefinition()
-            throws Exception
-    {
-        /*
-         *  ve1: local scope, cache on
-         */
-        VelocityEngine ve1 = new VelocityEngine();
-        
-        ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
-        ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global",
-                Boolean.FALSE);
-        ve1.setProperty("file.resource.loader.cache", Boolean.TRUE);
-        ve1.setProperty(
-                Velocity.RUNTIME_LOG_INSTANCE, new TestLogger());
-        ve1.setProperty(RuntimeConstants.RESOURCE_LOADER, "file");
-        ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
-                TEST_COMPARE_DIR + "/parsemacros");
-        ve1.init();
-        
-        assureResultsDirectoryExists(RESULT_DIR);
-
-        FileOutputStream fos = new FileOutputStream (getFileName(
-                RESULT_DIR, "parseMacro2", RESULT_FILE_EXT));
-
-        VelocityContext context = new VelocityContext();
-
-        Writer writer = new BufferedWriter(new OutputStreamWriter(fos));
 
-        Template template = ve1.getTemplate("parseMacro2.vm");
-        template.merge(context, writer);
-
-        /**
-         * Write to the file
-         */
-        writer.flush();
-        writer.close();
-
-        if (!isMatch(RESULT_DIR, COMPARE_DIR, "parseMacro2",
-                RESULT_FILE_EXT,CMP_FILE_EXT))
+    public static class PrintException implements MethodExceptionEventHandler
+    {
+        public Object methodException(Class claz,
+                                      String method,
+                                      Exception e,
+                                      Info info)
         {
-            fail("Processed template did not match expected output");
+            return method + " -> " + e.getClass().getSimpleName() + ": " + e.getMessage();
         }
     }
 
-
-    /**
-     * Test that if a macro is duplicated, the second one takes precendence
-     *
-     * @throws Exception
-     */
-    public void testDuplicateDefinitions()
-            throws Exception
+    private VelocityContext createContext()
     {
-        /*
-         *  ve1: local scope, cache on
-         */
-        VelocityEngine ve1 = new VelocityEngine();
-        
-        ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
-        ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global",
-                Boolean.FALSE);
-        ve1.setProperty("file.resource.loader.cache", Boolean.TRUE);
-        ve1.setProperty(
-                Velocity.RUNTIME_LOG_INSTANCE, new TestLogger());
-        ve1.setProperty(RuntimeConstants.RESOURCE_LOADER, "file");
-        ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
-                TEST_COMPARE_DIR + "/parsemacros");
-        ve1.init();
-        
-        assureResultsDirectoryExists(RESULT_DIR);
-
-        FileOutputStream fos = new FileOutputStream (getFileName(
-                RESULT_DIR, "parseMacro3", RESULT_FILE_EXT));
-
         VelocityContext context = new VelocityContext();
+        Map<String, Object> map = new TreeMap<String, Object>();
+        map.put("A. bool-true", true);
+        map.put("B. bool-false", false);
+        map.put("C. byte-0", (byte)0);
+        map.put("D. byte-1", (byte)1);
+        map.put("E. short", (short)125);
+        map.put("F. int", 24323);
+        map.put("G. long", 5235235L);
+        map.put("H. float", 34523.345f);
+        map.put("I. double", 54235.3253d);
+        map.put("J. char", '@');
+        map.put("K. object", new Obj());
+        map.put("L. enum", Obj.Color.GREEN);
+        map.put("M. string", new String("foo"));
+        map.put("M. string-green", new String("green"));
+        map.put("N. string-empty", new String());
+        map.put("O. string-false", new String("false"));
+        map.put("P. string-true", new String("true"));
+        map.put("Q. string-zero", new String("0"));
+        map.put("R. string-integral", new String("123"));
+        map.put("S. string-big-integral", new String("12345678"));
+        map.put("T. string-floating", new String("123.345"));
+        map.put("U. null", null);
+        context.put("map", map);
+        context.put("target", new Obj());
+        Class[] types =
+                {
+                        Boolean.TYPE,
+                        Character.TYPE,
+                        Byte.TYPE,
+                        Short.TYPE,
+                        Integer.TYPE,
+                        Long.TYPE,
+                        Float.TYPE,
+                        Double.TYPE,
+                        Boolean.class,
+                        Character.class,
+                        Byte.class,
+                        Short.class,
+                        Integer.class,
+                        Long.class,
+                        Float.class,
+                        Double.class,
+                        Object.class
+                };
+        context.put("types", types);
+        context.put("introspect", new Introspect());
+        return context;
+    }
+
+    public static class Obj
+    {
+        public enum Color { RED, GREEN };
+
+        public String integralBoolean(boolean b) { return "boolean ok: " + b; }
+        public String integralByte(byte b) { return "byte ok: " + b; }
+        public String integralShort(short s) { return "short ok: " + s; }
+        public String integralInt(int i) { return "int ok: " + i; }
+        public String integralLong(long l) { return "long ok: " + l; }
+        public String integralFloat(float f) { return "float ok: " + f; }
+        public String integralDouble(double d) { return "double ok: " + d; }
+        public String integralChar(char c) { return "char ok: " + c; }
+        public String objectBoolean(Boolean b) { return "Boolean ok: " + b; }
+        public String objectByte(Byte b) { return "Byte ok: " + b; }
+        public String objectShort(Short s) { return "Short ok: " + s; }
+        public String objectInt(Integer i) { return "Integer ok: " + i; }
+        public String objectLong(Long l) { return "Long ok: " + l; }
+        public String objectFloat(Float f) { return "Float ok: " + f; }
+        public String objectDouble(Double d) { return "Double ok: " + d; }
+        public String objectCharacter(Character c) { return "Character ok: " + c; }
+        public String objectNumber(Number b) { return "Number ok: " + b; }
+        public String objectObject(Object o) { return "Object ok: " + o; }
+        public String objectString(String s) { return "String ok: " + s; }
+        public String objectEnum(Color c) { return "Enum ok: " + c; }
 
-        Writer writer = new BufferedWriter(new OutputStreamWriter(fos));
-
-        Template template = ve1.getTemplate("parseMacro3.vm");
-        template.merge(context, writer);
-
-        /**
-         * Write to the file
-         */
-        writer.flush();
-        writer.close();
+        public String toString() { return "instance of Obj"; }
+    }
 
-        if (!isMatch(RESULT_DIR, COMPARE_DIR, "parseMacro3",
-                RESULT_FILE_EXT,CMP_FILE_EXT))
+    public static class Introspect
+    {
+        private ConversionHandler handler;
+        public Introspect()
+        {
+            handler = new ConversionHandlerImpl();
+        }
+        public boolean isStrictlyConvertible(Class expected, Class provided)
+        {
+            return IntrospectionUtils.isStrictMethodInvocationConvertible(expected, provided, false);
+        }
+        public boolean isImplicitlyConvertible(Class expected, Class provided)
         {
-            fail("Processed template did not match expected output");
+            return IntrospectionUtils.isMethodInvocationConvertible(expected, provided, false);
+        }
+        public boolean isExplicitlyConvertible(Class expected, Class provided)
+        {
+            return handler.isExplicitlyConvertible(expected, provided, false);
         }
     }
-
 }

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp?rev=1754151&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp Tue Jul 26 16:11:28 2016
@@ -0,0 +1,1600 @@
+<html>
+  <head>
+    <style type="text/css">
+    table
+    {
+        border: solid 1px black;
+        border-collapse: collapse;
+    }
+	td, th
+    {
+        border: solid 1px black;
+    }
+
+    </style>
+  </head>
+  <body>
+    <table>
+      <thead>
+        <tr>
+          <th>
+            strict<br/>
+            implicit<br/>
+            explicit
+          </th>
+          <th>boolean</th>
+          <th>char</th>
+          <th>byte</th>
+          <th>short</th>
+          <th>int</th>
+          <th>long</th>
+          <th>float</th>
+          <th>double</th>
+          <th>class java.lang.Boolean</th>
+          <th>class java.lang.Character</th>
+          <th>class java.lang.Byte</th>
+          <th>class java.lang.Short</th>
+          <th>class java.lang.Integer</th>
+          <th>class java.lang.Long</th>
+          <th>class java.lang.Float</th>
+          <th>class java.lang.Double</th>
+          <th>class java.lang.Object</th>
+          <th>null</th>
+        </tr>
+        <tr>
+          <th>formal: boolean</th>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: char</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: byte</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: short</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: int</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: long</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: float</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: double</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>&nbsp;</td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Boolean</th>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Character</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Byte</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Short</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Integer</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Long</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Float</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            true
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Double</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+        <tr>
+          <th>formal: class java.lang.Object</th>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            false<br/>
+            false<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+            <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+              <td>
+            true<br/>
+            true<br/>
+            false
+          </td>
+          </tr>
+      </thead>
+      <tbody>
+      </tbody>
+    </table>
+  </body>
+</html>
+
+