Package org.openjdk.asmtools.jasm

## Class Environment

- java.lang.Object
- - org.openjdk.asmtools.jasm.Environment

-     public class Environment
      extends java.lang.Object

  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 position value.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static I18NResourceBundle` | `i18n` |
    `int` | `nerrors` | The number of errors and warnings
    `int` | `nwarnings` |
    `java.io.PrintWriter` | `out` |
    `int` | `pos` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Environment​(java.io.DataInputStream dis, java.lang.String inputFileName, java.io.PrintWriter out, boolean nowarn)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `error​(int where, java.lang.String err)` |
    `void` | `error​(int where, java.lang.String err, java.lang.Object arg1)` |
    `void` | `error​(int where, java.lang.String err, java.lang.Object arg1, java.lang.Object arg2)` |
    `void` | `error​(int where, java.lang.String err, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)` | Issue an error
    `void` | `error​(java.lang.String err)` |
    `void` | `error​(java.lang.String err, java.lang.Object arg1)` |
    `void` | `error​(java.lang.String err, java.lang.Object arg1, java.lang.Object arg2)` |
    `void` | `error​(java.lang.String err, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)` |
    `java.lang.String` | `errorStr​(java.lang.String err)` |
    `java.lang.String` | `errorStr​(java.lang.String err, java.lang.Object arg1)` |
    `java.lang.String` | `errorStr​(java.lang.String err, java.lang.Object arg1, java.lang.Object arg2)` |
    `java.lang.String` | `errorStr​(java.lang.String err, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)` |
    `void` | `flushErrors()` | Flush outstanding errors
    `java.lang.String` | `getInputFileName()` |
    `java.lang.String` | `getSimpleInputFileName()` |
    `boolean` | `isDebugEnabled()` |
    `boolean` | `isTraceEnabled()` |
    `void` | `output​(java.lang.String msg)` | Output a string.
    `void` | `outputln​(java.lang.String msg)` | Output a string.
    `int` | `read()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### out

          public java.io.PrintWriter out

    - #### pos

          public int pos

    - #### nerrors

          public int nerrors

      The number of errors and warnings

    - #### nwarnings

          public int nwarnings

    - #### i18n

          public static final I18NResourceBundle i18n

  - ### Constructor Detail

    - #### Environment

          public Environment​(java.io.DataInputStream dis,
                             java.lang.String inputFileName,
                             java.io.PrintWriter out,
                             boolean nowarn)
                      throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getInputFileName

          public java.lang.String getInputFileName()

    - #### getSimpleInputFileName

          public java.lang.String getSimpleInputFileName()

    - #### read

          public int read()

    - #### flushErrors

          public void flushErrors()

      Flush outstanding errors

    - #### output

          public void output​(java.lang.String msg)

      Output a string. This can either be an error message or something for debugging. This should be used instead of print.

    - #### outputln

          public void outputln​(java.lang.String msg)

      Output a string. This can either be an error message or something for debugging. This should be used instead of println.

    - #### error

          public void error​(int where,
                            java.lang.String err,
                            java.lang.Object arg1,
                            java.lang.Object arg2,
                            java.lang.Object arg3)

      Issue an error

    - #### error

          public final void error​(int where,
                                  java.lang.String err,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2)

    - #### error

          public final void error​(int where,
                                  java.lang.String err,
                                  java.lang.Object arg1)

    - #### error

          public final void error​(int where,
                                  java.lang.String err)

    - #### error

          public final void error​(java.lang.String err,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2,
                                  java.lang.Object arg3)

    - #### error

          public final void error​(java.lang.String err,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2)

    - #### error

          public final void error​(java.lang.String err,
                                  java.lang.Object arg1)

    - #### error

          public final void error​(java.lang.String err)

    - #### errorStr

          public final java.lang.String errorStr​(java.lang.String err,
                                                 java.lang.Object arg1,
                                                 java.lang.Object arg2,
                                                 java.lang.Object arg3)

    - #### errorStr

          public final java.lang.String errorStr​(java.lang.String err,
                                                 java.lang.Object arg1,
                                                 java.lang.Object arg2)

    - #### errorStr

          public final java.lang.String errorStr​(java.lang.String err,
                                                 java.lang.Object arg1)

    - #### errorStr

          public final java.lang.String errorStr​(java.lang.String err)

    - #### isTraceEnabled

          public boolean isTraceEnabled()

    - #### isDebugEnabled

          public boolean isDebugEnabled()