test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.file: flatworm-core/src/test/java/com/blackbear/flatworm/converters/ConverterFunctionCacheTest.java
test_class.identifier: ConverterFunctionCacheTest
test_case.body: @Test
      public void testToTypeFunction() {
          String value = "123.45D";
          Object result;
  
          try {
              // String value.
              result = convertFromString(String.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", String.class, result.getClass());
  
              // Double value.
              result = convertFromString(Double.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", Double.class, result.getClass());
  
              // BigDecimal value.
              result = convertFromString(BigDecimal.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", BigDecimal.class, result.getClass());
  
              // Float value.
              result = convertFromString(Float.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", Float.class, result.getClass());
  
              // Long value.
              value = "12345";
              result = convertFromString(Long.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", Long.class, result.getClass());
  
              // Integer value.
              value = "12345";
              result = convertFromString(Integer.class, value, Collections.emptyMap());
              assertEquals("Wrong return converterName", Integer.class, result.getClass());
  
              // Date value.
              value = "06/16/2016";
              Map<String, ConversionOptionBO> options = new HashMap<>(1);
              options.put("format", new ConversionOptionBO("format", "MM/dd/yyyy"));
              result = convertFromString(Date.class, value, options);
              assertEquals("Wrong return converterName", Date.class, result.getClass());
          } catch (Exception e) {
              e.printStackTrace();
              fail("Failed to convert: " + value + ": " + e.getMessage());
          }
      }
test_case.class_method_signature: ConverterFunctionCacheTest.testToTypeFunction()
test_case.full_signature: @Test public void testToTypeFunction()
test_case.identifier: testToTypeFunction
test_case.invocations: convertFromString emptyMap assertEquals getClass convertFromString emptyMap assertEquals getClass convertFromString emptyMap assertEquals getClass convertFromString emptyMap assertEquals getClass convertFromString emptyMap assertEquals getClass convertFromString emptyMap assertEquals getClass put convertFromString assertEquals getClass printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToTypeFunction()
focal_class.declarator: toTypeConverterFunctionCache = new HashMap<>()
focal_class.modifier: private static
focal_class.original_string: private static Map<String, ToTypeConverterFunction> toTypeConverterFunctionCache = new HashMap<>();
focal_class.type: Map<String, ToTypeConverterFunction>
focal_class.var_name: toTypeConverterFunctionCache
focal_class.declarator: fromTypeConverterFunctionCache = new HashMap<>()
focal_class.modifier: private static
focal_class.original_string: private static Map<String, FromTypeConverterFunction> fromTypeConverterFunctionCache = new HashMap<>();
focal_class.type: Map<String, FromTypeConverterFunction>
focal_class.var_name: fromTypeConverterFunctionCache
focal_class.declarator: coreConverters = new CoreConverters()
focal_class.modifier: private static
focal_class.original_string: private static CoreConverters coreConverters = new CoreConverters();
focal_class.type: CoreConverters
focal_class.var_name: coreConverters
focal_class.file: flatworm-core/src/main/java/com/blackbear/flatworm/converters/ConverterFunctionCache.java
focal_class.identifier: ConverterFunctionCache
focal_class.class_method_signature: ConverterFunctionCache.ConverterFunctionCache()
focal_class.full_signature: private  ConverterFunctionCache()
focal_class.identifier: ConverterFunctionCache
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ConverterFunctionCache()
focal_class.class_method_signature: ConverterFunctionCache.convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_class.full_signature: public static Object convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_class.identifier: convertFromString
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_class.return: Object
focal_class.signature: Object convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_class.class_method_signature: ConverterFunctionCache.convertToString(Object value, Map<String, ConversionOptionBO> options)
focal_class.full_signature: public static String convertToString(Object value, Map<String, ConversionOptionBO> options)
focal_class.identifier: convertToString
focal_class.modifiers: public static
focal_class.parameters: (Object value, Map<String, ConversionOptionBO> options)
focal_class.return: String
focal_class.signature: String convertToString(Object value, Map<String, ConversionOptionBO> options)
focal_class.class_method_signature: ConverterFunctionCache.registerToTypeConverterFunction(Class<?> clazz, ToTypeConverterFunction function)
focal_class.full_signature: public static void registerToTypeConverterFunction(Class<?> clazz, ToTypeConverterFunction function)
focal_class.identifier: registerToTypeConverterFunction
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, ToTypeConverterFunction function)
focal_class.return: void
focal_class.signature: void registerToTypeConverterFunction(Class<?> clazz, ToTypeConverterFunction function)
focal_class.class_method_signature: ConverterFunctionCache.removeToTypeConverterFunction(Class<?> clazz)
focal_class.full_signature: public static ToTypeConverterFunction removeToTypeConverterFunction(Class<?> clazz)
focal_class.identifier: removeToTypeConverterFunction
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: ToTypeConverterFunction
focal_class.signature: ToTypeConverterFunction removeToTypeConverterFunction(Class<?> clazz)
focal_class.class_method_signature: ConverterFunctionCache.registerFromTypeConverterFunction(Class<?> clazz, FromTypeConverterFunction function)
focal_class.full_signature: public static void registerFromTypeConverterFunction(Class<?> clazz, FromTypeConverterFunction function)
focal_class.identifier: registerFromTypeConverterFunction
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, FromTypeConverterFunction function)
focal_class.return: void
focal_class.signature: void registerFromTypeConverterFunction(Class<?> clazz, FromTypeConverterFunction function)
focal_class.class_method_signature: ConverterFunctionCache.removeFromTypeConverterFunction(Class<?> clazz)
focal_class.full_signature: public static FromTypeConverterFunction removeFromTypeConverterFunction(Class<?> clazz)
focal_class.identifier: removeFromTypeConverterFunction
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: FromTypeConverterFunction
focal_class.signature: FromTypeConverterFunction removeFromTypeConverterFunction(Class<?> clazz)
focal_class.class_method_signature: ConverterFunctionCache.findToTypeConverter(Class<?> clazz)
focal_class.full_signature: public static ToTypeConverterFunction findToTypeConverter(Class<?> clazz)
focal_class.identifier: findToTypeConverter
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: ToTypeConverterFunction
focal_class.signature: ToTypeConverterFunction findToTypeConverter(Class<?> clazz)
focal_class.class_method_signature: ConverterFunctionCache.findFromTypeConverter(Class<?> clazz)
focal_class.full_signature: public static FromTypeConverterFunction findFromTypeConverter(Class<?> clazz)
focal_class.identifier: findFromTypeConverter
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: FromTypeConverterFunction
focal_class.signature: FromTypeConverterFunction findFromTypeConverter(Class<?> clazz)
focal_class.class_method_signature: ConverterFunctionCache.findKey(Class<?> clazz, Collection<String> keys)
focal_class.full_signature: private static Optional<String> findKey(Class<?> clazz, Collection<String> keys)
focal_class.identifier: findKey
focal_class.modifiers: private static
focal_class.parameters: (Class<?> clazz, Collection<String> keys)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> findKey(Class<?> clazz, Collection<String> keys)
focal_class.class_method_signature: ConverterFunctionCache.loadClass(String name)
focal_class.full_signature: private static Class<?> loadClass(String name)
focal_class.identifier: loadClass
focal_class.modifiers: private static
focal_class.parameters: (String name)
focal_class.return: Class<?>
focal_class.signature: Class<?> loadClass(String name)
focal_method.body: public static Object convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options) throws Exception {
          Object result = null;
          ToTypeConverterFunction function = findToTypeConverter(clazz);
          if(function != null) {
              result = function.convert(value, options);
          }
          return result;
      }
focal_method.class_method_signature: ConverterFunctionCache.convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_method.full_signature: public static Object convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_method.identifier: convertFromString
focal_method.invocations: findToTypeConverter convert
focal_method.modifiers: public static
focal_method.parameters: (Class<?> clazz, String value, Map<String, ConversionOptionBO> options)
focal_method.return: Object
focal_method.signature: Object convertFromString(Class<?> clazz, String value, Map<String, ConversionOptionBO> options)