public final class Out extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NL
platform dependent newline sequence
|
Constructor and Description |
---|
Out() |
Modifier and Type | Method and Description |
---|---|
static void |
checkErrors()
throws a GeneratorException if there are any errors recorded
|
static void |
debug(String message)
Dump debug information to System.out
Use like this
if (Out.DEBUG) Out.debug(message)
to save performance during normal operation (when DEBUG
is turned off). |
static void |
dump(String message)
All parts of JFlex, that want to provide dump information
should use this method for their output.
|
static void |
error(ErrorMessages message)
print error message (code)
|
static void |
error(ErrorMessages message,
File file)
IO error message for a file (displays file
name in parentheses).
|
static void |
error(ErrorMessages message,
String data)
print error message with data
|
static void |
error(File file,
ErrorMessages message,
int line,
int column)
print error message with location information
|
static void |
error(String message)
print error message (string)
|
static void |
print(String message)
Report generation progress.
|
static void |
println(ErrorMessages message,
int data)
Report generation progress.
|
static void |
println(ErrorMessages message,
String data)
Report generation progress.
|
static void |
println(String message)
Report generation progress.
|
static void |
printSystemInfo()
Print system information (e.g.
|
static void |
requestBugReport(Error e)
Request a bug report for an unexpected Exception/Error.
|
static void |
resetCounters()
reset error and warning counters
|
static void |
setGUIMode(TextArea text)
Switches to GUI mode if
text is not null |
static void |
setOutputStream(OutputStream stream)
Sets a new output stream and switches to non-gui mode.
|
static void |
showPosition(File file,
int line)
print a line of a file
|
static void |
showPosition(File file,
int line,
int column)
prints a line of a file with marked position.
|
static void |
statistics()
print error and warning statistics
|
static void |
time(ErrorMessages message,
Timer time)
Report time statistic data.
|
static void |
time(String message)
Report time statistic data.
|
static void |
warning(ErrorMessages message)
print a warning message without line information
|
static void |
warning(ErrorMessages message,
int line)
print a warning with line information
|
static void |
warning(File file,
ErrorMessages message,
int line,
int column)
print warning message with location information
|
static void |
warning(String message)
print a warning without position information
|
public static final String NL
public static void setGUIMode(TextArea text)
text
is not null
text
- the message TextArea of the JFlex GUIpublic static void setOutputStream(OutputStream stream)
stream
- the new output streampublic static void time(ErrorMessages message, Timer time)
message
- the message to be printedtime
- elapsed timepublic static void time(String message)
message
- the message to be printedpublic static void println(String message)
message
- the message to be printedpublic static void println(ErrorMessages message, String data)
message
- the message to be printeddata
- data to be inserted into the messagepublic static void println(ErrorMessages message, int data)
message
- the message to be printeddata
- data to be inserted into the messagepublic static void print(String message)
message
- the message to be printedpublic static void debug(String message)
if (Out.DEBUG) Out.debug(message)
to save performance during normal operation (when DEBUG
is turned off).public static void dump(String message)
public static void checkErrors()
public static void statistics()
public static void resetCounters()
public static void warning(String message)
message
- the warning messagepublic static void warning(ErrorMessages message)
message
- code of the warning messageErrorMessages
public static void warning(ErrorMessages message, int line)
message
- code of the warning messageline
- the line informationErrorMessages
public static void warning(File file, ErrorMessages message, int line, int column)
file
- the file the warning is issued formessage
- the code of the message to printline
- the line number of the positioncolumn
- the column of the positionpublic static void error(String message)
message
- the message to printpublic static void error(ErrorMessages message)
message
- the code of the error messageErrorMessages
public static void error(ErrorMessages message, String data)
data
- data to insert into the messagemessage
- the code of the error messageErrorMessages
public static void error(ErrorMessages message, File file)
message
- the code of the error messagefile
- the file it occurred forpublic static void error(File file, ErrorMessages message, int line, int column)
file
- the file the error occurred formessage
- the code of the error message to printline
- the line number of error positioncolumn
- the column of error positionpublic static void showPosition(File file, int line, int column)
file
- the file of which to show the lineline
- the line to showcolumn
- the column in which to show the markerpublic static void showPosition(File file, int line)
file
- the file to showline
- the line numberpublic static void printSystemInfo()
public static void requestBugReport(Error e)
Copyright © 1998–2016. All rights reserved.