コード例 #1
0
ファイル: Main.java プロジェクト: rahulgnayak/zest-java
  public static void main(String[] args)
      throws ClassNotFoundException, IllegalAccessException, InstantiationException,
          AssemblyException {
    String applicationAssemblerName = args[0];
    Class applicationAssemblerClass = Class.forName(applicationAssemblerName);
    ApplicationAssembler assembler = (ApplicationAssembler) applicationAssemblerClass.newInstance();

    Energy4Java energy4Java = new Energy4Java();

    ApplicationDescriptor application = energy4Java.newApplicationModel(assembler);

    new Envisage().run(application);
  }
コード例 #2
0
ファイル: ApplicationDocs.java プロジェクト: ramtej/zest-java
 public static void main(String[] args) throws Exception {
   qi4j = new Energy4Java();
   ApplicationDescriptor model =
       qi4j.newApplicationModel(
           new ApplicationAssembler() {
             @Override
             public ApplicationAssembly assemble(ApplicationAssemblyFactory applicationFactory)
                 throws AssemblyException {
               return createAssembly(applicationFactory);
             }
           });
   Application application = model.newInstance(qi4j.spi());
 }