test_class.declarator: converter = new StringToNumberConverter()
test_class.original_string: StringToNumberConverter converter = new StringToNumberConverter();
test_class.type: StringToNumberConverter
test_class.var_name: converter
test_class.file: beanmother-core/src/test/java/io/beanmother/core/converter/std/StringToNumberConverterTest.java
test_class.identifier: StringToNumberConverterTest
test_case.body: @Test
      public void testConvert() {
          assertEquals(1, converter.convert("1", TypeToken.of(Integer.class)));
          assertEquals(1.1d, converter.convert("1.1", TypeToken.of(Double.class)));
      }
test_case.class_method_signature: StringToNumberConverterTest.testConvert()
test_case.full_signature: @Test public void testConvert()
test_case.identifier: testConvert
test_case.invocations: assertEquals convert of assertEquals convert of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConvert()
focal_class.file: beanmother-core/src/main/java/io/beanmother/core/converter/std/StringToNumberConverter.java
focal_class.identifier: StringToNumberConverter
focal_class.class_method_signature: StringToNumberConverter.convert(Object source, TypeToken<?> targetTypeToken)
focal_class.full_signature: @Override public Object convert(Object source, TypeToken<?> targetTypeToken)
focal_class.identifier: convert
focal_class.modifiers: @Override public
focal_class.parameters: (Object source, TypeToken<?> targetTypeToken)
focal_class.return: Object
focal_class.signature: Object convert(Object source, TypeToken<?> targetTypeToken)
focal_class.class_method_signature: StringToNumberConverter.canHandle(Object source, TypeToken<?> targetTypeToken)
focal_class.full_signature: @Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken)
focal_class.identifier: canHandle
focal_class.modifiers: @Override public
focal_class.parameters: (Object source, TypeToken<?> targetTypeToken)
focal_class.return: boolean
focal_class.signature: boolean canHandle(Object source, TypeToken<?> targetTypeToken)
focal_class.superclass: extends AbstractConverter
focal_method.body: @Override
      public Object convert(Object source, TypeToken<?> targetTypeToken) {
          if (targetTypeToken.isPrimitive()) {
              targetTypeToken = PrimitiveTypeUtils.toWrapperTypeToken(targetTypeToken);
          }
  
          if (canHandle(source, targetTypeToken)) {
              return NumberUtils.parseNumber((String) source, (Class) targetTypeToken.getType());
          } else {
              throw new ConverterException("can not convert '" + source + "' to " + targetTypeToken.getRawType());
          }
      }
focal_method.class_method_signature: StringToNumberConverter.convert(Object source, TypeToken<?> targetTypeToken)
focal_method.full_signature: @Override public Object convert(Object source, TypeToken<?> targetTypeToken)
focal_method.identifier: convert
focal_method.invocations: isPrimitive toWrapperTypeToken canHandle parseNumber getType getRawType
focal_method.modifiers: @Override public
focal_method.parameters: (Object source, TypeToken<?> targetTypeToken)
focal_method.return: Object
focal_method.signature: Object convert(Object source, TypeToken<?> targetTypeToken)