jp.cssj.cti2.helpers
Class CTIMessageHelper

java.lang.Object
  extended by jp.cssj.cti2.helpers.CTIMessageHelper

public final class CTIMessageHelper
extends Object

メッセージ関係の補助ツールです。

Version:
$Id: CTIMessageHelper.java 1034 2013-10-23 05:51:57Z miyabe $
Author:
MIYABE Tatsuhiko

Field Summary
static short ERROR
          エラーレベルメッセージです。
static short FATAL
          深刻なエラーレベルメッセージです。
static short INFO
          情報レベルメッセージです。
static MessageHandler NULL
          どこにも表示しないメッセージハンドラです。
static MessageHandler STDERR
          Deprecated. createStreamMessageHandler(System.err)を使用してください。
static MessageHandler STDOUT
          Deprecated. createStreamMessageHandler(System.out)を使用してください。
static short WARN
          警告レベルメッセージです。
 
Method Summary
static MessageHandler createStreamMessageHandler(PrintStream out)
           
static String getFormat(short code)
          メッセージコードに対応するメッセージフォーマットを返します。
static short getLevel(short code)
          エラーレベルを返します。
static String toString(short code, String[] args)
          メッセージを文字列化します。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STDOUT

public static final MessageHandler STDOUT
Deprecated. createStreamMessageHandler(System.out)を使用してください。
標準出力に表示するメッセージハンドラです。


STDERR

public static final MessageHandler STDERR
Deprecated. createStreamMessageHandler(System.err)を使用してください。
標準出エラー出力に表示するメッセージハンドラです。


NULL

public static final MessageHandler NULL
どこにも表示しないメッセージハンドラです。


INFO

public static final short INFO
情報レベルメッセージです。

See Also:
Constant Field Values

WARN

public static final short WARN
警告レベルメッセージです。

See Also:
Constant Field Values

ERROR

public static final short ERROR
エラーレベルメッセージです。

See Also:
Constant Field Values

FATAL

public static final short FATAL
深刻なエラーレベルメッセージです。

See Also:
Constant Field Values
Method Detail

createStreamMessageHandler

public static MessageHandler createStreamMessageHandler(PrintStream out)

getLevel

public static final short getLevel(short code)
エラーレベルを返します。

Parameters:
code -
Returns:
エラーレベルの値。

getFormat

public static String getFormat(short code)
メッセージコードに対応するメッセージフォーマットを返します。

Parameters:
code -
Returns:
メッセージコードに対応するjava.text.MessageFormat形式の文字列。

toString

public static String toString(short code,
                              String[] args)
メッセージを文字列化します。

Parameters:
code -
Returns:
文字列化したメッセージ。


Copyright © 2017 座間ソフト. All rights reserved.