Class Main

java.lang.Object
org.basex.util.Main
Direct Known Subclasses:
BaseXGUI, CLI

public abstract class Main extends Object
This is an interface for classes with main methods and command-line arguments.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Main(String[] args)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    Returns a header string for command-line information.
    protected abstract void
    Parses the command-line arguments, specified by the user.
    protected static IOFile
    stopFile(Class<?> clazz, int port)
    Generates a stop file for the specified class and port.
    abstract String
    Returns a usage string for command-line information.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Main

      protected Main(String[] args)
      Constructor.
      Parameters:
      args - command-line arguments
  • Method Details

    • stopFile

      protected static IOFile stopFile(Class<?> clazz, int port)
      Generates a stop file for the specified class and port.
      Parameters:
      clazz - class name
      port - port
      Returns:
      stop file
    • header

      public abstract String header()
      Returns a header string for command-line information.
      Returns:
      header string
    • usage

      public abstract String usage()
      Returns a usage string for command-line information.
      Returns:
      usage string
    • parseArgs

      protected abstract void parseArgs() throws IOException
      Parses the command-line arguments, specified by the user.
      Throws:
      IOException - I/O exception