Package com.streamconverter.sloc.command
Class SlocReportFormatCommand
java.lang.Object
com.streamconverter.command.AbstractStreamCommand
com.streamconverter.sloc.command.SlocReportFormatCommand
- All Implemented Interfaces:
IStreamCommand
ModuleSloc オブジェクトのストリームを人が読みやすいレポート形式に整形するコマンド。
入力: SlocAggregateCommand が出力する ObjectOutputStream ストリーム (各モジュールの
ModuleSloc + name="Total" の合計行)
セキュリティ前提: 入力ストリームは同一 JVM 内の前段コマンド(SlocAggregateCommand)が
書き出したものであり、外部入力を直接受け取らない。予期しない型が含まれる場合は ClassNotFoundException / ClassCastException を IOException に変換して伝播する。
出力例:
=== SLOC Report === streamconverter-core 1,869 streamconverter-db 349 streamconverter-http 92 streamconverter-tools 1,038 streamconverter-web 79 ─────────────────────────────── Total 3,427
-
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
-
SlocReportFormatCommand
public SlocReportFormatCommand()
-
-
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.
-