Top Description Fields Constructors Methods
org.antlr.tool

public Class ToolMessage

extends Message
Class Inheritance
Imports
org.stringtemplate.v4.ST

A generic message from the tool such as "file not found" type errors; there is no reason to create a special object for each error unlike the grammar errors, which may be rather complex. Sometimes you need to pass in a filename or something to say it is "bad". Allow a generic object to be passed in and the string template can deal with just printing it or pulling a property out of it. TODO what to do with exceptions? Want stack trace for internal errors?

Field Summary

Inherited from org.antlr.tool.Message:
argarg2columnefilelinelocationSTmessageFormatSTmsgIDmsgSTreportST

Constructor Summary

AccessConstructor and Description
public
ToolMessage(int msgID)

public
ToolMessage(int msgID, Object arg)

public
ToolMessage(int msgID, Throwable e)

public
ToolMessage(int msgID, Object arg, Object arg2)

public
ToolMessage(int msgID, Object arg, Throwable e)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.antlr.tool.Message:
getLocationTemplategetMessageTemplatesetColumnsetLinesetMessageIDtoString

Constructor Detail

ToolMessageback to summary
public ToolMessage(int msgID)
ToolMessageback to summary
public ToolMessage(int msgID, Object arg)
ToolMessageback to summary
public ToolMessage(int msgID, Throwable e)
ToolMessageback to summary
public ToolMessage(int msgID, Object arg, Object arg2)
ToolMessageback to summary
public ToolMessage(int msgID, Object arg, Throwable e)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override