Package org.openjdk.asmtools.common

## Class Tool

- java.lang.Object
- - org.openjdk.asmtools.common.Tool

- Direct Known Subclasses:
    `Main`, `Main`, `Main`, `Main`

      public abstract class Tool
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.function.BooleanSupplier` | `DebugFlag` |
    `protected java.io.PrintWriter` | `err` |
    `protected int` | `nerrors` |
    `protected java.io.PrintWriter` | `out` |
    `protected java.util.function.Consumer<java.lang.String>` | `printCannotReadMsg` |
    `protected java.lang.String` | `programName` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Tool​(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String programName)` |
    `Tool​(java.io.PrintWriter out, java.lang.String programName)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `error​(java.lang.String msg)` | Top level error message
    `java.io.DataInputStream` | `getDataInputStream​(java.lang.String fname)` |
    `java.lang.String` | `getError​(java.lang.String msg)` |
    `void` | `print​(java.lang.String msg)` |
    `void` | `println()` |
    `void` | `println​(java.lang.String msg)` | Top level print message
    `protected abstract void` | `usage()` | Usage

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

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

- - ### Field Detail

    - #### programName

          protected final java.lang.String programName

    - #### nerrors

          protected int nerrors

    - #### err

          protected java.io.PrintWriter err

    - #### out

          protected java.io.PrintWriter out

    - #### printCannotReadMsg

          protected java.util.function.Consumer<java.lang.String> printCannotReadMsg

    - #### DebugFlag

          protected java.util.function.BooleanSupplier DebugFlag

  - ### Constructor Detail

    - #### Tool

          public Tool​(java.io.PrintWriter out,
                      java.lang.String programName)

    - #### Tool

          public Tool​(java.io.PrintWriter out,
                      java.io.PrintWriter err,
                      java.lang.String programName)

  - ### Method Detail

    - #### getError

          public java.lang.String getError​(java.lang.String msg)

    - #### error

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

      Top level error message

    - #### println

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

      Top level print message

    - #### println

          public void println()

    - #### print

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

    - #### getDataInputStream

          public java.io.DataInputStream getDataInputStream​(java.lang.String fname)

      Parameters:
        `fname` - file name
      Returns:
        DataInputStream or null if the method can't read a file

    - #### usage

          protected abstract void usage()

      Usage