Package cn.org.rapid_framework.generator.provider.java.model

Examples of cn.org.rapid_framework.generator.provider.java.model.JavaClass


   
    public void test() throws Exception  {
        Generator g = new Generator();
        g.setTemplateRootDir(new File("src/template/clazz/jmock"));
        g.setOutRootDir(getTempDir());
        GeneratorModel gm = GeneratorModelUtils.newGeneratorModel("clazz",new JavaClass(BlogServiceBean.class));
        g.generateBy(gm.templateModel,gm.filePathModel);
    }
View Full Code Here


    g.generateByModelProvider(new DbTableGeneratorModelProvider(table));
  }
 
  public void generateByClass(Class clazz) throws Exception {
    Generator g = createGeneratorForJavaClass();
    g.generateByModelProvider(new JavaClassGeneratorModelProvider(new JavaClass(clazz)));
  }
View Full Code Here

            if(c.isPrimitive()) continue;
            if("void".equals(c.getName())) continue;
            if(c.isAnonymousClass()) continue;
            if(!Modifier.isPublic(c.getModifiers())) continue;
            if(JavaImport.isNeedImport(c.getName())) {
                set.add(new JavaClass(c));
            }
        }
    }
View Full Code Here

        processByGeneratorModel(isDelete,g,m);
      }  
     
      public void processByClass(Class clazz,boolean isDelete) throws Exception, FileNotFoundException {
      Generator g = getGenerator();
      GeneratorModel m = GeneratorModelUtils.newGeneratorModel("clazz",new JavaClass(clazz));
      PrintUtils.printBeginProcess("JavaClass:"+clazz.getSimpleName(),isDelete);
      processByGeneratorModel(isDelete, g, m);
      }
View Full Code Here

            if(c == null) continue;
            if(c.getName().startsWith("java.lang.")) continue;
            if(c.isPrimitive()) continue;
            if("void".equals(c.getName())) continue;
            if(JavaImport.isNeedImport(c.getName())) {
                set.add(new JavaClass(c));
            }
        }
    }
View Full Code Here

      return new GeneratorModel(templateModel,filePathModel);
    }

    public static GeneratorModel newFromClass(Class clazz) {
      Map templateModel = new HashMap();
      templateModel.put("clazz", new JavaClass(clazz));
      setShareVars(templateModel);
     
      Map filePathModel = new HashMap();
      setShareVars(filePathModel);
      filePathModel.putAll(BeanHelper.describe(new JavaClass(clazz)));
      return new GeneratorModel(templateModel,filePathModel);
    }
View Full Code Here

      return new GeneratorModel(templateModel,filePathModel);
    }

    public static GeneratorModel newFromClass(Class clazz) {
      Map templateModel = new HashMap();
      templateModel.put("clazz", new JavaClass(clazz));
      setShareVars(templateModel);
     
      Map filePathModel = new HashMap();
      setShareVars(filePathModel);
      filePathModel.putAll(BeanHelper.describe(new JavaClass(clazz)));
      return new GeneratorModel(templateModel,filePathModel);
    }
View Full Code Here

TOP

Related Classes of cn.org.rapid_framework.generator.provider.java.model.JavaClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.