All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.greenpepper.shaded.antlr.debug.MessageEvent Maven / Gradle / Ivy

There is a newer version: 4.2.4
Show newest version
package antlr.debug;

public class MessageEvent extends Event {
	private String text;
	public static int WARNING = 0;
	public static int ERROR = 1;


	public MessageEvent(Object source) {
		super(source);
	}
	public MessageEvent(Object source, int type, String text) {
		super(source);
		setValues(type,text);
	}
	public String getText() {
		return text;
	}
	void setText(String text) {
		this.text = text;
	}
	/** This should NOT be called from anyone other than ParserEventSupport! */
	void setValues(int type, String text) {
		super.setValues(type);
		setText(text);
	}
	public String toString() {
		return "ParserMessageEvent [" +
		       (getType()==WARNING?"warning,":"error,") +
		       getText() + "]";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy