Interface EntryPoint<T>

Type Parameters:
T - the main object of the application
All Known Implementing Classes:
FileTree.EntryPoint
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EntryPoint<T>
A factory for an application entry point.

An instance of this interface creates a main object parameterized with an array of command line arguments. What to do with that object is application-specific.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A generic application main class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new application main object.
    default T
    createMainInstance(String[] args, int offset)
    Creates a new application main object.
  • Method Details

    • createMainInstance

      default T createMainInstance(String[] args, int offset)
      Creates a new application main object.
      Parameters:
      args - an array of command line arguments, where the first ones are potentially meant for a higher level
      offset - then index of the first command line argument that is application-specific
      Returns:
      a main object for the application
      Throws:
      IllegalArgumentException - if offset is negative or greater than the length of args
      IndexOutOfBoundsException - if there are not enough remaining command line arguments
    • createMainInstance

      T createMainInstance(String... args)
      Creates a new application main object.
      Parameters:
      args - an array of application-specific command line arguments
      Returns:
      a main object for the application
      Throws:
      IndexOutOfBoundsException - if there are not enough remaining command line arguments