|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectijgen.generator.util.GeneratorUtils
public class GeneratorUtils
Constructor Summary | |
---|---|
GeneratorUtils()
|
Method Summary | |
---|---|
static java.lang.String |
constructFilePath(ClassDefinition classDefinition,
java.lang.String outputDirectoryName,
java.lang.String layer,
java.lang.String fileFilter,
java.lang.String extension,
boolean addPackagePath)
Constructs a fully qualified path to a file. |
static java.lang.String |
constructFilePath(java.lang.String outputDirectoryName,
java.lang.String layer,
java.lang.String fileFilter,
java.lang.String extension,
boolean addPackagePath)
Calls constructFilePath without class definition parameter. |
static java.lang.String |
constructPathFromClassPackage(ClassDefinition classDefinition)
Gets a directory structure from package name. |
static void |
ensureDirectoryStructure(java.lang.String path)
Ensures that directory structure specified by the path parameter exists. |
static void |
loadFilesRecursively(java.io.File directory,
java.util.List<java.io.File> result)
Loads all the files that are present in a directory, recursively. |
static org.apache.velocity.app.VelocityEngine |
prepareVelocityEngine(java.lang.String templatesPath)
Gets an instance of VelocityEngine for the specified directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeneratorUtils()
Method Detail |
---|
public static org.apache.velocity.app.VelocityEngine prepareVelocityEngine(java.lang.String templatesPath) throws java.lang.Exception
templatesPath
- path containing templates
java.lang.Exception
- is some problem during initialization of engine occurspublic static java.lang.String constructFilePath(ClassDefinition classDefinition, java.lang.String outputDirectoryName, java.lang.String layer, java.lang.String fileFilter, java.lang.String extension, boolean addPackagePath)
classDefinition
- class definition object used for generating artifact that has to be written to fileoutputDirectoryName
- output directory where the artifacts has to be producedlayer
- layer / template namefileFilter
- extension of the templateextension
- extension of the generated artifactaddPackagePath
- specifies whether the package has to be appended to the directory structure
public static java.lang.String constructFilePath(java.lang.String outputDirectoryName, java.lang.String layer, java.lang.String fileFilter, java.lang.String extension, boolean addPackagePath)
outputDirectoryName
- output directory where the artifacts has to be producedlayer
- layer / template namefileFilter
- extension of the templateextension
- extension of the generated artifactaddPackagePath
- specifies whether the package has to be appended to the directory structure
public static java.lang.String constructPathFromClassPackage(ClassDefinition classDefinition)
classDefinition
- class definition containing the package name
public static void ensureDirectoryStructure(java.lang.String path)
path
- directory pathpublic static void loadFilesRecursively(java.io.File directory, java.util.List<java.io.File> result)
directory
- directory that has to be scannedresult
- result list in which the files has to be accumulated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |