ijgen.generator.util
Class CommandLineParser

java.lang.Object
  extended by ijgen.generator.util.CommandLineParser

public class CommandLineParser
extends java.lang.Object

Utility class that takes as an argument RAW, not parsed command line arguments and extracts the info needed by the generator.

Author:
Detelin Zlatev

Constructor Summary
CommandLineParser(java.lang.String[] consoleArgs)
          Creates CommandLineParser object instance, parses RAW console arguments and populates with information the fields: models, templates, generators, mode
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getDbSettings()
          Gets the database settings.
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getGenerators()
          Gets the list of generators that will be executed.
 java.lang.String getMode()
          Gets mode of the generator.
 java.lang.String getModels()
          Gets the path to the directory where java/xml models are stored.
 java.lang.String getTemplates()
          Gets the path to the directory where templates are stored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineParser

public CommandLineParser(java.lang.String[] consoleArgs)
Creates CommandLineParser object instance, parses RAW console arguments and populates with information the fields: models, templates, generators, mode

Parameters:
consoleArgs - RAW, still not parsed console arguments
Method Detail

getMode

public java.lang.String getMode()
Gets mode of the generator. Possible values are 'java' or 'xml'.

Returns:
mode of the generator

getModels

public java.lang.String getModels()
Gets the path to the directory where java/xml models are stored.

Returns:
path to the directory

getTemplates

public java.lang.String getTemplates()
Gets the path to the directory where templates are stored.

Returns:

getGenerators

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getGenerators()
Gets the list of generators that will be executed. Each entry is Map, containing entries of type key=>value, where: key is name of the property for the generator value is value of this property

Returns:
list of generators

getDbSettings

public java.util.Map<java.lang.String,java.lang.String> getDbSettings()
Gets the database settings. Each entry is Map, containing entries of type key=>value, where: key is name of the property for the database value is value of this property

Returns:
list of generators


Copyright © 2010 Detelin Zlatev. All Rights Reserved.