Package jodd.typeconverter.impl

Examples of jodd.typeconverter.impl.LocaleConverter


    register(Class[].class, new ClassArrayConverter(this));

    register(URI.class, new URIConverter());
    register(URL.class, new URLConverter());

    register(Locale.class, new LocaleConverter());
    register(TimeZone.class, new TimeZoneConverter());

    if (Jodd.isModuleLoaded(Jodd.UPLOAD)) {
      Jodd.bind(Jodd.UPLOAD, this);
    }
View Full Code Here


public class LocaleConverterTest {

  @Test
  public void testConversion() {
    LocaleConverter localeConverter = new LocaleConverter();

    assertNull(localeConverter.convert(null));

    assertEquals(new Locale("en"), localeConverter.convert("en"));
    assertEquals(new Locale("en", "US"), localeConverter.convert("en_US"));
    assertEquals(new Locale("en", "US", "win"), localeConverter.convert("en_US_win"));

    assertEquals(new Locale("en"), localeConverter.convert(new Locale("en")));

  }
View Full Code Here

    register(Class[].class, new ClassArrayConverter(this));

    register(URI.class, new URIConverter());
    register(URL.class, new URLConverter());

    register(Locale.class, new LocaleConverter());
    register(TimeZone.class, new TimeZoneConverter());
  }
View Full Code Here

TOP

Related Classes of jodd.typeconverter.impl.LocaleConverter

Copyright © 2018 www.massapicom. 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.