Examples of convertToObject()


Examples of org.apache.wicket.util.convert.converter.ShortConverter.convertToObject()

    assertNull(converter.convertToObject("", Locale.US));
    assertEquals(new Short((short)10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString((short)10, Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.ShortConverter.convertToObject()

    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.ShortConverter.convertToObject()

    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + (Short.MAX_VALUE + 1), Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.jolokia.converter.object.StringToOpenTypeConverter.convertToObject()

   
    public static Object toOpenData(OpenType<?> otype, ClassLoader classLoader, Object value) throws OpenDataException {
        Object result;
        if (otype instanceof CompositeType && value instanceof JSONObject) {
            StringToOpenTypeConverter converter = converters.getToOpenTypeConverter();
            result = converter.convertToObject(otype, value);
        } else if (otype instanceof TabularType && value instanceof JSONObject) {
            StringToOpenTypeConverter converter = converters.getToOpenTypeConverter();
            result = converter.convertToObject(otype, value);
        } else if (otype instanceof ArrayType && value instanceof JSONArray) {
            StringToOpenTypeConverter converter = converters.getToOpenTypeConverter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.