uk.ac.starlink.mirage

## Class MirageDriver

- java.lang.Object
- - uk.ac.starlink.mirage.MirageDriver

-     public class MirageDriver
      extends java.lang.Object

  Main application class for the StarTable Mirage front-end. The class named by `MIRAGE_CLASS` must be on the JVM's classpath in order for this to work. No Mirage components need to be available during compilation or distribution of this code however. This is desirable since Mirage is distributed under a more restrictive licence than the GPL.
  See Also:
    Mirage

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `MIRAGE_CLASS` Name of the main Mirage application class.
    `static java.lang.String` | `MIRAGE_CLASSPATH_PROP` Name of the property used to locate the `MIRAGE_CLASS` class.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MirageDriver()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `invokeMirage(StarTable table, java.util.List margs)` Invokes the Mirage application on a StarTable object.
    `static boolean` | `isMirageAvailable()` Indicates whether the Mirage application is available in this JVM.
    `static void` | `main(java.lang.String[] args)` Invoke the Mirage application on a list of named StarTables.

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

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

- - ### Field Detail

    - #### MIRAGE_CLASS

          public static final java.lang.String MIRAGE_CLASS

      Name of the main Mirage application class.
      See Also:
        Constant Field Values

    - #### MIRAGE_CLASSPATH_PROP

          public static final java.lang.String MIRAGE_CLASSPATH_PROP

      Name of the property used to locate the `MIRAGE_CLASS` class.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MirageDriver

          public MirageDriver()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException,
                                  java.lang.Exception

      Invoke the Mirage application on a list of named StarTables. Using the `-d` flag this command can also be used to dump the mirage-formatted version of a given table to standard output.
      Parameters:
        `args` - flags and names of the StarTables to pass to Mirage
      Throws:
        `java.io.IOException`
        `java.lang.Exception`

    - #### isMirageAvailable

          public static boolean isMirageAvailable()

      Indicates whether the Mirage application is available in this JVM. Unless the relevant class is on the classpath, it won't be. The `invokeMirage(uk.ac.starlink.table.StarTable, java.util.List)` method will only work if this method returns `true`.
      Returns:
        `true` iff the class MIRAGE_CLASS does not exist on the path named by the property MIRAGE_CLASSPATH_PROP

    - #### invokeMirage

          public static void invokeMirage(StarTable table,
                                          java.util.List margs)
                                   throws java.lang.ClassNotFoundException,
                                          java.lang.Exception

      Invokes the Mirage application on a StarTable object.
      Parameters:
        `table` - the StarTable to pass to Mirage
        `margs` - a list of other arguments (Strings) to pass as arguments to Mirage
      Throws:
        `java.lang.ClassNotFoundException` - if `isMirageAvailable()` returns `false`
        `java.lang.Exception`