protected JavaTypeDefinition(NamingspaceItem container, string name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(); } if (null == container) { throw new ArgumentNullException(); } this.Name = name; this.Namespace = container; // ArrayType objects registration must not be performed before the // instance is fully initialized. The ArrayType constructor will handle // the registration later. if (!IsArray) { container.Register(this); } return; }
internal NamingspaceItem GetOrCreateSon(string name) { NamingspaceItem result = TryGetSon(name); if (null != result) { return result; } result = new NamingspaceItem(name) { Parent = this }; if (null == _sonsByName) { _sonsByName = new Dictionary<string, NamingspaceItem>(); } _sonsByName.Add(name, result); return result; }
static NamingspaceItem() { Root = new NamingspaceItem() { _arraysByIndexedItem = new Dictionary<JavaTypeDefinition, ArrayType>() }; }