com.togethersoft.sca.core
Class Message

java.lang.Object
  |
  +--com.togethersoft.sca.core.Message
All Implemented Interfaces:
IMessage

public class Message
extends java.lang.Object
implements IMessage


Fields inherited from interface com.togethersoft.sca.core.IMessage
DEBUG, ERROR, FATAL, INFO
 
Constructor Summary
Message(int severity, IExtension extension, IAnalyzerDescriptor analyzer, AstObject ast, java.lang.String message, java.lang.Object[] values)
           
Message(int severity, java.lang.String message, java.lang.Object[] values)
           
 
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 setMessage(java.lang.String message)
           
 void setProperty(java.lang.String id, java.lang.Object value)
          Sets the value of the property.
 void setValues(java.lang.Object[] values)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(int severity,
               IExtension extension,
               IAnalyzerDescriptor analyzer,
               AstObject ast,
               java.lang.String message,
               java.lang.Object[] values)

Message

public Message(int severity,
               java.lang.String message,
               java.lang.Object[] values)
Method Detail

getAnalyzer

public IAnalyzerDescriptor getAnalyzer()
Description copied from interface: IMessage
Returns the descriptor of the code analyzer that produced this message. Returns null if this message is not associated with any code analyzer.
Specified by:
getAnalyzer in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
Returns:
the descriptor of the code analyzer that produced this message.

getAstObject

public AstObject getAstObject()
Description copied from interface: IMessage
Returns the AST object for which this message was produced. Returns null if this message is not associated with any AST object.
Specified by:
getAstObject in interface IMessage

getEndColumn

public int getEndColumn()
Description copied from interface: IMessage
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.
Specified by:
getEndColumn in interface IMessage

getEndLine

public int getEndLine()
Description copied from interface: IMessage
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.
Specified by:
getEndLine in interface IMessage

getExplainMessage

public java.lang.String getExplainMessage()
Description copied from interface: IMessage
Returns the formatted explain text of this message in HTML format.
Specified by:
getExplainMessage in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
Returns:
the formatted message.

getExtension

public IExtension getExtension()
Description copied from interface: IMessage
Returns the descriptor of the Sapient extension that produced this message. Returns null if this message is not associated with any extension.
Specified by:
getExtension in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
Returns:
the descriptor of the extension that produced this message.

getFileName

public java.lang.String getFileName()
Description copied from interface: IMessage
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.
Specified by:
getFileName in interface IMessage

getMessage

public java.lang.String getMessage()
Description copied from interface: IMessage
Returns the unformatted text of this message.
Specified by:
getMessage in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
Returns:
the text of this message.

getMessage

public java.lang.String getMessage(boolean isXML)
Description copied from interface: IMessage
Returns the formatted text of this message in XML or plain text format.
Specified by:
getMessage in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
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)
Description copied from interface: IMessage
Returns the value of the property with the given name.
Specified by:
getProperty in interface IMessage

getSeverity

public int getSeverity()
Description copied from interface: IMessage
Returns the severity of this message encoded as an integer.
Specified by:
getSeverity in interface IMessage
Following copied from interface: com.togethersoft.sca.core.IMessage
Returns:
the severity of this message.

getStartColumn

public int getStartColumn()
Description copied from interface: IMessage
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.
Specified by:
getStartColumn in interface IMessage

getStartLine

public int getStartLine()
Description copied from interface: IMessage
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.
Specified by:
getStartLine in interface IMessage

setMessage

public void setMessage(java.lang.String message)

setProperty

public void setProperty(java.lang.String id,
                        java.lang.Object value)
Description copied from interface: IMessage
Sets the value of the property.
Specified by:
setProperty in interface IMessage

setValues

public void setValues(java.lang.Object[] values)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object