@Test public void validConversions() throws Exception { for (TypeConverter pc : pcs) { Object obj = pc.convert("0"); Assert.assertEquals(obj, TypeConverterUtil.convert("0", obj.getClass())); Assert.assertEquals(Byte.valueOf((byte)0), pc.convert("0")); Assert.assertEquals(Byte.valueOf((byte)-128), pc.convert("-128")); Assert.assertEquals(Byte.valueOf((byte)127), pc.convert("127")); Assert.assertEquals(Byte.valueOf((byte)0), pc.convert("0x0")); Assert.assertEquals(Byte.valueOf((byte)0), pc.convert("0X0")); Assert.assertEquals(Byte.valueOf((byte)127), pc.convert("0x7F")); Assert.assertEquals(Byte.valueOf((byte)0xFF), pc.convert("0xFF")); } }
@Override public Object convert(String value) throws ConversionException { return (Byte)super.convert(value); }
ByteTypeConverter extends BytePrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Byte)super.convert(value); } }
ByteTypeConverter extends BytePrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Byte)super.convert(value); }  }
ByteTypeConverter extends BytePrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Byte)super.convert(value); }  @Override Object convert(String value); }
ByteTypeConverter extends BytePrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Byte)super.convert(value); }  @Override Object convert(String value);  }