Package org.openjdk.asmtools.common
Class CompilerLogger
java.lang.Object
org.openjdk.asmtools.common.ToolLogger
org.openjdk.asmtools.common.CompilerLogger
- All Implemented Interfaces:
ILogger
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openjdk.asmtools.common.ToolLogger
ToolLogger.EMessageFormatter, ToolLogger.Message, ToolLogger.ToolResources -
Field Summary
FieldsFields inherited from class org.openjdk.asmtools.common.ToolLogger
ignoreWarnings, outerLog, strictWarningsFields inherited from interface org.openjdk.asmtools.common.ILogger
NOWHERE, TAB_REPLACEMENT, usagePattern -
Constructor Summary
ConstructorsConstructorDescriptionCompilerLogger(String programName, Class<?> cls, DualStreamToolOutput outerLog) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToContainer(int where, ToolLogger.Message msg) voidfilePosition(int where) Gets a pair of line number and line position for the pointer where A 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.intflush(boolean printTotals) longgetCount(EMessageKind kind) private voidinsert(int where, ToolLogger.Message message) Insert a message in the list of outstanding messages.intlineNumber(int where) booleanprivate voidprintAffectedSourceLine(ToolOutput output, Pair<Integer, Integer> filePosition) voidsetInputFileName(ToolInput inputFileName) voidvoidMethods inherited from class org.openjdk.asmtools.common.ToolLogger
getOutputs, getProgramName, getResourceString, getResourceString, getSimpleInputFileName, printException, setOutputsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openjdk.asmtools.common.ILogger
error, error, getOutputs, getResourceString, getToolOutput, info, print, print, printErrorLn, printException, println, println, setOutputs, setToolOutput, trace, traceln, warning
-
Field Details
-
container
-
fileContent
-
-
Constructor Details
-
CompilerLogger
- Parameters:
programName- the tool namecls- the environment class of the tool for which to obtain the resource bundleouterLog- the logger stream
-
-
Method Details
-
warning
-
error
-
getInfo
-
usage
- Specified by:
usagein classToolLogger
-
setInputFileName
- Overrides:
setInputFileNamein classToolLogger- Throws:
IOException
-
filePosition
Gets a pair of line number and line position for the pointer where A 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.- Parameters:
where- absolute position in file = (linepos invalid input: '<'invalid input: '<' OFFSETBITS) | bytepos;- Returns:
- the pair: [line number, line offset]
-
lineNumber
public int lineNumber(int where) -
getCount
-
noMessages
public boolean noMessages() -
flush
public int flush(boolean printTotals) - Parameters:
printTotals- whether to print the total line: N warning(s), K error(s)- Returns:
- 0 if there are no errors otherwise a number of errors
-
printAffectedSourceLine
-
insert
Insert a message in the list of outstanding messages. The list is sorted on input position. -
addToContainer
-