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 classA sorted list of error messages -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate byte[](package private) boolean(package private) Environment.ErrorMessageList of outstanding error messagesstatic final I18NResourceBundleprivate Stringprivate intintThe number of errors and warningsprivate booleanintintprivate String(package private) static boolean -
Constructor Summary
ConstructorsConstructorDescriptionEnvironment(DataInputStream dis, String inputFileName, PrintWriter out, boolean nowarn) -
Method Summary
Modifier and TypeMethodDescription(package private) intfinal voidfinal voidfinal voidvoidIssue an errorfinal voidfinal voidfinal voidfinal voidfinal Stringfinal Stringfinal Stringfinal String(package private) StringerrorString(String err, Object arg1, Object arg2, Object arg3) Error StringvoidFlush outstanding errors(package private) voidinsertError(int where, String message) Insert an error message in the list of outstanding error messages.booleanboolean(package private) int(package private) intlineNumber(int lcpos) (package private) int(package private) intlineOffset(int lcpos) (package private) intvoidOutput a string.voidOutput a string.intread()(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
-