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 record
PMD違反情報を表すレコードクラス -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
executeInternal
(InputStream input, OutputStream output) PMD XML InputStream を Markdown OutputStream に変換protected String
コマンドの詳細情報を取得します。Methods inherited from class com.streamconverter.command.AbstractStreamCommand
execute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.streamconverter.command.IStreamCommand
execute
-
Constructor Details
-
PmdXmlToMarkdownCommand
public PmdXmlToMarkdownCommand()Creates a new command instance.
-
-
Method Details
-
executeInternal
PMD XML InputStream を Markdown OutputStream に変換- Specified by:
executeInternal
in classAbstractStreamCommand
- Parameters:
input
- PMD XML レポートの入力ストリームoutput
- Markdown レポートの出力ストリーム- Throws:
IOException
- XML解析エラーまたはI/O例外の場合
-
getCommandDetails
Description copied from class:AbstractStreamCommand
コマンドの詳細情報を取得します。サブクラスでオーバーライドして、コマンド固有の設定や状態を返すことができます。 この情報はデバッグログに出力され、問題の診断に役立ちます。
- Overrides:
getCommandDetails
in classAbstractStreamCommand
- Returns:
- コマンドの詳細情報
-