Class 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-23, BSD License, Christian Gruen
    • Constructor Detail

      • Main

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

      • 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