org.tigris.mbt.generators
Class CodeGenerator
java.lang.Object
org.tigris.mbt.generators.PathGenerator
org.tigris.mbt.generators.ListGenerator
org.tigris.mbt.generators.CodeGenerator
public class CodeGenerator
- extends ListGenerator
Will generate code using a template. The code generated will contain all lables/names
defined by the vertices and edges. This enables the user to write templates for a
multitude of scripting or programming languages.
There is 2 variables in the template that will be replaced as follows:
{LABEL} Will be replace by the actual name of the edge or vertex.
{EDGE_VERTEX} Will be replace by the word 'Edge' or 'Vertex'.
Below is an example of a template.
/**
* This method implements the {EDGE_VERTEX} '{LABEL}'
* /
public void {LABEL}()
{
log.info( "{EDGE_VERTEX}: {LABEL}" );
throw new RuntimeException( "Not implemented" );
}
CodeGenerator
public CodeGenerator()
CodeGenerator
public CodeGenerator(String[] template)
setTemplate
public void setTemplate(String[] template)
getNext
public String[] getNext()
- Overrides:
getNext in class ListGenerator
toString
public String toString()
- Overrides:
toString in class ListGenerator