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, strictWarnings
Fields 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 void
addToContainer
(int where, ToolLogger.Message msg) void
filePosition
(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.int
flush
(boolean printTotals) long
getCount
(EMessageKind kind) private void
insert
(int where, ToolLogger.Message message) Insert a message in the list of outstanding messages.int
lineNumber
(int where) boolean
private void
printAffectedSourceLine
(ToolOutput output, Pair<Integer, Integer> filePosition) void
setInputFileName
(ToolInput inputFileName) void
void
Methods inherited from class org.openjdk.asmtools.common.ToolLogger
getOutputs, getProgramName, getResourceString, getResourceString, getSimpleInputFileName, printException, setOutputs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
usage
in classToolLogger
-
setInputFileName
- Overrides:
setInputFileName
in 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 << 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
-