예제 #1
0
 public void WriteClasses(string location, List <ClassElements> elements, string packageName)
 {
     foreach (var element in elements)
     {
         var newPage = new NewPageCreator(location + element.className + ".java");
         newPage.StreamWriter.WriteLine("package" + " " + packageName + ";");
         newPage.StreamWriter.WriteLine("public" + " class " + element.className + " \n{");
         FieldWriter field = new FieldWriter();
         field.WriteField(newPage, element.classFields);
         PropertyWriter property = new PropertyWriter();
         property.WriteProperty(newPage, element.classPropertys);
         ClosePage(newPage);
     }
 }
예제 #2
0
        public StructWriter(string location, List <StructElements> elements, string packageName)
        {
            foreach (var element in elements)
            {
                var newPage = new NewPageCreator(location + element.structName + ".java");
                newPage.StreamWriter.WriteLine("package" + " " + packageName + ";");
                newPage.StreamWriter.WriteLine("class" + " " + element.structName + " \n{");


                FieldWriter field = new FieldWriter();
                field.WriteField(newPage, element.structFields);


                ClosePage(newPage);
            }
        }