Package org.jboss.errai.databinding.client

Examples of org.jboss.errai.databinding.client.ConverterRegistrationKey


    Assert.notNull(widgetValueType);
    Assert.notNull(modelValueType);

    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, widgetValueType));
    }

    if (converter != null) {
      return converter.toWidgetValue(modelValue);
    }
View Full Code Here


    Assert.notNull(modelValueType);
    Assert.notNull(widgetValueType);

    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, widgetValueType));
    }

    if (converter != null) {
      return converter.toModelValue(widgetValue);
    }
View Full Code Here

   */
  public static <M, W> void registerDefaultConverter(Class<M> modelValueType, Class<W> widgetValueType,
      Converter<M, W> converter) {
    Assert.notNull(modelValueType);
    Assert.notNull(widgetValueType);
    defaultConverters.put(new ConverterRegistrationKey(modelValueType, widgetValueType), converter);
  }
View Full Code Here

   * @return the converted object
   */
  @SuppressWarnings({ "rawtypes", "unchecked" })
  public static Object toWidgetValue(Class<?> toType, Object o, Converter converter) {
    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(o.getClass(), toType));
    }

    if (converter != null) {
      return converter.toWidgetValue(o);
    }
View Full Code Here

   * @return the converted object
   */
  @SuppressWarnings({ "rawtypes", "unchecked" })
  public static Object toModelValue(Class<?> toType, Object o, Converter converter) {
    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(toType, o.getClass()));
    }

    if (converter != null) {
      return converter.toModelValue(o);
    }
View Full Code Here

   *          The widget type the provided converter converts to.
   * @param converter
   *          The converter to register as a default for the provided model and widget types.
   */
  public static <M, W> void registerDefaultConverter(Class<M> modelType, Class<W> widgetType, Converter<M, W> converter) {
    defaultConverters.put(new ConverterRegistrationKey(modelType, widgetType), converter);
  }
View Full Code Here

    Assert.notNull(widgetValueType);
    Assert.notNull(modelValueType);

    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, widgetValueType));
    }

    if (converter != null) {
      return converter.toWidgetValue(modelValue);
    }
View Full Code Here

    Assert.notNull(modelValueType);
    Assert.notNull(widgetValueType);

    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, widgetValueType));
    }

    if (converter != null) {
      return converter.toModelValue(widgetValue);
    }
View Full Code Here

   */
  public static <M, W> void registerDefaultConverter(Class<M> modelValueType, Class<W> widgetValueType,
      Converter<M, W> converter) {
    Assert.notNull(modelValueType);
    Assert.notNull(widgetValueType);
    defaultConverters.put(new ConverterRegistrationKey(modelValueType, widgetValueType), converter);
  }
View Full Code Here

    Assert.notNull(widgetValueType);
    Assert.notNull(modelValueType);

    if (converter == null) {
      converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, widgetValueType));
    }

    if (converter != null) {
      return converter.toWidgetValue(modelValue);
    }
View Full Code Here

TOP

Related Classes of org.jboss.errai.databinding.client.ConverterRegistrationKey

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.