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 ToolLogger
ToolLogger.EMessageFormatter, ToolLogger.Message, ToolLogger.ToolResources -
Field Summary
FieldsFields inherited from class ToolLogger
ignoreWarnings, outerLog, strictWarningsFields inherited from interface ILogger
NOWHERE, TAB_REPLACEMENT, usagePattern -
Constructor Summary
ConstructorsConstructorDescriptionCompilerLogger(String programName, Class<?> cls, DualStreamToolOutput outerLog) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToContainer(long where, ToolLogger.Message msg) voidfilePosition(long 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(long where, ToolLogger.Message message) Insert a message in the list of outstanding messages.longlineNumber(long where) longlineOffset(long lineNumber, long where) booleanprivate voidprintAffectedSourceLine(ToolOutput output, Pair<Long, Long> filePosition) voidsetInputFileName(ToolInput inputFileName) voidvoidvoidMethods inherited from class ToolLogger
getOutputs, getProgramName, getResourceString, getResourceString, getSimpleInputFileName, printException, setOutputsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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
-
usage
-
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 long lineNumber(long where) -
lineOffset
public long lineOffset(long lineNumber, long 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
-