|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.krasnay.scaffold.Scaffold
public class Scaffold
| Constructor Summary | |
|---|---|
Scaffold(Class<?> entityClass)
|
|
| Method Summary | |
|---|---|
Class<?> |
getEntityClass()
Returns the entity class being scaffolded. |
static File |
getMavenJavaDir(Class<?> clazz)
Returns the directory of the source file for the given class, assuming this current project is a Maven project. |
static File |
getMavenResourcesDir(Class<?> clazz)
Returns the resources directory corresponding to the given class, assuming this current project is a Maven project. |
Map<String,Object> |
getMergeFields()
Returns map of fields to be merged into the template. |
static File |
getPackageDir(Class<?> clazz)
Returns the filesystem directory that contains the given class. |
Scaffold |
render(String templateName,
String outFileName)
Renders the given template to the given output file. |
Scaffold |
setTargetDir(File targetDir)
Sets the target directory into which to render templates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Scaffold(Class<?> entityClass)
| Method Detail |
|---|
public static File getPackageDir(Class<?> clazz)
public static File getMavenJavaDir(Class<?> clazz)
public static File getMavenResourcesDir(Class<?> clazz)
public Class<?> getEntityClass()
public Map<String,Object> getMergeFields()
public Scaffold render(String templateName,
String outFileName)
templateName - Name of the template, relative to the template directory.outFileName - Name of the output file, relative to the target directory.
This name itself is a template, so you can specify something
like "${Entity}Dao.java".public Scaffold setTargetDir(File targetDir)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||