Package org.openjdk.asmtools.jcoder
Class SourceFile
java.lang.Object
org.openjdk.asmtools.jcoder.SourceFile
- All Implemented Interfaces:
Constants
,RuntimeConstants
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 postion
value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final I18NResourceBundle
int
The number of errors and warningsint
Fields inherited from interface org.openjdk.asmtools.jasm.Constants
ATT_ALL, ATT_CODE, CS_BINARY, CS_COMPILED, CS_NOTFOUND, CS_PARSED, CS_SOURCE, CS_UNDECIDED, CS_UNDEFINED, EOF, F_DEBUG, F_DEPENDENCIES, F_DUMP, F_OPTIMIZE, F_VERBOSE, F_WARNINGS, MAXFILESIZE, MAXLINENUMBER, OFFSETBITS, TC_ARRAY, TC_BOOLEAN, TC_BYTE, TC_CHAR, TC_CLASS, TC_DOUBLE, TC_ERROR, TC_FLOAT, TC_INT, TC_LONG, TC_METHOD, TC_NULL, TC_SHORT, TC_VOID, TM_ARRAY, TM_BOOLEAN, TM_BYTE, TM_CHAR, TM_CLASS, TM_DOUBLE, TM_ERROR, TM_FLOAT, TM_INT, TM_INT32, TM_INTEGER, TM_LONG, TM_METHOD, TM_NULL, TM_NUM32, TM_NUM64, TM_NUMBER, TM_REAL, TM_REFERENCE, TM_SHORT, TM_VOID
Fields inherited from interface org.openjdk.asmtools.jasm.RuntimeConstants
ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_MANDATED, ACC_MODULE, ACC_NAMES, ACC_NATIVE, ACC_NONE, ACC_OPEN, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STATIC_PHASE, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_TRANSITIVE, ACC_VARARGS, ACC_VOLATILE, DEPRECATED_ATTRIBUTE, SPLIT_VERIFIER_CFV, SYNTHETIC_ATTRIBUTE
-
Constructor Summary
ConstructorsConstructorDescriptionSourceFile
(Tool tool, DataInputStream dataInputStream, String inputFileName, PrintWriter out) -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeInp()
final void
final void
final void
void
Issue an errorfinal void
final void
void
Flush outstanding errorsint
int
lineNumber
(int pos) void
Output a string.void
Output a string.int
read()
void
void
-
Field Details
-
nerrors
public int nerrorsThe number of errors and warnings -
nwarnings
public int nwarnings -
i18n
-
-
Constructor Details
-
SourceFile
public SourceFile(Tool tool, DataInputStream dataInputStream, String inputFileName, PrintWriter out)
-
-
Method Details
-
getInputFileName
-
closeInp
public void closeInp() -
read
- Throws:
IOException
-
lineNumber
public int lineNumber(int pos) -
lineNumber
public int lineNumber() -
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
-
trace
-
traceln
-