jindent.message
Class Message

java.lang.Object
  extended by jindent.message.Message
Direct Known Subclasses:
ErrorMessage, WarningMessage

public class Message
extends Object

This class contains a message created from Jindent's formatter.


Field Summary
static int ID_ERROR
          Message is an error
static int ID_FORMATTER
          Message created from formatter engine
static int ID_JAVA_DOC
          Message created from JavaDoc engine
static int ID_PARSER
          Message created from parser engine
 
Constructor Summary
Message(String language, String message, int messageId)
          Creates a message.
Message(String language, String message, int messageId, int column, int line)
          Creates a message.
Message(String language, String message, int messageId, jindent.formatter.Token refToken)
          Creates a message.
Message(String language, String message, int messageId, jindent.formatter.Token refToken, int lineOffset)
          Creates a message.
 
Method Summary
 int getColumn()
          Gets source code column connected to this message.
 String getLanguage()
          Gets language which is supported by the module which created this message.
 int getLine()
          Gets source code line connected to this message.
 String getMessage()
          Gets contained message String.
 int getMessageId()
          Gets id of the message.
 boolean hasColumnAndLineNumber()
          Checks if this message is connected to a certain source code column or line number.
static String idToString(int id)
           
 boolean isMessageId(int id)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_PARSER

public static final int ID_PARSER
Message created from parser engine

See Also:
Constant Field Values

ID_FORMATTER

public static final int ID_FORMATTER
Message created from formatter engine

See Also:
Constant Field Values

ID_JAVA_DOC

public static final int ID_JAVA_DOC
Message created from JavaDoc engine

See Also:
Constant Field Values

ID_ERROR

public static final int ID_ERROR
Message is an error

See Also:
Constant Field Values
Constructor Detail

Message

public Message(String language,
               String message,
               int messageId)
Creates a message.

Parameters:
language -
message -
messageId -

Message

public Message(String language,
               String message,
               int messageId,
               jindent.formatter.Token refToken)
Creates a message.

Parameters:
language -
message -
messageId -
refToken -

Message

public Message(String language,
               String message,
               int messageId,
               jindent.formatter.Token refToken,
               int lineOffset)
Creates a message.

Parameters:
language -
message -
messageId -
refToken -
lineOffset -

Message

public Message(String language,
               String message,
               int messageId,
               int column,
               int line)
Creates a message.

Parameters:
language -
message -
messageId -
column -
line -
Method Detail

getLanguage

public String getLanguage()
Gets language which is supported by the module which created this message. For instance: Java or Java/SQLJ.

Returns:
programming language.

getMessage

public String getMessage()
Gets contained message String.

Returns:
message String

getMessageId

public int getMessageId()
Gets id of the message.

Returns:
id

isMessageId

public boolean isMessageId(int id)

hasColumnAndLineNumber

public boolean hasColumnAndLineNumber()
Checks if this message is connected to a certain source code column or line number.

Returns:
true or false

getColumn

public int getColumn()
Gets source code column connected to this message.

Returns:
-1 if no column is connect to this message, otherwise the column

getLine

public int getLine()
Gets source code line connected to this message.

Returns:
-1 if no line is connect to this message, otherwise the line number

idToString

public static String idToString(int id)