Package com.streamconverter.pmd.command
Class PmdXmlToViolationsCommand
java.lang.Object
com.streamconverter.command.AbstractStreamCommand
com.streamconverter.pmd.command.PmdXmlToViolationsCommand
- All Implemented Interfaces:
IStreamCommand
PMD XML レポートを
PmdViolation オブジェクトのストリームに変換するコマンド。
入力: PMD XML レポートの InputStream
出力: ObjectOutputStream で PmdViolation を順次 writeObject
StAX(XMLStreamReader)による1件ずつのストリーム処理を行うため、大規模リポジトリでも OOM が発生しない。
PMD XML 構造: <pmd><file name="..."><violation ...>テキスト</violation></file></pmd>
-
Field Summary
Fields inherited from class com.streamconverter.command.AbstractStreamCommand
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(InputStream input, OutputStream output) Executes the command on the provided input stream and writes the result to the output stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.streamconverter.command.IStreamCommand
commandName, withLogging, withLogging
-
Constructor Details
-
PmdXmlToViolationsCommand
public PmdXmlToViolationsCommand()
-
-
Method Details
-
execute
Description copied from class:AbstractStreamCommandExecutes the command on the provided input stream and writes the result to the output stream.- Specified by:
executein interfaceIStreamCommand- Specified by:
executein classAbstractStreamCommand- Parameters:
input- The input stream to read data from.output- The output stream to write data to.- Throws:
IOException- If an I/O error occurs during the execution of the command.
-