|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.doma.extension.gen.Generator
public class Generator
ジェネレータです。
テンプレートエンジンのFreeMarkerを利用します。
| フィールドの概要 | |
|---|---|
protected freemarker.template.Configuration |
configuration
FreeMarkerの設定 |
protected static String |
DEFAULT_TEMPLATE_DIR_NAME
デフォルトのテンプレートディレクトリの名前 |
| コンストラクタの概要 | |
|---|---|
protected |
Generator()
インスタンスを構築します。 |
|
Generator(String templateEncoding,
File templatePrimaryDir)
インスタンスを構築します。 |
| メソッドの概要 | |
|---|---|
protected OutputStream |
createFileOutputStream(File file)
ストリームを作成します。 |
protected freemarker.cache.TemplateLoader |
createTemplateLoader(File templateFilePrimaryDir)
TemplateLoaderを作成します。 |
protected boolean |
exists(File file)
fileが存在する場合にtrueを返します。 |
void |
generate(GenerationContext context)
生成します。 |
protected freemarker.template.Template |
getTemplate(String name)
テンプレートを取得します。 |
protected void |
mkdirs(File dir)
ディレクトリを生成します。 |
protected Writer |
openWriter(GenerationContext context)
Writerを開きます。 |
protected void |
process(freemarker.template.Template template,
Object dataModel,
Writer writer)
テンプレートを処理します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected static final String DEFAULT_TEMPLATE_DIR_NAME
protected final freemarker.template.Configuration configuration
| コンストラクタの詳細 |
|---|
protected Generator()
public Generator(String templateEncoding,
File templatePrimaryDir)
templateEncoding - テンプレートファイルのエンコーディングtemplatePrimaryDir - テンプレートファイルを格納したプライマリディレクトリ、プライマリディレクトリを使用しない場合null| メソッドの詳細 |
|---|
protected freemarker.cache.TemplateLoader createTemplateLoader(File templateFilePrimaryDir)
TemplateLoaderを作成します。
templateFilePrimaryDir - テンプレートファイルを格納したプライマリディレクトリ、プライマリディレクトリを使用しない場合null
TemplateLoaderpublic void generate(GenerationContext context)
context - コンテキストprotected boolean exists(File file)
fileが存在する場合にtrueを返します。
file - ファイル
fileが存在する場合はtrue、そうでない場合はfalseprotected void mkdirs(File dir)
dir - ディレクトリprotected Writer openWriter(GenerationContext context)
Writerを開きます。
context - コンテキスト
Writerprotected OutputStream createFileOutputStream(File file)
file - ファイル
protected freemarker.template.Template getTemplate(String name)
name - テンプレートの名前
protected void process(freemarker.template.Template template,
Object dataModel,
Writer writer)
template - テンプレートdataModel - データモデルwriter - ライタ
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||