Register a converter class for all instances of the class argument. The converter can also be specified with the
{@link CsvColumn#converterClass()} annotation field.
508273
public <FT> void registerConverter(Class<FT> clazz, Converter<FT, ?> converter) {
		converterMap.put(clazz, converter);
	}
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
755466
@Override
    public <T> RegistrationAnnotatedBindingBuilder<T> register(Class<T> type) {
        return new RegistrationBindingBuilderImpl<>(binder, type);
    }
1255380
public function registerConverter(string $name, ConverterInterface $converter): void
    {
        $this->converters[$name] = $converter;
    }
741003
protected function registerConverter()
    {
        $this->app->singleton('converter', function ($app) {
            $measurements = $app['config']->get('cartalyst.converter.measurements');

            $converter = new Converter($app['converter.exchanger']);
            $converter->setMeasurements($measurements);

            return $converter;
        });
    }
513676
public static void registerConverters(Set<?> converters, ConverterRegistry registry) {
		if (converters != null) {
			for (Object converter : converters) {
				if (converter instanceof GenericConverter) {
					registry.addConverter((GenericConverter) converter);
				}
				else if (converter instanceof Converter<?, ?>) {
					registry.addConverter((Converter<?, ?>) converter);
				}
				else if (converter instanceof ConverterFactory<?, ?>) {
					registry.addConverterFactory((ConverterFactory<?, ?>) converter);
				}
				else {
					throw new IllegalArgumentException("Each converter object must implement one of the " +
							"Converter, ConverterFactory, or GenericConverter interfaces");
				}
			}
		}
	}
306976
public void registerComponents(XStream xstream) {
		for(Converter converter : converters) {
			xstream.registerConverter(converter);
			logger.debug("registered Xstream converter for {}", converter.getClass().getName());
		}

		for(SingleValueConverter converter : singleValueConverters) {
			xstream.registerConverter(converter);
			logger.debug("registered Xstream converter for {}", converter.getClass().getName());
		}
	}
899777
def register_adapter(from_classes, to_classes, func):
    
    assert from_classes, 'Must supply classes to adapt from'
    assert to_classes, 'Must supply classes to adapt to'
    assert func, 'Must supply adapter function'

    if not isinstance(from_classes, (tuple, list)):
        from_classes = [from_classes]
    if not isinstance(to_classes, (tuple, list)):
        to_classes = [to_classes]

    for key in itertools.product(from_classes, to_classes):
        if key in __adapters__:
            raise AdapterExists('%r to %r already exists.' % key)
        __adapters__[key] = func
321842
private void registerModelAdapter() {
        Dictionary<String, Object> properties = createResourceToModelAdapterProperties();
        String serviceClassName = AdapterFactory.class.getName();
        this.resourceToModelAdapterRegistration = this.context.registerService(serviceClassName, this.adapter, properties);
    }
1270359
public static void register() {
        try {
            Class<? extends List<Object>> listObjectClass;
            listObjectClass = (Class<List<Object>>) NumberedListConverter.class
                                .getMethod("getString", List.class).getParameterTypes()[0];
            NumberedListConverter converter = new NumberedListConverter();
            ConverterRegistry.addConverter(listObjectClass, converter);
            ConverterRegistry.addConverter(ArrayList.class, new NumberedArrayListConverter(converter));
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
313430
public static void register(Class<?> clazz, Function<Object, ?> converter) {
      if (clazz == null || converter == null) {
         log.warn("Trying to register either a null class ({0}) or a null converter ({1}). Ignoring!",
                  clazz,
                  converter);
         return;
      }
      converters.put(clazz, converter);
   }
576864
def register(cls, instance_class, name=None):
        
        if name is None:
            name = instance_class.__name__
        cls.INSTANCE_CLASSES[name] = instance_class
837397
public void registerMap(Class src) {
        List<BeanMappingObject> objects = BeanMappingParser.parseMapMapping(src);
        for (BeanMappingObject object : objects) {
            register(object);
        }
    }
692249
public <S, T> Converter<S, T> findConverter(ConverterKey<S,T> key) {
		
		 // We check once before attempting introspection so we avoid that if possible
		@SuppressWarnings("unchecked")
		Converter<S,T> converter = (Converter<S, T>) registeredConverters.get(key);
		if (converter != null) {
			return converter;
		}
		
		// Now try introspecting the relevant class
		registerAnnotatedClasses(key.getInputClass(), key.getOutputClass());

		@SuppressWarnings("unchecked")
		Converter<S,T> myConverter = (Converter<S, T>) registeredConverters.get(key);
		return myConverter;
	}
827570
public static <U, V> Converter<U, V> wrapSingletonList(Converter<List<U>, V> converter) {
    Converter<U, List<U>> listConverter = new SingletonListConverter<U>().inverse();
    return listConverter.compose(converter);
  }
150754
public <A extends Annotation> void register(final Class<A> anno, final ConversionProcessorFactory<A> factory) {
        factoryMap.put(anno, factory);
    }
949862
public void init(Converter converter, Converter convAlternate, Converter convCheckmark)
    {
        super.init(converter, convAlternate);
        m_convCheckmark = convCheckmark;
    }