com.togethersoft.sca.core
Interface IMessage

All Known Subinterfaces:
IAuditMessage, IMetricMessage
All Known Implementing Classes:
Message

public interface IMessage

Represents a message that can be sent to a log. A message comprises the kind that describes its severity and the text that contains the message description.


Field Summary
static int DEBUG
          Represents a message containing debug data.
static int ERROR
          Represents a message containing error notification.
static int FATAL
          Represents a message containing fatal error notification.
static int INFO
          Represents a message containing code inspector's output.
 
Method Summary
 IAnalyzerDescriptor getAnalyzer()
          Returns the descriptor of the code analyzer that produced this message.
 AstObject getAstObject()
          Returns the AST object for which this message was produced.
 int getEndColumn()
          Returns the end column number of the the element for which this message was produced.
 int getEndLine()
          Returns the end line number of the the element for which this message was produced.
 java.lang.String getExplainMessage()
          Returns the formatted explain text of this message in HTML format.
 IExtension getExtension()
          Returns the descriptor of the Sapient extension that produced this message.
 java.lang.String getFileName()
          Returns the name of the source file containing the element for which this message was produced.
 java.lang.String getMessage()
          Returns the unformatted text of this message.
 java.lang.String getMessage(boolean isXML)
          Returns the formatted text of this message in XML or plain text format.
 java.lang.Object getProperty(java.lang.String id)
          Returns the value of the property with the given name.
 int getSeverity()
          Returns the severity of this message encoded as an integer.
 int getStartColumn()
          Returns the start column number of the the element for which this message was produced.
 int getStartLine()
          Returns the start line number of the the element for which this message was produced.
 void setProperty(java.lang.String id, java.lang.Object value)
          Sets the value of the property.
 

Field Detail

DEBUG

public static final int DEBUG
Represents a message containing debug data.

ERROR

public static final int ERROR
Represents a message containing error notification.

FATAL

public static final int FATAL
Represents a message containing fatal error notification.

INFO

public static final int INFO
Represents a message containing code inspector's output.
Method Detail

getAnalyzer

public IAnalyzerDescriptor getAnalyzer()
Returns the descriptor of the code analyzer that produced this message. Returns null if this message is not associated with any code analyzer.
Returns:
the descriptor of the code analyzer that produced this message.

getAstObject

public AstObject getAstObject()
Returns the AST object for which this message was produced. Returns null if this message is not associated with any AST object.

getEndColumn

public int getEndColumn()
Returns the end column number of the the element for which this message was produced. Returns zero (0) if this message is not associated with any source fragment.

getEndLine

public int getEndLine()
Returns the end line number of the the element for which this message was produced. Returns zero (0) if this message is not associated with any source fragment.

getExplainMessage

public java.lang.String getExplainMessage()
Returns the formatted explain text of this message in HTML format.
Returns:
the formatted message.

getExtension

public IExtension getExtension()
Returns the descriptor of the Sapient extension that produced this message. Returns null if this message is not associated with any extension.
Returns:
the descriptor of the extension that produced this message.

getFileName

public java.lang.String getFileName()
Returns the name of the source file containing the element for which this message was produced. Returns an empty string ("") if this message is not associated with any source file.

getMessage

public java.lang.String getMessage()
Returns the unformatted text of this message.
Returns:
the text of this message.

getMessage

public java.lang.String getMessage(boolean isXML)
Returns the formatted text of this message in XML or plain text format.
Parameters:
isXML - when set to true, the returned text is XML formatted.
Returns:
the formatted message.

getProperty

public java.lang.Object getProperty(java.lang.String id)
Returns the value of the property with the given name.

getSeverity

public int getSeverity()
Returns the severity of this message encoded as an integer.
Returns:
the severity of this message.

getStartColumn

public int getStartColumn()
Returns the start column number of the the element for which this message was produced. Returns zero (0) if this message is not associated with any source fragment.

getStartLine

public int getStartLine()
Returns the start line number of the the element for which this message was produced. Returns zero (0) if this message is not associated with any source fragment.

setProperty

public void setProperty(java.lang.String id,
                        java.lang.Object value)
Sets the value of the property.