コード例 #1
0
 /**
  * Generate Part Code for a given Component.
  *
  * @param node the component
  * @param part the component's part
  * @return the generated code
  * @throws CodeGeneratorException if an error occurs during Code Generation
  */
 @Override
 public String generateComponentCode(INode node, ECodePart part) throws CodeGeneratorException {
   return partGeneratorManager
       .createNodePartBuilder()
       .setNode(node)
       .setPart(part)
       .append(ECamelTemplate.PART_HEADER)
       .appendContent()
       .append(ECamelTemplate.PART_FOOTER)
       .build()
       .toString();
 }
コード例 #2
0
 /**
  * Parse Process, and generate Code for Context Variables.
  *
  * @param designerContext the context to generate code from
  * @return the generated code
  * @throws CodeGeneratorException if an error occurs during Code Generation
  */
 @Override
 public String generateContextCode(IContext designerContext) throws CodeGeneratorException {
   return partGeneratorManager.generateContextCode(designerContext);
 }
コード例 #3
0
 /**
  * Generate the code for the process given to the constructor.
  *
  * @return the generated code
  * @throws CodeGeneratorException if an error occurs during Code Generation
  */
 @Override
 public String generateProcessCode() throws CodeGeneratorException {
   JetUtil.checkEmittersPoolFactoryIsReady();
   return partGeneratorManager.generateProcessCode();
 }
コード例 #4
0
 @Override
 public void setContextName(String contextName) {
   partGeneratorManager.getArgumentBuilder().setContextName(contextName);
 }