|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.generator.lib.JormGenerator
This class start the generations of the jorm objects and user object. The jorm objects are the mapping, the binding and the accessor. It is needed to specify a MOPFactory before start the generation.The generate method starts the generation. To generate user objects it is necessary to specify their GeneratorFactory by the addGeneratorFactory method.
Constructor Summary | |
JormGenerator()
|
Method Summary | |
void |
addMappingGenerator(java.lang.String mappername,
MOPFactory mappinggenerator)
Adds a mapping generator which generates a specific mapping part. |
void |
generate(Class mo,
TargetHolder holder,
JormCompilerParameter cp,
JormCompilerConfigurator jcc)
This method generates the jorm objects by delegation to the AccessorGenerator, the BindingGenerator and the MappingGenerator. |
void |
generate(CompositeName mo,
TargetHolder holder,
JormCompilerParameter cp)
This method generates the jorm objects by delegation to the PNameGenerator, BinderGenerator and CompositeNameGenerator. |
Logger |
getLogger()
Returns a logger to an component that wants to log things. |
LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
void |
init()
Initializes the generator. |
void |
setCompilerConfigurator(JormCompilerConfigurator jcc)
Assigns the compiler configurator to this generator. |
void |
setCompilerParameter(JormCompilerParameter jcp)
Assigns the compiler parameter to this generator. |
void |
setLogger(Logger l)
Assigns a logger to an component that wants to log things. |
void |
setLoggerFactory(LoggerFactory lf)
Assigns a logger factory that allows the creation of new loggers. |
void |
setMetaInfoManager(Manager mim)
Assigns the meta information manager to this generator. |
void |
setPathExplorer(PathExplorer pathexpl)
Assigns a PathExplorer object for locating files that have to be parsed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JormGenerator()
Method Detail |
public void init() throws PException
init
in interface Generator
PException
public void setCompilerParameter(JormCompilerParameter jcp)
setCompilerParameter
in interface Generator
jcp
- the compiler parameter.public void setCompilerConfigurator(JormCompilerConfigurator jcc)
setCompilerConfigurator
in interface Generator
jcc
- the compiler configurator.public void setMetaInfoManager(Manager mim)
setMetaInfoManager
in interface Generator
mim
- the meta information manager to use.public void setPathExplorer(PathExplorer pathexpl)
setPathExplorer
in interface Generator
pathexpl
- the PathExplorer to be used for file locationpublic void addMappingGenerator(java.lang.String mappername, MOPFactory mappinggenerator)
addMappingGenerator
in interface Generator
mappername
- The name of the mapper.mappinggenerator
- The Mapping Verifier object.public void generate(Class mo, TargetHolder holder, JormCompilerParameter cp, JormCompilerConfigurator jcc) throws PException
generate
in interface Generator
mo
- This meta object is a Class.holder
- The target holder which allows to create files.cp
- The compiler parameter.jcc
- The actual configuration of the compiler.
PException
- if an error occurs during the generation.public void generate(CompositeName mo, TargetHolder holder, JormCompilerParameter cp) throws PException
generate
in interface Generator
mo
- This meta object is a CompositeName.holder
- The target holder which allows to create files.cp
- The compiler parameter.
PException
- if an error occurs during the generation.public void setLogger(Logger l)
Loggable
setLogger
in interface Loggable
l
- the logger objectpublic Logger getLogger()
Loggable
getLogger
in interface Loggable
public LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory
in interface Loggable
public void setLoggerFactory(LoggerFactory lf)
Loggable
setLoggerFactory
in interface Loggable
lf
- the LoggerFactory object to obtain new loggers
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |