public abstract class AbstractVelocityWriterImpl extends java.lang.Object implements Writer
修飾子とタイプ | フィールドと説明 |
---|---|
protected static java.lang.String |
APSERVER_WEBLOGIC
Application Serverの種別(BEA Weblogic)
|
protected static java.lang.String |
CLASS_COMMON_FINDER
PEXA CommonFinderBeanの基底クラス名称
|
protected static java.lang.String |
CLASS_ENTITY
PEXA EntityBeanの基底クラス名称
|
protected static java.lang.String |
CLASS_FACADE
PEXA FacadeBeanの基底クラス名称
|
protected static java.lang.String |
CLASS_FINDER
PEXA ObservableFinderBeanの基底クラス名称
|
protected static java.lang.String |
DEFAULT_ENCODING
デフォルトのファイルエンコーディング
|
protected static java.lang.String |
INTERFACE_ENTITY
EntityBeanのインタフェース名
|
protected static java.lang.String |
INTERFACE_MESSAGE
MessageDrivenBeanのインタフェース名
|
protected static java.lang.String |
INTERFACE_SESSION
SessionBeanのインタフェース名
|
protected java.lang.String |
outputEncoding
出力ファイルのエンコーディング指定
|
protected java.util.Map |
param
初期化パラメータ格納Map
|
protected static java.lang.String |
PROP_INPUTENCODING
プロパティ名(templateファイルのエンコーディング指定)
|
protected static java.lang.String |
PROP_OUTPUTENCODING
プロパティ名(出力ファイルのエンコーディング指定)
|
protected java.util.Map |
templateMap
Velocity templateのファイルオブジェクトMap
|
protected static int |
TYPE_ENTITY
EJBの種別(Entity)
|
protected static int |
TYPE_FACADE
EJBの種別(PEXA FacadeBase)
|
protected static int |
TYPE_FINDER
EJBの種別(PEXA Finder)
|
protected static int |
TYPE_MESSAGE
EJBの種別(Message Driven Bean)
|
protected static int |
TYPE_NOMATCH
EJBの種別(該当なし)
|
protected static int |
TYPE_SESSION
EJBの種別(Session Bean)
|
protected org.apache.velocity.app.VelocityEngine |
ve
Velocityエンジン
|
APSERVER, APSERVER_HOME, EJBJAR_DTD, SHORT_ENV_NAME, TEMPLATEPATH, VENDER_DTD
コンストラクタと説明 |
---|
AbstractVelocityWriterImpl() |
修飾子とタイプ | メソッドと説明 |
---|---|
protected int |
checkType(com.sun.javadoc.ClassDoc classDoc)
読み込むクラスの種別を判定する
|
protected java.io.File |
getOutputFile(com.sun.javadoc.ClassDoc sourceDoc,
java.lang.String fileName)
元になったクラスのファイル情報から、生成すべき
ファイルの名前を絶対パスで取得する。
|
protected java.io.File |
getOutputFile(com.sun.javadoc.ClassDoc sourceDoc,
java.lang.String dir,
java.lang.String fileName)
元になったクラスのファイル情報から、生成すべき
ファイルの名前を絶対パスで取得する。
|
protected java.lang.String |
getParameter(java.lang.String key)
初期化パラメータを取得する
|
protected java.lang.String[] |
getParameterArray(java.lang.String key)
初期化パラメータを取得する
|
protected org.apache.velocity.Template |
getTemplate(java.lang.String templateName)
Velocityのtemplateオブジェクトを取得する
|
void |
init(java.util.Map param)
初期化を行う
|
protected org.apache.velocity.app.VelocityEngine |
initVelocity(java.util.Map param)
VelocityEngineを取得する
|
protected boolean |
isModified(com.sun.javadoc.ClassDoc sourceDoc,
java.lang.String templateName,
java.io.File outputFile)
生成元のファイルと出力ファイルのタイムスタンプを比較し、
生成元が変更されているかを判定する
|
protected void |
log(java.lang.String message)
ログ出力を行う
|
protected java.lang.String |
merge(java.lang.String template,
org.apache.velocity.VelocityContext vcontext)
VelocityテンプレートとVelocityContextの内容をマージし、
内容をStringで取得する。
|
protected void |
readOptionTags(com.sun.javadoc.ClassDoc classDoc,
java.lang.String[] tagList,
org.apache.velocity.VelocityContext vcontext)
クラス情報よりオプショナルタグの内容を読み込み、VelocityContextに設定する
該当のタグが設定されていなければ無視する
|
protected void |
readTags(com.sun.javadoc.ClassDoc classDoc,
java.lang.String[] tagList,
org.apache.velocity.VelocityContext vcontext)
クラス情報よりタグの内容を読み込み、
VelocityContextに設定する
|
protected void |
writeFile(java.lang.String source,
java.io.File outputFile)
ファイルに出力する(テキスト形式のみ)
|
protected static final java.lang.String PROP_INPUTENCODING
protected static final java.lang.String PROP_OUTPUTENCODING
protected static final java.lang.String INTERFACE_ENTITY
protected static final java.lang.String INTERFACE_SESSION
protected static final java.lang.String INTERFACE_MESSAGE
protected static final java.lang.String CLASS_ENTITY
protected static final java.lang.String CLASS_FINDER
protected static final java.lang.String CLASS_COMMON_FINDER
protected static final java.lang.String CLASS_FACADE
protected static final java.lang.String DEFAULT_ENCODING
protected static final int TYPE_NOMATCH
protected static final int TYPE_ENTITY
protected static final int TYPE_SESSION
protected static final int TYPE_MESSAGE
protected static final int TYPE_FINDER
protected static final int TYPE_FACADE
protected static final java.lang.String APSERVER_WEBLOGIC
protected java.util.Map param
protected org.apache.velocity.app.VelocityEngine ve
protected java.lang.String outputEncoding
protected java.util.Map templateMap
public void init(java.util.Map param)
protected void log(java.lang.String message)
message
- ログ出力するメッセージprotected java.lang.String getParameter(java.lang.String key)
key
- 取得項目のキーprotected java.lang.String[] getParameterArray(java.lang.String key)
key
- 取得項目のキーprotected org.apache.velocity.Template getTemplate(java.lang.String templateName) throws WriteFatalException
templateName
- テンプレートファイル名WriteFatalException
protected org.apache.velocity.app.VelocityEngine initVelocity(java.util.Map param)
param
- 初期化パラメータを格納したMapprotected java.lang.String merge(java.lang.String template, org.apache.velocity.VelocityContext vcontext) throws WriteFatalException
template
- マージするVelocity templateファイル名vcontext
- マージする内容を設定したVelocityContextWriteFatalException
- 回復不能なエラーが発生した場合protected void writeFile(java.lang.String source, java.io.File outputFile) throws java.io.IOException
source
- ファイル内容(テキスト)outputFile
- 出力ファイルオブジェクトjava.io.IOException
- ファイルの書き込みが失敗protected int checkType(com.sun.javadoc.ClassDoc classDoc)
classDoc
- 読み込むクラスの情報protected java.io.File getOutputFile(com.sun.javadoc.ClassDoc sourceDoc, java.lang.String dir, java.lang.String fileName)
sourceDoc
- 生成元になるクラスの情報fileName
- 出力ファイル名称(パスなし)protected java.io.File getOutputFile(com.sun.javadoc.ClassDoc sourceDoc, java.lang.String fileName)
sourceDoc
- 生成元になるクラスの情報fileName
- 出力ファイル名称(パスなし)protected boolean isModified(com.sun.javadoc.ClassDoc sourceDoc, java.lang.String templateName, java.io.File outputFile)
sourceDoc
- 生成元のクラス情報outputFile
- 出力ファイルオブジェクトprotected void readTags(com.sun.javadoc.ClassDoc classDoc, java.lang.String[] tagList, org.apache.velocity.VelocityContext vcontext) throws WriteException
classDoc
- クラス情報オブジェクトtagList
- 読み込み対象のタグ配列vcontext
- 読み込んだタグの内容を設定するVelocityContextWriteException
- 読み込んだクラスに必要なタグが記述されていないprotected void readOptionTags(com.sun.javadoc.ClassDoc classDoc, java.lang.String[] tagList, org.apache.velocity.VelocityContext vcontext)
classDoc
- クラス情報オブジェクトtagList
- 読み込み対象のタグ配列vcontext
- 読み込んだタグの内容を設定するVelocityContext