org.objectweb.jorm.generator.api
Interface Generator
public interface Generator
Generation is a simple interface which allows to generate object file
depending on their nature. The compiler uses Meta Object to build the
input source tree.
- P. Dechamboux
addMappingGenerator
public void addMappingGenerator(String mappername,
MOPFactory mappinggenerator) Adds a mapping generator which generates a specific mapping part.
mappername - The name of the mapper.mappinggenerator - The Mapping Verifier object.
generate
public void generate(Class mo,
org.objectweb.jorm.util.io.api.TargetHolder th,
JormCompilerParameter cp,
JormCompilerConfigurator jcc)
throws PException Generates code for the given Class.
mo - The class meta-object.th - The target holder which allows to create files.cp - This parameter permits to reach the compilation parameters.jcc - The actual configuration of the compiler.
generate
public void generate(CompositeName mo,
org.objectweb.jorm.util.io.api.TargetHolder th,
JormCompilerParameter cp)
throws PException Generates code for the given CompositeName.
mo - The composite name meta-object.th - The target holder which allows to create files.cp - This parameter permits to reach the compilation parameters.
init
public void init()
throws PException Initializes the generator. Should be called after setCompilerParameter
and setCompilerConfigurator.
PException -
setCompilerConfigurator
public void setCompilerConfigurator(JormCompilerConfigurator jcc)
Assigns the compiler configurator to this generator.
jcc - the compiler configurator.
setCompilerParameter
public void setCompilerParameter(JormCompilerParameter jcp)
Assigns the compiler parameter to this generator.
jcp - the compiler parameter.
setMetaInfoManager
public void setMetaInfoManager(Manager mim)
Assigns the meta information manager to this generator.
mim - the meta information manager to use.
setPathExplorer
public void setPathExplorer(org.objectweb.jorm.util.io.api.PathExplorer pathexpl)
Assigns a PathExplorer object for locating files that have to be parsed.
pathexpl - the PathExplorer to be used for file location