public class Message extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Message.MessageType
Message type.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_FORMAT |
static String |
INFO_FORMAT |
static String |
POSITION_FORMAT |
static String |
SOURCE_FILE_FORMAT |
static String |
WARNING_FORMAT |
| Constructor and Description |
|---|
Message(Message.MessageType type,
String message)
This constructor creates the Message object.
|
Message(Message.MessageType message_type,
String message,
int error_code)
This constructor creates the Message object.
|
Message(Message.MessageType message_type,
String message,
int line,
int column,
String sourceFile,
int error_code)
This constructor creates the Message object.
|
Message(Message.MessageType message_type,
String message,
String sourceFile,
int errorCode)
This constructor creates the Message object.
|
Message(String message)
This constructor creates the Message object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColumn()
Get column of the source code that the message belongs to.
|
int |
getErrorCode() |
String |
getFormattedMessage()
Return formatted string that represents this Message object.
|
int |
getLine()
Get line of the source code that the message belongs to.
|
String |
getMessage()
Get the text of the message.
|
Message.MessageType |
getMessageType()
Get the type of the message.
|
String |
getSourceFile() |
String |
toString() |
public static final String INFO_FORMAT
public static final String ERROR_FORMAT
public static final String WARNING_FORMAT
public static final String POSITION_FORMAT
public static final String SOURCE_FILE_FORMAT
public Message(Message.MessageType message_type, String message, int line, int column, String sourceFile, int error_code)
message_type - Type of the message.message - Text of the messageline - Line in the source codecolumn - Column in the source codesourceFile - Name of the file that the message belongs toerror_code - Error code of the message (compiler-specific)public Message(String message)
message - Text of the messagepublic Message(Message.MessageType type, String message)
type - Type of the message.message - Text of the messagepublic Message(Message.MessageType message_type, String message, int error_code)
message_type - Type of the message.message - Text of the messageerror_code - Error-specific codepublic Message(Message.MessageType message_type, String message, String sourceFile, int errorCode)
message_type - Type of the message.message - Text of the messagesourceFile - Name of the file that the message belongs toerrorCode - Error-specific codepublic int getErrorCode()
public String getSourceFile()
public String getFormattedMessage()
public int getLine()
public int getColumn()
public String getMessage()
public Message.MessageType getMessageType()
Copyright © 2017. All rights reserved.