Poseidon for UMLTM
  UMLdoc
 PREV      NEXT       FRAMES    NO FRAMES      

com.gentleware.poseidon.generator

Interface GeneratorController

com.gentleware.poseidon.generator.GeneratorController

public interface GeneratorController


The GeneratorController defines the common interface for controlling the code generation process. The main actions take place in generateCode().
Authors:
Thorsten Sturm
See also:
Generator


 Method Summary
public void   addValidElementClass(Class elementClass)
Adds a new element class to the list of element classes valid for code generation using this generator controller. 
public String   generateCode(List nodes, CheckNode rootElement, JTextArea errorTextArea)
Controls the process of generating code. 
public CompilationStrategy   getCompilationStrategy()
Returns the compilation strategy associated with this controller. 
public Collection   getGeneratedFiles()
Returns a Vector of Strings containing the full paths to generated files of the last run. 
public Generator   getGenerator()
Returns the corresponding Generator instance. 
public TreeRenderingStrategy   getTreeRenderingStrategy()
Returns the tree display strategy associated with this controller. 
public boolean   hasMacrosPreloaded()
Tests, if an initial loading of the registered velocity macros has been done. 
public void   initGenerator()
Initializes the corresponding Generator instance. 
public boolean   isGeneraterValid()
 
public boolean   isValidElementClass(Object element)
Tests, if the given element is of an instance of a class, valid for code generation using this generator controller. 
public void   reloadMacros()
Re-reads the registered macros into Velocity. 
public void   removeValidElementClass(Class elementClass)
Removes an element class from the list of element classes valid for code generation using this generator controller. 
public void   resetMacrosPreloaded()
resets value of macroPreloaded for given GeneratorController, used in case of changing path to templates  
public String   roundtripGenerateCode(RefObject primaryClassifier, List secondaryClassifiers, String filePath, JTextArea errorTextArea)
 
public void   setCompilationStrategy(CompilationStrategy strategy)
Sets the compilation strategy to be associated with this controller. 
public void   setGenerator(Generator generator)
Sets the generator instance that this generator controller will use. 
public void   setLanguage(String language)
Sets the language for this GeneratorControllor needed for custom paths  
public void   setTreeRenderingStrategy(TreeRenderingStrategy strategy)
Sets the tree display strategy to be associated with this controller. 
arrow_up
 

Tagged Values
static false
 

 Method Detail

addValidElementClass

public void addValidElementClass(Class elementClass)


Adds a new element class to the list of element classes valid for code generation using this generator controller.  
Parameters:
elementClass - Class of elements to be added.
arrow_up


generateCode

public String generateCode(List nodes, CheckNode rootElement, JTextArea errorTextArea)


Controls the process of generating code.  
Parameters:
nodes - The list of nodes code should be generated for.
rootElement - The root node for the tree containing all relevant information for the code generation.
errorTextArea - The display area for the concatenated messages created during code generation.
Returns:
The concatenated messages created during the code generation process.
arrow_up


getCompilationStrategy

public CompilationStrategy getCompilationStrategy()


Returns the compilation strategy associated with this controller.  
Returns:
The compilation strategy.
arrow_up


getGeneratedFiles

public Collection getGeneratedFiles()


Returns a Vector of Strings containing the full paths to generated files of the last run.  
Returns:
Collection of the files generated by the last run of the code generation.
arrow_up


getGenerator

public Generator getGenerator()


Returns the corresponding Generator instance.  
Returns:
The Generator instance.
arrow_up


getTreeRenderingStrategy

public TreeRenderingStrategy getTreeRenderingStrategy()


Returns the tree display strategy associated with this controller.  
Returns:
The tree display strategy.
arrow_up


hasMacrosPreloaded

public boolean hasMacrosPreloaded()


Tests, if an initial loading of the registered velocity macros has been done.  
Returns:
True, if the macros have already been preloaded, otherwise false.
Since:
1.6
arrow_up


initGenerator

public void initGenerator()


Initializes the corresponding Generator instance.  
arrow_up


isGeneraterValid

public boolean isGeneraterValid()

Returns:
arrow_up


isValidElementClass

public boolean isValidElementClass(Object element)


Tests, if the given element is of an instance of a class, valid for code generation using this generator controller.  
Parameters:
element - Element instance to be tested.
Returns:
True, if element is instance of valid class, otherwise false.
arrow_up


reloadMacros

public void reloadMacros()


Re-reads the registered macros into Velocity.  
arrow_up


removeValidElementClass

public void removeValidElementClass(Class elementClass)


Removes an element class from the list of element classes valid for code generation using this generator controller.  
Parameters:
elementClass - Class of elements to be removed.
arrow_up


resetMacrosPreloaded

public void resetMacrosPreloaded()


resets value of macroPreloaded for given GeneratorController, used in case of changing path to templates  
arrow_up


roundtripGenerateCode

public String roundtripGenerateCode(RefObject primaryClassifier, List secondaryClassifiers, String filePath, JTextArea errorTextArea)

Parameters:
primaryClassifier -
secondaryClassifiers -
filePath -
errorTextArea -
Returns:
arrow_up


setCompilationStrategy

public void setCompilationStrategy(CompilationStrategy strategy)


Sets the compilation strategy to be associated with this controller.  
Parameters:
strategy - The compilation strategy to be set.
arrow_up


setGenerator

public void setGenerator(Generator generator)


Sets the generator instance that this generator controller will use.  
Parameters:
generator - The generator instance to used by this generator controller.
arrow_up


setLanguage

public void setLanguage(String language)


Sets the language for this GeneratorControllor needed for custom paths  
Parameters:
language -
arrow_up


setTreeRenderingStrategy

public void setTreeRenderingStrategy(TreeRenderingStrategy strategy)


Sets the tree display strategy to be associated with this controller.  
Parameters:
strategy - The tree display strategy to be set.
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.