org.mod4j.dslcommon.generator.helpers
Class ModelHelpers

java.lang.Object
  extended by org.mod4j.dslcommon.generator.helpers.ModelHelpers

public class ModelHelpers
extends java.lang.Object


Constructor Summary
ModelHelpers()
           
 
Method Summary
static boolean equalsIgnoreCase(java.lang.String one, java.lang.String two)
           
static boolean fileExist(java.lang.String path)
           
static java.util.Map<java.lang.String,java.lang.String> getProperties(java.lang.String propFilePath)
          Read the properties file 'propFilePath' and return the result as a Map
static java.lang.String getProperty(java.lang.String key, java.lang.String propFilePath)
           
static java.lang.String javaClassName(java.lang.String cls)
           
static void print(java.lang.String m)
           
static boolean shouldRegenerate(java.lang.String absoluteFilePath)
          Determines if the file, given by the absoluteFilePath, should be generated again.
static java.lang.String timestamp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelHelpers

public ModelHelpers()
Method Detail

equalsIgnoreCase

public static boolean equalsIgnoreCase(java.lang.String one,
                                       java.lang.String two)

getProperties

public static java.util.Map<java.lang.String,java.lang.String> getProperties(java.lang.String propFilePath)
Read the properties file 'propFilePath' and return the result as a Map

Parameters:
propFilePath - absolute pathname of the properties files
Returns:

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String propFilePath)

timestamp

public static java.lang.String timestamp()

fileExist

public static boolean fileExist(java.lang.String path)

shouldRegenerate

public static boolean shouldRegenerate(java.lang.String absoluteFilePath)
Determines if the file, given by the absoluteFilePath, should be generated again. If the file is manually changed by the user, the file may not be regenerated so the user changes will not get lost. The Mod4jTracker will be consulted, to check if the file has been modified (by the user).

Parameters:
absoluteFilePath - The complete path from the root of the file-system including the file name.
Returns:
true if the file can be safely regenerated. Otherwise returns false.

javaClassName

public static java.lang.String javaClassName(java.lang.String cls)
Parameters:
cls -
Returns:
The name of the Java class for name cls

print

public static void print(java.lang.String m)


Copyright © 2010 Mod4j. All Rights Reserved.