public class MessageCollection.Message extends Object
Message objects stand for messages from the OCL compilation process. They consist of an message number, an associated message text, which contains substitution points, a severity code and a collection of source code references.
The default severity code of a message is ERROR, except for those messages, which stand for a compiler malfunction. In the latter case the code SYSTEMERROR is chosen.
A Message object is always part of a MessageCollection. You have to create Messages by means of the new operator, qualified by the associated MessageCollection object.
Modifier and Type | Method and Description |
---|---|
String |
getFormattedSourceReferences(int offLine,
int offCol,
String[] delims)
Use this method to obtain a formatted representation of the source
references of a message.
|
String |
getMessageText()
This method returns the text of the message object.
|
MessageCollection.Severity |
getSeverity()
Inquire the severity of a Message by means of this method.
|
SourceReference[] |
getSourceReferences()
This method lets you inquire the source code references of the
message as an array of SourceReference objects.
|
public SourceReference[] getSourceReferences()
public MessageCollection.Severity getSeverity()
public String getMessageText()
public String getFormattedSourceReferences(int offLine, int offCol, String[] delims)
Use this method to obtain a formatted representation of the source references of a message.
The format will be: line/col1:col2,line/col1:col2,..., where "/", ":" and "," can be defined with other strings in index 0, 1 and 2 of the delims array.
offLine
- Offset to add to line numbers, originally counting
from 0.offCol
- Offset to add to column numbers, originally counting
from 0.delims
- Array of Strings defining delimiters "/", ":" and ",".Copyright © 2018. All rights reserved.