|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.CodeGenerationFactory
public class CodeGenerationFactory
This class stores and serves up instances CodeGenerator based on the string name of the code that the user wishes to generate. Classes derived from CodeGenerator will register themselves with this class (usually as part of a static initialization block). If a match based on the string name is not available, this class will try to dynamically load an instance based on some simple naming rules.
CodeGenerator
Constructor Summary | |
---|---|
CodeGenerationFactory()
Create a new instance of CodeGenerationFactory and
initialize with reasonable defaults. |
Method Summary | |
---|---|
java.util.Collection |
getBuildGenerators(java.lang.String language)
Get the build generator appropriate for this language. |
CodeGenerator |
getCodeGenerator(java.lang.String language,
java.lang.String mode)
Get a registered codeGenerator from the factory. |
void |
printRegisteredGenerators(java.io.PrintStream out)
|
void |
registerBuildGenerator(BuildGenerator gen)
|
void |
registerCodeGenerator(CodeGenerator gen)
Register a CodeGenerators with the factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CodeGenerationFactory()
CodeGenerationFactory
and
initialize with reasonable defaults.
Method Detail |
---|
public void registerCodeGenerator(CodeGenerator gen)
gen
- instance of a CodeGenerator;public void registerBuildGenerator(BuildGenerator gen)
public java.util.Collection getBuildGenerators(java.lang.String language)
public CodeGenerator getCodeGenerator(java.lang.String language, java.lang.String mode)
language
- String name of the languagemode
- Usually one of "stub", "skel", "ior", or "text"
public void printRegisteredGenerators(java.io.PrintStream out)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |