Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
 static NamingspaceItem()
 {
     Root = new NamingspaceItem() {
         _arraysByIndexedItem =
             new Dictionary<JavaTypeDefinition, ArrayType>()
     };
 }