* {@icu} Registers a collator as the default collator for the provided locale. The
* collator should not be modified after it is registered.
*
+ * Because ICU may choose to cache Collator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Collator.getInstance to avoid undefined behavior.
+ *
* @param collator the collator to register
* @param locale the locale for which this is the default collator
* @return an object that can be used to unregister the registered collator.
/**
* {@icu} Registers a collator factory.
+ *
+ * Because ICU may choose to cache Collator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Collator.getInstance to avoid undefined behavior.
*
* @param factory the factory to register
* @return an object that can be used to unregister the registered factory.
* {@icu} Registers a new break iterator of the indicated kind, to use in the given
* locale. Clones of the iterator will be returned if a request for a break iterator
* of the given kind matches or falls back to this locale.
+ *
+ * Because ICU may choose to cache BreakIterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * BreakIterator.getInstance to avoid undefined behavior.
+ *
* @param iter the BreakIterator instance to adopt.
* @param locale the Locale for which this instance is to be registered
* @param kind the type of iterator for which this instance is to be registered
* {@icu} Registers a new break iterator of the indicated kind, to use in the given
* locale. Clones of the iterator will be returned if a request for a break iterator
* of the given kind matches or falls back to this locale.
+ *
+ * Because ICU may choose to cache BreakIterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * BreakIterator.getInstance to avoid undefined behavior.
+ *
* @param iter the BreakIterator instance to adopt.
* @param locale the Locale for which this instance is to be registered
* @param kind the type of iterator for which this instance is to be registered
* {@icu} Registers a new NumberFormatFactory. The factory is adopted by
* the service and must not be modified. The returned object is a
* key that can be used to unregister this factory.
+ *
+ * Because ICU may choose to cache NumberFormat objects internally, this must
+ * be called at application startup, prior to any calls to
+ * NumberFormat.getInstance to avoid undefined behavior.
+ *
* @param factory the factory to register
* @return a key with which to unregister the factory
* @stable ICU 2.6
/**
* Registers a new currency for the provided locale. The returned object
* is a key that can be used to unregister this currency object.
+ *
+ * Because ICU may choose to cache Currency objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Currency.getInstance to avoid undefined behavior.
+ *
* @param currency the currency to register
* @param locale the ulocale under which to register the currency
* @return a registry key that can be used to unregister this currency
/**
* Register a factory object with the given ID. The factory
* method should return a new instance of the given transliterator.
+ *
+ * Because ICU may choose to cache Transliterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Transliterator.getInstance to avoid undefined behavior.
+ *
* @param ID the ID of this transliterator
* @param factory the factory object
* @stable ICU 2.0
/**
* Register a Transliterator object with the given ID.
+ *
+ * Because ICU may choose to cache Transliterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Transliterator.getInstance to avoid undefined behavior.
+ *
* @param trans the Transliterator object
* @stable ICU 2.2
*/
/**
* Register a Transliterator object with the given ID.
+ *
+ * Because ICU may choose to cache Transliterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Transliterator.getInstance to avoid undefined behavior.
+ *
* @param ID the ID of this transliterator
* @param trans the Transliterator object
*/
* Register an ID as an alias of another ID. Instantiating
* alias ID produces the same result as instantiating the original ID.
* This is generally used to create short aliases of compound IDs.
+ *
+ * Because ICU may choose to cache Transliterator objects internally, this must
+ * be called at application startup, prior to any calls to
+ * Transliterator.getInstance to avoid undefined behavior.
+ *
* @param aliasID The new ID being registered.
* @param realID The existing ID that the new ID should be an alias of.
* @stable ICU 3.6