org.ktc.rbutils.rb.generation
Class MainGenerator
java.lang.Object
org.ktc.rbutils.api.i18n.AbstractLocalized
org.ktc.rbutils.api.audit.AbstractProcessor
org.ktc.rbutils.api.audit.AbstractMainProcessor
org.ktc.rbutils.rb.generation.MainGenerator
- All Implemented Interfaces:
- MainProcessor, Processor, Localized
public class MainGenerator
- extends AbstractMainProcessor
Generates a set of Java RessourceBundle source files using a set of Properties files.
- Since:
- RbUtils 0.8.0
- Version:
- $Revision: 1.4 $
- Author:
- ktcguru
- See Also:
FileGenerator
Method Summary |
void |
addConsoleLogger()
Adds a ConsoleLogger to this MainProcesor. |
int |
process()
Generates a Java RessourceBundle source class in the genRootdir directory for
each file found in the propsRootDir directory. |
Methods inherited from class org.ktc.rbutils.api.audit.AbstractMainProcessor |
addFiles, finalizeInitialization, fireException, fireProcessEnded, fireProcessStarted, getErrorsCount, getExtension, getProcessedFilesCount, setExtension, setFilesAlreadyAdded, setMessagesLocale |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MainGenerator
public MainGenerator(File propsRootDir,
File genRootdir)
throws FileNotFoundException
- Instanciates a new
MainGenerator
.
propsRootDir
and genRootdir
must be directories that exist in
the filesystem.
- Parameters:
propsRootDir
- the root dir of the properties files used to resolve package name.genRootdir
- the target root directory where the java files will be put after package
name resolution and file generation.
- Throws:
FileNotFoundException
- if a parameter is a File
that does not
exist in the filesystem.
NotDirectoryException
- if a parameter is not a directory in
the filesystem.
process
public int process()
- Generates a Java RessourceBundle source class in the
genRootdir
directory for
each file found in the propsRootDir
directory.
- Returns:
- the number of errors that occured during generation.
addConsoleLogger
public void addConsoleLogger()
- Adds a ConsoleLogger to this MainProcesor. Usually, this method will be called if there are
no registered loggers.
Copyright © 2005-2009 RbUtils Project. All Rights Reserved.