Class PmdXmlToMarkdownCommand
java.lang.Object
com.streamconverter.command.AbstractStreamCommand
com.streamconverter.command.impl.analysis.PmdXmlToMarkdownCommand
- All Implemented Interfaces:
IStreamCommand
PMD XML レポートを AI 可読性の高い Markdown 形式に変換するコマンド
StreamConverter アーキテクチャに基づく実装例として、InputStreamからOutputStreamへの 純粋な変換処理を提供します。PMDの冗長なXMLレポートをMarkdown要約形式に変換し、 AI分析や人間による可読性を向上させます。
変換仕様:
- ルール別違反統計(上位20位)
- ファイル別問題統計(上位15ファイル)
- 優先度分布と影響度分析
- 標準化されたISO-8601タイムスタンプ
使用例:
// StreamConverter パイプラインでの使用
StreamConverter converter = new StreamConverter(
new PmdXmlToMarkdownCommand()
);
converter.run(pmdXmlInputStream, markdownOutputStream);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPMD違反情報を表すレコードクラス -
Field Summary
Fields inherited from class com.streamconverter.command.AbstractStreamCommand
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecuteInternal(InputStream input, OutputStream output) PMD XML InputStream を Markdown OutputStream に変換protected Stringコマンドの詳細情報を取得します。Methods inherited from class com.streamconverter.command.AbstractStreamCommand
execute, execute
-
Constructor Details
-
PmdXmlToMarkdownCommand
public PmdXmlToMarkdownCommand()Creates a new command instance.
-
-
Method Details
-
executeInternal
PMD XML InputStream を Markdown OutputStream に変換- Specified by:
executeInternalin classAbstractStreamCommand- Parameters:
input- PMD XML レポートの入力ストリームoutput- Markdown レポートの出力ストリーム- Throws:
IOException- XML解析エラーまたはI/O例外の場合
-
getCommandDetails
Description copied from class:AbstractStreamCommandコマンドの詳細情報を取得します。サブクラスでオーバーライドして、コマンド固有の設定や状態を返すことができます。 この情報はデバッグログに出力され、問題の診断に役立ちます。
- Overrides:
getCommandDetailsin classAbstractStreamCommand- Returns:
- コマンドの詳細情報
-