org.codehaus.plexus.compiler
Class CompilerError

java.lang.Object
  extended by org.codehaus.plexus.compiler.CompilerError

public class CompilerError
extends java.lang.Object

This class encapsulates an error message produced by a programming language processor (whether interpreted or compiled)

Since:
2.0
Version:
$Id: CompilerError.java 2371 2005-07-31 18:05:08Z trygvis $
Author:
Stefano Mazzocchi

Field Summary
private  int endcolumn
          The end column number of the offending program text
private  int endline
          The end line number of the offending program text
private  boolean error
          Is this a severe error or a warning?
private  java.lang.String file
          The name of the file containing the offending program text
private  java.lang.String message
          The actual error text produced by the language processor
private  int startcolumn
          The start column number of the offending program text
private  int startline
          The start line number of the offending program text
 
Constructor Summary
CompilerError(java.lang.String message)
          The warning message constructor.
CompilerError(java.lang.String message, boolean error)
          The error message constructor.
CompilerError(java.lang.String file, boolean error, int startline, int startcolumn, int endline, int endcolumn, java.lang.String message)
          The error message constructor.
 
Method Summary
 int getEndColumn()
          Return the ending column number of the program text originating this error
 int getEndLine()
          Return the ending line number of the program text originating this error
 java.lang.String getFile()
          Return the filename associated with this compiler error.
 java.lang.String getMessage()
          Return the message produced by the language processor
 int getStartColumn()
          Return the starting column number of the program text originating this error
 int getStartLine()
          Return the starting line number of the program text originating this error
 boolean isError()
          Assert whether this is a severe error or a warning
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

error

private boolean error
Is this a severe error or a warning?


startline

private int startline
The start line number of the offending program text


startcolumn

private int startcolumn
The start column number of the offending program text


endline

private int endline
The end line number of the offending program text


endcolumn

private int endcolumn
The end column number of the offending program text


file

private java.lang.String file
The name of the file containing the offending program text


message

private java.lang.String message
The actual error text produced by the language processor

Constructor Detail

CompilerError

public CompilerError(java.lang.String file,
                     boolean error,
                     int startline,
                     int startcolumn,
                     int endline,
                     int endcolumn,
                     java.lang.String message)
The error message constructor.

Parameters:
file - The name of the file containing the offending program text
error - Is this a severe error or a warning?
startline - The start line number of the offending program text
startcolumn - The start column number of the offending program text
endline - The end line number of the offending program text
endcolumn - The end column number of the offending program text
message - The actual error text produced by the language processor

CompilerError

public CompilerError(java.lang.String message)
The warning message constructor.

Parameters:
message - The actual error text produced by the language processor

CompilerError

public CompilerError(java.lang.String message,
                     boolean error)
The error message constructor.

Parameters:
message - The actual error text produced by the language processor
error - whether it was an error or informational
Method Detail

getFile

public java.lang.String getFile()
Return the filename associated with this compiler error.

Returns:
The filename associated with this compiler error

isError

public boolean isError()
Assert whether this is a severe error or a warning

Returns:
Whether the error is severe

getStartLine

public int getStartLine()
Return the starting line number of the program text originating this error

Returns:
The starting line number of the program text originating this error

getStartColumn

public int getStartColumn()
Return the starting column number of the program text originating this error

Returns:
The starting column number of the program text originating this error

getEndLine

public int getEndLine()
Return the ending line number of the program text originating this error

Returns:
The ending line number of the program text originating this error

getEndColumn

public int getEndColumn()
Return the ending column number of the program text originating this error

Returns:
The ending column number of the program text originating this error

getMessage

public java.lang.String getMessage()
Return the message produced by the language processor

Returns:
The message produced by the language processor

toString

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