org.javagen.agile.core
Class GeneratorPipeline

java.lang.Object
  extended by org.javagen.agile.core.GeneratorPipeline
All Implemented Interfaces:
Generator

public class GeneratorPipeline
extends Object
implements Generator

The GeneratorPipeline defines a code generation assembly line. It consists of a series of Generator's called sequentially, each passing their output to the input of the next.

The GeneratorPipeline is itself a Generator allowing assemblages of Generator's to be combined as a single task.

Author:
Richard Easterling

Field Summary
protected  List<Generator> pipeline
           
protected  Model startModel
           
 
Constructor Summary
GeneratorPipeline()
           
 
Method Summary
 void addGenerator(Generator generator)
           
 Model gen(Model input)
          Entry point for starting the generator.
 List<Generator> getPipeline()
           
 Model getStartModel()
           
 void setPipeline(List<Generator> pipeline)
           
 void setStartModel(Model startModel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pipeline

protected List<Generator> pipeline

startModel

protected Model startModel
Constructor Detail

GeneratorPipeline

public GeneratorPipeline()
Method Detail

gen

public Model gen(Model input)
Entry point for starting the generator. If startModel is set, it will replace input as the pipeline seed model.

Specified by:
gen in interface Generator
Parameters:
input - the model instance to generate on - parent nodes will be ignored.
Returns:
the result of the task - usualy the same as the input model.

getPipeline

public List<Generator> getPipeline()

setPipeline

public void setPipeline(List<Generator> pipeline)

addGenerator

public void addGenerator(Generator generator)

getStartModel

public Model getStartModel()

setStartModel

public void setStartModel(Model startModel)


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