Sets if converters registered with the VM PropertyEditorManager.
If the new value is true, all currently registered converters are
immediately registered with the VM.
192518
public static void setRegisterWithVM(final boolean registerWithVM) {
    if (Converters.registerWithVM != registerWithVM) {
      Converters.registerWithVM = registerWithVM;

      // register all converters with the VM
      if (registerWithVM) {
        for (Entry<Class, Converter> entry : REGISTRY.entrySet()) {
          Class type = entry.getKey();
          Converter converter = entry.getValue();
          PropertyEditorManager.registerEditor(type, converter.getClass());
        }
      }
    }
  }
1269040
def _init_converters(types_map):
    """"""
    global _converters
    _converters = {}
    for i in _DEFAULT_CONVERTERS:
        const_val = types_map[i]
        _converters[const_val] = _DEFAULT_CONVERTERS[i]
871358
def on_service_modify(self, svc_ref, old_properties):
        
        with self._lock:
            if self.reference is None:
                # A previously registered service now matches our filter
                self.on_service_arrival(svc_ref)
            elif svc_ref is self.reference:
                # Notify the property modification
                self._ipopo_instance.update(
                    self, self._value, svc_ref, old_properties
                )
274872
public void initializeAll(InjectionManager injectionManager) {
        if (injectionManager != null) {
            for (Converter<?> converter : _converters) {
                Field[] fields = ReflectionUtils.getFields(converter.getClass(), Inject.class);
                for (Field field : fields) {
                    final Object value;
                    if (field.getType() == Converter.class) {
                        // Injected converters are used as callbacks. They
                        // should be assigned to the outer converter, which is
                        // this.
                        value = this;
                    } else {
                        InjectionPoint<Object> injectionPoint = new MemberInjectionPoint<Object>(field, converter);
                        value = injectionManager.getInstance(injectionPoint);
                    }
                    field.setAccessible(true);
                    try {
                        field.set(converter, value);
                    } catch (Exception e) {
                        throw new IllegalStateException("Could not initialize converter: " + converter, e);
                    }
                }
            }
        }
    }
71766
public <T> PropertyLoader register(Converter<T> converter, Class<T> type) {
        manager.register(type, converter);
        return this;
    }
928291
public void addConverters(Converter converter, String... tags) {
        for (String tag : tags) {
            if (tag.startsWith("!")) {
                notConverters.put(tag.substring(1), converter);
            } else {
                converters.put(tag, converter);
            }
        }
    }
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());
		}
	}
796139
protected <T> void addConverter(Class<T> type, Converter<T> converter) {
        storage.put(type, converter);
    }
118793
public ConverterRegistry putCustom(Type type, Converter<?> converter) {
		if (null == customConverterMap) {
			synchronized (this) {
				if (null == customConverterMap) {
					customConverterMap = new ConcurrentHashMap<>();
				}
			}
		}
		customConverterMap.put(type, converter);
		return this;
	}
78160
def _sort_converters(cls, app_ready=False):
        ''''''
        # app_ready is True when called from DMP's AppConfig.ready()
        # we can't sort before then because models aren't ready
        cls._sorting_enabled = cls._sorting_enabled or app_ready
        if cls._sorting_enabled:
            for converter in cls.converters:
                converter.prepare_sort_key()
            cls.converters.sort(key=attrgetter('sort_key'))
806362
void setPostConverters(Collection<PostConverter> postConverters) {
        for (PostConverter pc : postConverters) {
            // register using specific name (if any)
            if (pc instanceof Named) {
                postConverterInstances.put(((Named) pc).getName(), pc);
            }
            // always register using class name
            postConverterInstances.put(pc.getClass().getName(), pc);
        }
    }
1020399
protected void registerDefaultConverters(ConversionService<?> conversionService) {
        conversionService.addConverter(
            CharSequence.class,
            MediaType.class, (object, targetType, context) -> {
                    if (StringUtils.isEmpty(object)) {
                        return Optional.empty();
                    } else {
                        final String str = object.toString();
                        try {
                            return Optional.of(new MediaType(str));
                        } catch (IllegalArgumentException e) {
                            context.reject(e);
                            return Optional.empty();
                        }
                    }
                });

    }
701891
public final <S, T> void registerConverter(ConverterKey<S,T> key, Converter<S, T> converter) {	

        if (key.getInputClass() == null) {
            throw new IllegalArgumentException("Input Class must not be null");
        }
        if (key.getOutputClass() == null) {
            throw new IllegalArgumentException("Output Class must not be null");
        }
        if (converter == null) {
            throw new IllegalArgumentException("Converter must not be null");
        }

        if (key.getQualifierAnnotation() == null) {
            throw new IllegalArgumentException("Qualifier must not be null");
        }

        Converter<?,?> old = registeredConverters.putIfAbsent(key, converter);
        if (old != null && (!isSameConverter(old, converter))) {
        	throw new IllegalStateException("Converter already registered for key: " + key);
        }
    }
1273077
@SuppressWarnings("rawtypes")
    public void addConverter(Function<?, ?> converter) {

        LettuceAssert.notNull(converter, "Converter must not be null");

        ClassTypeInformation<? extends Function> classTypeInformation = ClassTypeInformation.from(converter.getClass());
        TypeInformation<?> typeInformation = classTypeInformation.getSuperTypeInformation(Function.class);
        List<TypeInformation<?>> typeArguments = typeInformation.getTypeArguments();

        ConvertiblePair pair = new ConvertiblePair(typeArguments.get(0).getType(), typeArguments.get(1).getType());
        converterMap.put(pair, converter);
    }
1217077
def on_property_change(self, name, old_value, new_value):
        # pylint: disable=W0613
        
        if name in self._keys:
            try:
                if self.update_filter():
                    # This is a key for the filter and the filter has changed
                    # => Force the handler to update its dependency
                    self._reset()
            except ValueError:
                # Invalid filter: clear all references, this will invalidate
                # the component
                for svc_ref in self.get_bindings():
                    self.on_service_departure(svc_ref)
1265540
public void setDeclaredTransforms(java.util.Collection<String> declaredTransforms) {
        if (declaredTransforms == null) {
            this.declaredTransforms = null;
            return;
        }

        this.declaredTransforms = new com.amazonaws.internal.SdkInternalList<String>(declaredTransforms);
    }
465678
def _refresh_converters(self):
        
        self._converters.clear()
        return reduce(lambda a, b: a and b, [self._add_converter(k) for k in list(self._xsltLibrary.keys())], True)