org.objectweb.jorm.compiler.lib
Class JormCompilerParameter

java.lang.Object
  |
  +--org.objectweb.jorm.compiler.lib.JormCompilerParameter
All Implemented Interfaces:
java.lang.Cloneable, Loggable

public class JormCompilerParameter
extends java.lang.Object
implements Loggable, java.lang.Cloneable

A JormCompilerParameter object is an object which manages informations read by the command line parser. These informations are needed to the compiler system to parse, generate, and compile.

Author:
X. Spengler

Field Summary
 boolean bindingAbstract
          if the bindingAbstract is set to true, the binding object will be abstract, else false
 java.lang.String bindingInheritance
           
 java.lang.String classMappingInheritance
           
 PathExplorer classpath
          classpath is an object which stores a set of paths (or jar files).
 java.util.ArrayList dtdLocations
          the list of DTD locations
 boolean generatedPDFiles
          indicates if the jorm .pd files must be generated
 boolean generatedWithMapperPackage
           
static java.lang.String INHERITANCE_CLASSNAME_PATTERN
          The pattern that represents the JORM class name to be replaced into the string defining the inherited class of a either the PBinding or the PClassMapping that is generated.
static java.lang.String INHERITANCE_PACKAGE_PATTERN
           
 java.util.Collection inputFiles
          a vector of input file names (.pd files)
 boolean javac
          if the compile flag is set to true, the java sources will be compiled, if false, there will be no compilation.
 java.lang.String javacName
          javaCompiler is the name of the javac compiler used to compile the java sources.
 boolean keepSrc
          keep the source files or not.
 java.lang.String logConfFile
           
 Logger logger
          a simple logger to log
 java.lang.String output
          path where files will be generated
 boolean parseOnly
          if the build flag is set to true, files are generated, else false.
 java.lang.String projectName
          projectName is the name of the project for which we generate
 boolean verbose
          verbose flag, set by the user
 
Constructor Summary
JormCompilerParameter()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String computePBindingInheritance(java.lang.String cn)
          Computes the actual class name which the generated PBinding class must extend.
 java.lang.String computePClassMappingInheritance(java.lang.String cn)
          Computes the actual class name which the generated PClassMapping class must extend.
 java.lang.String getBindingInheritance()
           
 java.lang.String getClassMappingInheritance()
           
 PathExplorer getClasspath()
           
 java.util.ArrayList getDtdLocations()
           
 java.util.Collection getInputFiles()
           
 java.lang.String getJavacName()
           
 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.
 java.lang.String getOutput()
           
 java.lang.String getProjectName()
           
 boolean isBindingAbstract()
           
 boolean isJavac()
           
 boolean isKeepSrc()
           
 boolean isParseOnly()
           
 boolean isVerbose()
           
 void loadConfFile(java.io.InputStream in, java.util.Iterator knownmappers)
          Load a jorm configuration file.
 void loadConfFile(java.lang.String file, java.util.Iterator knownmappers)
          Load a jorm configuration file.
 void print()
          Prints informations managed by the current object.
 void setLogger(Logger logger)
          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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INHERITANCE_CLASSNAME_PATTERN

public static final java.lang.String INHERITANCE_CLASSNAME_PATTERN
The pattern that represents the JORM class name to be replaced into the string defining the inherited class of a either the PBinding or the PClassMapping that is generated.

See Also:
Constant Field Values

INHERITANCE_PACKAGE_PATTERN

public static final java.lang.String INHERITANCE_PACKAGE_PATTERN
See Also:
Constant Field Values

logConfFile

public java.lang.String logConfFile

classpath

public PathExplorer classpath
classpath is an object which stores a set of paths (or jar files).


output

public java.lang.String output
path where files will be generated


verbose

public boolean verbose
verbose flag, set by the user


inputFiles

public java.util.Collection inputFiles
a vector of input file names (.pd files)


keepSrc

public boolean keepSrc
keep the source files or not.


javacName

public java.lang.String javacName
javaCompiler is the name of the javac compiler used to compile the java sources.


projectName

public java.lang.String projectName
projectName is the name of the project for which we generate


javac

public boolean javac
if the compile flag is set to true, the java sources will be compiled, if false, there will be no compilation.


parseOnly

public boolean parseOnly
if the build flag is set to true, files are generated, else false.


bindingInheritance

public java.lang.String bindingInheritance

classMappingInheritance

public java.lang.String classMappingInheritance

bindingAbstract

public boolean bindingAbstract
if the bindingAbstract is set to true, the binding object will be abstract, else false


logger

public Logger logger
a simple logger to log


dtdLocations

public java.util.ArrayList dtdLocations
the list of DTD locations


generatedPDFiles

public boolean generatedPDFiles
indicates if the jorm .pd files must be generated


generatedWithMapperPackage

public boolean generatedWithMapperPackage
Constructor Detail

JormCompilerParameter

public JormCompilerParameter()
Method Detail

print

public void print()
Prints informations managed by the current object.


computePClassMappingInheritance

public java.lang.String computePClassMappingInheritance(java.lang.String cn)
Computes the actual class name which the generated PClassMapping class must extend.

Parameters:
cn - The class name of the persistent class for which the code is generated.
Returns:
The computed class name.

computePBindingInheritance

public java.lang.String computePBindingInheritance(java.lang.String cn)
Computes the actual class name which the generated PBinding class must extend.

Parameters:
cn - The class name of the persistent class for which the code is generated.
Returns:
The computed class name.

loadConfFile

public void loadConfFile(java.lang.String file,
                         java.util.Iterator knownmappers)
                  throws PException
Load a jorm configuration file.

Parameters:
file - the name of the jorm configuration file
PException

loadConfFile

public void loadConfFile(java.io.InputStream in,
                         java.util.Iterator knownmappers)
                  throws PException
Load a jorm configuration file.

Parameters:
in - the input stream of the jorm configuration file
PException

getClasspath

public PathExplorer getClasspath()

getOutput

public java.lang.String getOutput()

isVerbose

public boolean isVerbose()

getInputFiles

public java.util.Collection getInputFiles()

isKeepSrc

public boolean isKeepSrc()

getJavacName

public java.lang.String getJavacName()

getProjectName

public java.lang.String getProjectName()

isJavac

public boolean isJavac()

isParseOnly

public boolean isParseOnly()

getBindingInheritance

public java.lang.String getBindingInheritance()

getClassMappingInheritance

public java.lang.String getClassMappingInheritance()

isBindingAbstract

public boolean isBindingAbstract()

getDtdLocations

public java.util.ArrayList getDtdLocations()

setLogger

public void setLogger(Logger logger)
Description copied from interface: Loggable
Assigns a logger to an component that wants to log things.

Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
Description copied from interface: Loggable
Assigns a logger factory that allows the creation of new loggers.

Specified by:
setLoggerFactory in interface Loggable
Parameters:
lf - the LoggerFactory object to obtain new loggers

getLogger

public Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object