private void lazyInit() { initialized = true; classes = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10)); hashes = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10)); addDefaultClasses(); if (classNames != null) { System.Collections.ArrayList vClasses = classNames.getStrings(); for (int i = 0; i < vClasses.Count; i++) { System.String name = (System.String)vClasses[i]; try { //UPGRADE_TODO: The differences in the format of parameters for method 'java.lang.Class.forName' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'" addClass(System.Type.GetType(name)); } //UPGRADE_NOTE: Exception 'java.lang.ClassNotFoundException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'" catch (System.Exception cnfe) { throw new CannotCreateObjectException(name + ": not found"); } } classNames = null; } }
/// <summary> Full constructor. /// /// </summary> /// <param name="fallbackDefaultLocale">If true, search the default locale when no translation for a particular text handle /// is found in the current locale. /// </param> /// <param name="fallbackDefaultForm">If true, search the default text form when no translation is available for the /// specified text form ('long', 'short', etc.). Note: form is specified by appending ';[form]' onto the text ID. /// </param> public Localizer(bool fallbackDefaultLocale, bool fallbackDefaultForm) { InitBlock(); stringTree = new PrefixTree(10); localeResources = new OrderedMap < String, List< LocaleDataSource >>(); currentLocaleData = new OrderedMap < String, PrefixTreeNode >(); locales = new List< String >(); defaultLocale = null; currentLocale = null; observers = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10)); this.fallbackDefaultLocale = fallbackDefaultLocale; this.fallbackDefaultForm = fallbackDefaultForm; }
public PrototypeFactory(PrefixTree classNames) { this.classNames = classNames; initialized = false; }