private void defineNestedClass(TypeBuilder declaringClass, ClassDeclarationNode classDeclaration) {
     var shortName = context.getIdentifier(classDeclaration.NameOffset, classDeclaration.NameLength);
     var className = declaringClass.FullName + '$' + shortName;
     TypeBuilder typeBuilder = null;
     if (classDeclaration.IsPartial) {
         var partialTypeInfo = this.partialTypes[className];
         if (partialTypeInfo != null) {
             setNestedClassModifiers(classDeclaration, partialTypeInfo.typeBuilder);
             typeBuilder = partialTypeInfo.typeBuilder;
         }
     }
     if (typeBuilder == null) {
         typeBuilder = defineNestedType(declaringClass, className, shortName, classDeclaration);
         setNestedClassModifiers(classDeclaration, typeBuilder);
         if (classDeclaration.IsPartial) {
             this.partialTypes[className] = new PartialTypeInfo(typeBuilder);
         }
     }
     setTypeParameters(typeBuilder, classDeclaration.TypeParameters, classDeclaration);
     classDeclaration.addUserData(typeBuilder);
     typeBuilder.addUserData(classDeclaration);
     typeBuilder.setSuper(true);
     typeBuilder.setNestedStatic(true);
     defineNestedTypes(typeBuilder, classDeclaration);
 }
 private void defineClass(String packageName, ClassDeclarationNode classDeclaration) {
     var className = getTypeName(packageName, classDeclaration.NameOffset, classDeclaration.NameLength);
     TypeBuilder typeBuilder = null;
     if (classDeclaration.IsPartial) {
         var partialTypeInfo = this.partialTypes[className];
         if (partialTypeInfo != null) {
             setClassModifiers(classDeclaration, partialTypeInfo.typeBuilder);
             typeBuilder = partialTypeInfo.typeBuilder;
         }
     }
     if (typeBuilder == null) {
         typeBuilder = defineType(className, classDeclaration);
         setClassModifiers(classDeclaration, typeBuilder);
         if (classDeclaration.IsPartial) {
             this.partialTypes[className] = new PartialTypeInfo(typeBuilder);
         }
     }
     setTypeParameters(typeBuilder, classDeclaration.TypeParameters, classDeclaration);
     classDeclaration.addUserData(typeBuilder);
     typeBuilder.addUserData(classDeclaration);
     typeBuilder.setSuper(true);
     defineNestedTypes(typeBuilder, classDeclaration);
 }