org.javagen.funcgen
Class Main

java.lang.Object
  extended by org.javagen.agile.core.ioc.spring.SpringMain
      extended by org.javagen.funcgen.Main

public class Main
extends org.javagen.agile.core.ioc.spring.SpringMain

Loads FuncGen configuration and executes code generation pipeline using Spring framework IoC BeanFactory.

Properties inputs have the following precedence from lowest to highest:

  1. Properties specified in the GlobalPropertyHolder bean within the FuncGenSpringConfig.xml file.
  2. Properties specified in the external propertyFile. Note: this can be specified as a GlobalPropertyHolder property and overridden here.
  3. Properties specified in the properties instance. Note: these are usually set by the invoking tool (i.e. Maven).

This is an extremely flexible way to configure the code generator, avoiding a one-size-fits-all approach.

Author:
Richard Easterling

Field Summary
 
Fields inherited from class org.javagen.agile.core.ioc.spring.SpringMain
beanFactory, configFile, DEFAULT_CONFIG_FILE, DEFAULT_CONFIGURER_BEAN_ID, DEFAULT_PIPELINE_BEAN_ID, properties, propertyFile, startModelBeanId
 
Constructor Summary
Main()
           
 
Method Summary
static void main(String[] args)
          Loads and runs FuncGen using Spring configuration file.
 
Methods inherited from class org.javagen.agile.core.ioc.spring.SpringMain
getBean, getBeanFactory, getConfigFile, getConfigurerBeanId, getPipelineBeanId, getStartModelBeanId, runPipeline, setArgs, setConfigFile, setProperties, setPropertyFile, setStartModelBeanId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Loads and runs FuncGen using Spring configuration file. FuncGen is started by invoking the pipeline bean.

Parameters:
args - takes an optional Spring XML configuration file location and/or a properties file. Files can be any valid URL or classpath location. File types are recognized by their extension, names and order are not important. Here are some valid examples:
  • file:src/funcgen/FuncGenSpringConfig.xml
  • classpath:FuncGenSpringConfig.xml
  • file:src/funcgen/funcgen.properties
  • classpath:funcgen.properties
Throws:
Exception


Copyright 2006-2006 Outsource Cafe Inc.. All Rights Reserved.