RbUtils 0.13

org.ktc.rbutils.rb.generation
Class MainGenerator

java.lang.Object
  extended by org.ktc.rbutils.api.i18n.AbstractLocalized
      extended by org.ktc.rbutils.api.audit.AbstractProcessor
          extended by org.ktc.rbutils.api.audit.AbstractMainProcessor
              extended by 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

Field Summary
 
Fields inherited from class org.ktc.rbutils.api.audit.AbstractMainProcessor
DEFAULT_PROPERTIES_EXTENSION, DEFAULT_RECURSIVE_CHECK, filesAlreadyAdded, filesList, recursiveCheck, root, srcRBextension
 
Fields inherited from class org.ktc.rbutils.api.audit.AbstractProcessor
loggers
 
Fields inherited from class org.ktc.rbutils.api.i18n.AbstractLocalized
classResource
 
Constructor Summary
MainGenerator(File propsRootDir, File genRootdir)
          Instanciates a new MainGenerator.
 
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 org.ktc.rbutils.api.audit.AbstractProcessor
addLogger, addLoggers
 
Methods inherited from class org.ktc.rbutils.api.i18n.AbstractLocalized
getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ktc.rbutils.api.audit.Processor
addLogger, addLoggers
 

Constructor Detail

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.
Method Detail

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.


Back to the RbUtils Home Page

Copyright © 2005-2009 RbUtils Project. All Rights Reserved.