What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.java.parser;
import org.netbeans.modules.java.ParserMessage;
/*
* This class represents a single error encountered when parsing
* a java file.
*
* @author Tor Norbye
*/
class ParserMessageImpl extends ParserMessage {
private final int line;
private final int column;
private final Object severity;
private final String message;
/** Construct new ParserMessage.
* @param file The file where the error occurred.
* @param line The line number where the error occurred
* @param column The column within the line where the error
* occurred.
* @param message Messages from the compiler describing
* the error
*/
ParserMessageImpl(Object sev, int l, int col, String msg) {
severity = sev;
line = l;
column = col;
message = msg;
}
/** Return the line number on which the error occurred.
* @return the line number on which the error occurred.
*/
public int getLineNumber() {
return line;
}
/** Return the severity on which the error occurred.
* @return the severity on which the error occurred.
*/
public Object getSeverity() {
return severity;
}
/** Return the column number within the line on which the error occurred.
* @return the column number within the line on which the error occurred.
*/
public int getColumn() {
return column;
}
/** Return the text description of the error
* @return the text description of the error
*/
public String getDescription() {
return message;
}
/** For debugging only */
public String toString() {
return line + ":" + column + ":" + message; // NOI18N
}
}
|