orc.error.compiletime
Interface CompileMessageRecorder

All Known Implementing Classes:
StdErrCompileMsgRecorder

public interface CompileMessageRecorder

Interface to environment's message mechanism for compiler diagnostics. This my be writing to stderr, updating a GUI compile status window, or the like.

Author:
jthywiss

Nested Class Summary
static class CompileMessageRecorder.Severity
           
 
Method Summary
 void beginProcessing(java.io.File file)
          Record that compile processing has begun for the given file.
 void endProcessing(java.io.File file)
          Record that compile processing is complete for the given file.
 CompileMessageRecorder.Severity getMaxSeverity()
           
 void recordMessage(CompileMessageRecorder.Severity severity, int code, java.lang.String message)
          Convenience method, equivalent to recordMessage(severity, code, message, null, null, null)
 void recordMessage(CompileMessageRecorder.Severity severity, int code, java.lang.String message, SourceLocation location, java.lang.Object astNode)
          Convenience method, equivalent to recordMessage(severity, code, message, location, astNode, null)
 void recordMessage(CompileMessageRecorder.Severity severity, int code, java.lang.String message, SourceLocation location, java.lang.Object astNode, java.lang.Throwable exception)
          Record a compile problem message.
 void recordMessage(CompileMessageRecorder.Severity severity, int code, java.lang.String message, SourceLocation location, java.lang.Throwable exception)
          Convenience method, equivalent to recordMessage(severity, code, message, location, null, exception)
 

Method Detail

beginProcessing

void beginProcessing(java.io.File file)
Record that compile processing has begun for the given file. This also resets maxSeverity. Do not call for included files, only for the "main" file that the compiler was invoked on.

Parameters:
file - File for which compiler processing is beginning

recordMessage

void recordMessage(CompileMessageRecorder.Severity severity,
                   int code,
                   java.lang.String message,
                   SourceLocation location,
                   java.lang.Object astNode,
                   java.lang.Throwable exception)
Record a compile problem message. This message is forwarded to the environment in a manner specific to the implementing class.

Parameters:
severity - CompileMessageRecorder.Severity of this message
code - integer code of this message (potentially used for filtering, is supported by the environment}
message - String localized message specifically describing problem for the complier user
location - SourceLocation where problem occurred. Indicate unknown location with a partially filled SourceLocation.
astNode - ASTNode subtree containing problem, or null if not applicable or not available.
exception - Throwable indicating problem, or null if not applicable or not available.

recordMessage

void recordMessage(CompileMessageRecorder.Severity severity,
                   int code,
                   java.lang.String message,
                   SourceLocation location,
                   java.lang.Throwable exception)
Convenience method, equivalent to recordMessage(severity, code, message, location, null, exception)

Parameters:
severity - CompileMessageRecorder.Severity of this message
code - integer code of this message (potentially used for filtering, is supported by the environment}
message - String localized message specifically describing problem for the complier user
location - SourceLocation where problem occurred. Indicate unknown location with a partially filled SourceLocation.
exception - Throwable indicating problem, or null if not applicable or not available.

recordMessage

void recordMessage(CompileMessageRecorder.Severity severity,
                   int code,
                   java.lang.String message,
                   SourceLocation location,
                   java.lang.Object astNode)
Convenience method, equivalent to recordMessage(severity, code, message, location, astNode, null)

Parameters:
severity - CompileMessageRecorder.Severity of this message
code - integer code of this message (potentially used for filtering, is supported by the environment}
message - String localized message specifically describing problem for the complier user
location - SourceLocation where problem occurred. Indicate unknown location with a partially filled SourceLocation.
astNode - ASTNode subtree containing problem, or null if not applicable or not available.

recordMessage

void recordMessage(CompileMessageRecorder.Severity severity,
                   int code,
                   java.lang.String message)
Convenience method, equivalent to recordMessage(severity, code, message, null, null, null)

Parameters:
severity - CompileMessageRecorder.Severity of this message
code - integer code of this message (potentially used for filtering, is supported by the environment}
message - String localized message specifically describing problem for the complier user

getMaxSeverity

CompileMessageRecorder.Severity getMaxSeverity()
Returns:
maximum severity of messages recoded since beginProcessing(File) was invoked

endProcessing

void endProcessing(java.io.File file)
Record that compile processing is complete for the given file.

Parameters:
file - File for which compiler processing is complete