mjc

org.multijava.util
Class MessageDescription

java.lang.Object
  extended byorg.multijava.util.MessageDescription

public class MessageDescription
extends Object

This class defines message descriptions (errors, warnings, notices, ...). The message format is a text message with placeholders for its arguments of the form {0}, {1}, ... . Each placeholder will be replaced by the string representation of the corresponding argument.


Field Summary
private  String format
           
private  int level
           
static int LVL_CAUTION
           
static int LVL_ERROR
           
static int LVL_INFO
           
static int LVL_NOTICE
           
static int LVL_UNDEFINED
           
static int LVL_WARNING_1
           
static int LVL_WARNING_2
           
static int LVL_WARNING_3
           
static int LVL_WARNING_UNCHECKED
           
private  String reference
           
 
Constructor Summary
MessageDescription(String format, String reference, int level)
          Constructs a message description
 
Method Summary
 String format(Object[] parameters)
          Returns a string explaining the error.
 String getFormat()
          Returns the message format.
 int getLevel()
          Returns the level of this message.
 String getReference()
          Returns a reference to a documentation on this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LVL_UNDEFINED

public static final int LVL_UNDEFINED

LVL_ERROR

public static final int LVL_ERROR

LVL_CAUTION

public static final int LVL_CAUTION

LVL_WARNING_1

public static final int LVL_WARNING_1

LVL_WARNING_2

public static final int LVL_WARNING_2

LVL_WARNING_3

public static final int LVL_WARNING_3

LVL_NOTICE

public static final int LVL_NOTICE

LVL_INFO

public static final int LVL_INFO

LVL_WARNING_UNCHECKED

public static final int LVL_WARNING_UNCHECKED

format

private String format

reference

private String reference

level

private int level
Constructor Detail

MessageDescription

public MessageDescription(String format,
                          String reference,
                          int level)
Constructs a message description

Parameters:
format - the textual message format (with placeholders)
reference - the document describing the reason for this message
level - the severity level of this message
Method Detail

getFormat

public String getFormat()
Returns the message format.


getReference

public String getReference()
Returns a reference to a documentation on this message.


getLevel

public int getLevel()
Returns the level of this message.


format

public String format(Object[] parameters)
Returns a string explaining the error.

Parameters:
parameters - the array of parameters

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.