congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ConverterRegistrationKey
Code IndexAdd Tabnine to your IDE (free)

How to use
ConverterRegistrationKey
in
org.jboss.errai.databinding.client

Best Java code snippets using org.jboss.errai.databinding.client.ConverterRegistrationKey (Showing top 6 results out of 315)

origin: errai/errai

/**
 * Lookup a default converter.
 *
 * @return A {@link Converter} between the given types, or else {@code null} if no such default converter exists.
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static <M, W> Converter<M, W> getConverter(final Class<M> modelValueType, final Class<W> componentValueType) {
 Converter converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, componentValueType));
 if (converter == null) {
  converter = maybeCreateBuiltinConverter(maybeBoxPrimitive(modelValueType), maybeBoxPrimitive(componentValueType));
 }
 return converter;
}
origin: errai/errai

/**
 * Registers a {@link Converter} as a default for the provided model and widget types. The default converter will be
 * used in case no custom converter is provided when binding a model to a widget.
 *
 * @param <M>
 *          The type of the model value (field type of the model)
 * @param <W>
 *          The type of the widget value (e.g. String for a {@link TextBox} (=HasValue&lt;String&gt;) or Boolean for a
 *          {@link Checkbox} (=HasValue&lt;Boolean&gt;)))
 * @param modelValueType
 *          The model type the provided converter converts to, must not be null.
 * @param widgetValueType
 *          The widget type the provided converter converts to, must not be null.
 * @param converter
 *          The converter to register as a default for the provided model and widget types.
 */
public static <M, W> void registerDefaultConverter(final Class<M> modelValueType, final Class<W> widgetValueType,
  final Converter<M, W> converter) {
 Assert.notNull(modelValueType);
 Assert.notNull(widgetValueType);
 defaultConverters.put(new ConverterRegistrationKey(modelValueType, widgetValueType), converter);
}
origin: errai/errai

/**
 * Registers a {@link Converter} as a default for the provided model and widget types. The default converter will be
 * used in case no custom converter is provided when binding a model to a widget.
 *
 * @param <M>
 *          The type of the model value (field type of the model)
 * @param <W>
 *          The type of the widget value (e.g. String for a {@link TextBox} (=HasValue&lt;String&gt;) or Boolean for a
 *          {@link Checkbox} (=HasValue&lt;Boolean&gt;)))
 * @param modelValueType
 *          The model type the provided converter converts to, must not be null.
 * @param widgetValueType
 *          The widget type the provided converter converts to, must not be null.
 * @param converter
 *          The converter to register as a default for the provided model and widget types.
 */
public static <M, W> void registerDefaultConverter(final Class<M> modelValueType, final Class<W> widgetValueType,
  final Converter<M, W> converter) {
 Assert.notNull(modelValueType);
 Assert.notNull(widgetValueType);
 defaultConverters.put(new ConverterRegistrationKey(modelValueType, widgetValueType), converter);
}
origin: org.jboss.errai/errai-data-binding

/**
 * Registers a {@link Converter} as a default for the provided model and widget types. The default converter will be
 * used in case no custom converter is provided when binding a model to a widget.
 *
 * @param <M>
 *          The type of the model value (field type of the model)
 * @param <W>
 *          The type of the widget value (e.g. String for a {@link TextBox} (=HasValue&lt;String&gt;) or Boolean for a
 *          {@link Checkbox} (=HasValue&lt;Boolean&gt;)))
 * @param modelValueType
 *          The model type the provided converter converts to, must not be null.
 * @param widgetValueType
 *          The widget type the provided converter converts to, must not be null.
 * @param converter
 *          The converter to register as a default for the provided model and widget types.
 */
public static <M, W> void registerDefaultConverter(final Class<M> modelValueType, final Class<W> widgetValueType,
  final Converter<M, W> converter) {
 Assert.notNull(modelValueType);
 Assert.notNull(widgetValueType);
 defaultConverters.put(new ConverterRegistrationKey(modelValueType, widgetValueType), converter);
}
origin: org.jboss.errai/errai-data-binding

/**
 * Lookup a default converter.
 *
 * @return A {@link Converter} between the given types, or else {@code null} if no such default converter exists.
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static <M, W> Converter<M, W> getConverter(final Class<M> modelValueType, final Class<W> componentValueType) {
 Converter converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, componentValueType));
 if (converter == null) {
  converter = maybeCreateBuiltinConverter(maybeBoxPrimitive(modelValueType), maybeBoxPrimitive(componentValueType));
 }
 return converter;
}
origin: errai/errai

/**
 * Lookup a default converter.
 *
 * @return A {@link Converter} between the given types, or else {@code null} if no such default converter exists.
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static <M, W> Converter<M, W> getConverter(final Class<M> modelValueType, final Class<W> componentValueType) {
 Converter converter = defaultConverters.get(new ConverterRegistrationKey(modelValueType, componentValueType));
 if (converter == null) {
  converter = maybeCreateBuiltinConverter(maybeBoxPrimitive(modelValueType), maybeBoxPrimitive(componentValueType));
 }
 return converter;
}
org.jboss.errai.databinding.clientConverterRegistrationKey

Javadoc

Instances of this class serve as registration keys for global default converters (see Convert#registerDefaultConverter(Class,Class,Converter)).

Most used methods

  • <init>

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now