Package org.openjdk.asmtools.jasm
Class JasmEnvironment
- All Implemented Interfaces:
ILogger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
(package private) static class
Nested classes/interfaces inherited from class org.openjdk.asmtools.common.Environment
Environment.Builder<E extends Environment,
T extends ToolLogger> -
Field Summary
FieldsFields inherited from class org.openjdk.asmtools.common.Environment
FAILED, OK
Fields inherited from interface org.openjdk.asmtools.common.ILogger
NOWHERE, TAB_REPLACEMENT, usagePattern
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
-
Method Summary
Modifier and TypeMethodDescriptionint
void
void
int
flush
(boolean printTotals) long
int
boolean
int
lineNumber
(int where) int
int
read()
void
setInputFile
(ToolInput inputFileName) void
throwErrorException
(int where, String id, Object... args) Throws an error that is associated with scanner position in an input filevoid
throwErrorException
(String id, Object... args) Throws an error that is not associated with scanner position in an input filevoid
void
Methods inherited from class org.openjdk.asmtools.common.Environment
getDataInputStream, getInfo, getInputFile, getLogger, getOutputs, getSimpleInputFileName, getSourceName, getToolOutput, getVerboseFlag, info, printException, setIgnoreWarningsOn, setOutputs, setStrictWarningsOn, setToolOutput, setTraceFlag, setVerboseFlag, trace, traceln, usage
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, getResourceString, print, print, printErrorLn, println, println
-
Field Details
-
inputFile
JasmEnvironment.InputFile inputFile
-
-
Constructor Details
-
JasmEnvironment
- Parameters:
builder
- the jasm environment builder
-
-
Method Details
-
setInputFile
- Overrides:
setInputFile
in classEnvironment<CompilerLogger>
- Throws:
IOException
URISyntaxException
-
warning
-
error
-
warning
-
error
- Specified by:
error
in interfaceILogger
- Overrides:
error
in classEnvironment<CompilerLogger>
-
getErrorCount
public long getErrorCount() -
hasMessages
public boolean hasMessages() -
lineNumber
public int lineNumber(int where) -
throwErrorException
Throws an error that is not associated with scanner position in an input file- Parameters:
id
- id of a string resource in I18NResourceBundleargs
- arguments referenced by the format specifiers in the resource string- Throws:
Error
- exception
-
throwErrorException
Throws an error that is associated with scanner position in an input file- Parameters:
where
- position in an input fileid
- id of a string resource in I18NResourceBundleargs
- arguments referenced by the format specifiers in the resource string- Throws:
Error
- exception
-
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 count of errors
-
getPosition
public int getPosition() -
read
public int read() -
lookForward
public int lookForward() -
convertUnicode
public int convertUnicode()
-