bluej.extensions.event
Class CompileEvent

java.lang.Object
  extended by bluej.extensions.event.CompileEvent
All Implemented Interfaces:
ExtensionEvent

public class CompileEvent
extends java.lang.Object
implements ExtensionEvent

This class encapsulates compiler events. It allows an extension writer to know when a compilation starts and finishes, whether it succeeds or fails, and what warnings or errors are generated.

Version:
$Id: CompileEvent.java 6215 2009-03-30 13:28:25Z polle $

Field Summary
static int COMPILE_DONE_EVENT
          Event generated when a compilation finishes successfully.
static int COMPILE_ERROR_EVENT
          Event generated when a compilation error occurs.
static int COMPILE_FAILED_EVENT
          Event generated when a compilation finishes unsuccessfully.
static int COMPILE_START_EVENT
          Event generated when compilation begins.
static int COMPILE_WARNING_EVENT
          Event generated when a compilation warning occurs.
 
Constructor Summary
CompileEvent(int anEventId, java.io.File[] aFileNames)
          Constructor for a CompileEvent.
 
Method Summary
 int getErrorLineNumber()
          Returns the line number where the compilation error occurs.
 java.lang.String getErrorMessage()
          Returns the error message generated by the compiler.
 int getEvent()
          Returns the eventId, one of the values defined.
 java.io.File[] getFiles()
          Returns an array of zero, one or more files related to this event.
 void setErrorLineNumber(int aLineNumber)
          Sets the line number where an error or warning occurred.
 void setErrorMessage(java.lang.String anErrorMessage)
          Sets the error message for an error or warning event.
 java.lang.String toString()
          Returns a meaningful description of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPILE_START_EVENT

public static final int COMPILE_START_EVENT
Event generated when compilation begins.

See Also:
Constant Field Values

COMPILE_WARNING_EVENT

public static final int COMPILE_WARNING_EVENT
Event generated when a compilation warning occurs. A warning event is one that will not invalidate the compilation.

See Also:
Constant Field Values

COMPILE_ERROR_EVENT

public static final int COMPILE_ERROR_EVENT
Event generated when a compilation error occurs. An error event is one that will invalidate the compilation

See Also:
Constant Field Values

COMPILE_DONE_EVENT

public static final int COMPILE_DONE_EVENT
Event generated when a compilation finishes successfully.

See Also:
Constant Field Values

COMPILE_FAILED_EVENT

public static final int COMPILE_FAILED_EVENT
Event generated when a compilation finishes unsuccessfully.

See Also:
Constant Field Values
Constructor Detail

CompileEvent

public CompileEvent(int anEventId,
                    java.io.File[] aFileNames)
Constructor for a CompileEvent.

Method Detail

getEvent

public int getEvent()
Returns the eventId, one of the values defined.


getFiles

public java.io.File[] getFiles()
Returns an array of zero, one or more files related to this event.


setErrorLineNumber

public void setErrorLineNumber(int aLineNumber)
Sets the line number where an error or warning occurred.


getErrorLineNumber

public int getErrorLineNumber()
Returns the line number where the compilation error occurs. Only valid in the case of an error or warning event.


setErrorMessage

public void setErrorMessage(java.lang.String anErrorMessage)
Sets the error message for an error or warning event.


getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message generated by the compiler. Only valid in the case of an error or warning event.


toString

public java.lang.String toString()
Returns a meaningful description of this event.

Overrides:
toString in class java.lang.Object


BlueJ homepage