anchor.diff:  [[TypeConverter-Addtypeconverterclassesatruntime]]
   === Add type converter classes at runtime
   
  -You can add new type converters at runtime, by having your classes
  -implement `org.apache.camel.TypeConverters` which is an marker
  -interface. Then for each type converter you want use
  -the `@Converter` annotation.
  +Classes implementing https://www.javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/TypeConverters.html[`TypeConverters`] are added to the type converter registry
  +at runtime. Use https://javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/Converter.html[`@Converter`] to mark each type converter.
   
   [source,java]
   ----
  
positive.code: [[TypeConverter-DiscoveringTypeConverters]]
  == Discovering Type Converters
  
  Camel will automatic discover and load type converters from all the JARs in the classpath on startup.
  
  Camel will search the classpath for a file called
  `META-INF/services/org/apache/camel/TypeConverterLoader`, which lists
  all type converter loader classes (they are automatic source code generated by the Camel Maven Package Plugin).
  These _loader_ classes will load the type converters into the Camel type converter registry
  and invoking these type converters is done in a _fast way_ using standard java method calls.
  
  === Discovering Camel 2.x based type converters (not loader)
  
  Camel will not perform additional package scanning for type conveters which has no source code generated loader classes.
  However this can be enabled by setting:
  
  [source,java]
  ----
  camelContext.setLoadTypeConverters(true);
  ----
  
  And in XML:
  [source,xml]
  ----
  <camelContext loadTypeConverters="true">
  
negative.code: https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContext.html[CamelContext].
  
  Camel provides a default type converter registry.
  From Camel 3 onwards, the type converter registry implementation generates source code using the Camel Maven
  Package Plugin, allowing Camel, at runtime, to load and invoke these type converters via
  quick Java method invocations. In Camel 2, type converters are registered using annotation based discovery, invoking the type converters via the https://docs.oracle.com/javase/tutorial/reflect/[Java Reflection API].
  
  
  [[TypeConverter-TypeConverterRegistry]]
  == TypeConverterRegistry
  
  Add a `TypeConverter` to the
  https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/spi/TypeConverterRegistry.html[`TypeConverterRegistry`]
  at runtime using the xref:camelcontext.adoc[CamelContext]:
  
  [source,java]
  ----
  CamelContext context = ...;
  context.getTypeConverterRegistry();
  ----
  
  NOTE: This is useful on platforms where the automatic type converters discovery fails due to classloading issues.
  
  [[TypeConverter-TypeConverterRegistryutilizationstatistics]]
  === TypeConverterRegistry utilization statistics
  
  Camel can gather utilization statistics of the runtime usage of type
  converters. These statistics are available in JMX as well as
  from https://www.javadoc.io/doc/org.apache.camel/camel-api/latest/org/apache/camel/spi/TypeConverterRegistry.html#getStatistics--[`TypeConverterRegistry#getStatistics()`].
  
  These statistics are turned off by
  default as there is some performance overhead under very high concurrent
  load.
  
  Enabling statistics in Java:
  
  [source,java]
  ----
  CamelContext context = ...;
  context.setTypeConverterStatisticsEnabled(true);
  ----
  
  Enabling statistics in XML DSL:
  
  [source,xml]
  ----
  