Class Environment

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

public class Environment extends 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 Details

    • out

      public 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 Details

  • Method Details

    • getInputFileName

      public String getInputFileName()
    • getSimpleInputFileName

      public String getSimpleInputFileName()
    • read

      public int read()
    • flushErrors

      public void flushErrors()
      Flush outstanding errors
    • output

      public void output(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(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, String err, Object arg1, Object arg2, Object arg3)
      Issue an error
    • error

      public final void error(int where, String err, Object arg1, Object arg2)
    • error

      public final void error(int where, String err, Object arg1)
    • error

      public final void error(int where, String err)
    • error

      public final void error(String err, Object arg1, Object arg2, Object arg3)
    • error

      public final void error(String err, Object arg1, Object arg2)
    • error

      public final void error(String err, Object arg1)
    • error

      public final void error(String err)
    • errorStr

      public final String errorStr(String err, Object arg1, Object arg2, Object arg3)
    • errorStr

      public final String errorStr(String err, Object arg1, Object arg2)
    • errorStr

      public final String errorStr(String err, Object arg1)
    • errorStr

      public final String errorStr(String err)
    • isTraceEnabled

      public boolean isTraceEnabled()
    • isDebugEnabled

      public boolean isDebugEnabled()