Package org.openjdk.asmtools.jasm
Class Environment
java.lang.Object
org.openjdk.asmtools.jasm.Environment
An input stream for java programs. The stream treats either "\n", "\r" or "\r\n" as the
end of a line, it always returns \n. It also parses UNICODE characters expressed as
. However, if it sees "\\", the second slash cannot begin a unicode sequence. It
keeps track of the current position in the input stream.
An position consists of: ((linenr << OFFSETBITS) | offset) this means that both
the line number and the exact offset into the file are encoded in each position
value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
A sorted list of error messages -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private byte[]
(package private) boolean
(package private) Environment.ErrorMessage
List of outstanding error messagesstatic final I18NResourceBundle
private String
private int
int
The number of errors and warningsprivate boolean
int
int
private String
(package private) static boolean
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironment
(DataInputStream dis, String inputFileName, PrintWriter out, boolean nowarn) -
Method Summary
Modifier and TypeMethodDescription(package private) int
final void
final void
final void
void
Issue an errorfinal void
final void
final void
final void
final String
final String
final String
final String
(package private) String
errorString
(String err, Object arg1, Object arg2, Object arg3) Error Stringvoid
Flush outstanding errors(package private) void
insertError
(int where, String message) Insert an error message in the list of outstanding error messages.boolean
boolean
(package private) int
(package private) int
lineNumber
(int lcpos) (package private) int
(package private) int
lineOffset
(int lcpos) (package private) int
void
Output a string.void
Output a string.int
read()
(package private) void
(package private) void
-
Field Details
-
traceFlag
static boolean traceFlag -
debugInfoFlag
boolean debugInfoFlag -
inputFileName
-
simpleInputFileName
-
out
-
nowarn
private boolean nowarn -
data
private byte[] data -
bytepos
private int bytepos -
linepos
private int linepos -
pos
public int pos -
nerrors
public int nerrorsThe number of errors and warnings -
nwarnings
public int nwarnings -
i18n
-
errors
Environment.ErrorMessage errorsList of outstanding error messages
-
-
Constructor Details
-
Environment
public Environment(DataInputStream dis, String inputFileName, PrintWriter out, boolean nowarn) throws IOException - Throws:
IOException
-
-
Method Details
-
getInputFileName
-
getSimpleInputFileName
-
lookForward
int lookForward() -
convertUnicode
int convertUnicode() -
read
public int read() -
lineNumber
int lineNumber(int lcpos) -
lineNumber
int lineNumber() -
lineOffset
int lineOffset(int lcpos) -
lineOffset
int lineOffset() -
errorString
Error String -
insertError
Insert an error message in the list of outstanding error messages. The list is sorted on input position. -
flushErrors
public void flushErrors()Flush outstanding errors -
output
Output a string. This can either be an error message or something for debugging. This should be used instead of print. -
outputln
Output a string. This can either be an error message or something for debugging. This should be used instead of println. -
error
Issue an error -
error
-
error
-
error
-
error
-
error
-
error
-
error
-
errorStr
-
errorStr
-
errorStr
-
errorStr
-
isTraceEnabled
public boolean isTraceEnabled() -
isDebugEnabled
public boolean isDebugEnabled() -
trace
-
traceln
-