Package xsbti

Interface AppProvider


  • public interface AppProvider
    This represents an interface that can generate applications or servers. This provider grants access to launcher related features associated with the id.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      ComponentProvider components()
      Returns a mechanism you can use to install/find/resolve components.
      java.lang.Class<?> entryPoint()
      Loads the class for the entry point for the application given by 'id'.
      ApplicationID id()
      The ID of the application that will be created by 'newMain' or 'mainClass'.
      java.lang.ClassLoader loader()
      The classloader used to load this application.
      java.lang.Class<? extends AppMain> mainClass()
      Deprecated.
      ("use entryPoint instead") Note: This will throw an exception if the launched application does not extend AppMain.
      java.io.File[] mainClasspath()
      The classpath from which the main class is loaded, excluding Scala jars.
      AppMain newMain()
      Creates a new instance of the entry point of the application given by 'id'.
      ScalaProvider scalaProvider()
      Returns the ScalaProvider that this AppProvider will use.
    • Method Detail

      • scalaProvider

        ScalaProvider scalaProvider()
        Returns the ScalaProvider that this AppProvider will use.
      • id

        ApplicationID id()
        The ID of the application that will be created by 'newMain' or 'mainClass'.
      • loader

        java.lang.ClassLoader loader()
        The classloader used to load this application.
      • mainClass

        @Deprecated
        java.lang.Class<? extends AppMain> mainClass()
        Deprecated.
        ("use entryPoint instead") Note: This will throw an exception if the launched application does not extend AppMain.
        Loads the class for the entry point for the application given by 'id'. This method will return the same class every invocation. That is, the ClassLoader is not recreated each call.
      • entryPoint

        java.lang.Class<?> entryPoint()
        Loads the class for the entry point for the application given by 'id'. This method will return the same class every invocation. That is, the ClassLoader is not recreated each call.
      • newMain

        AppMain newMain()
        Creates a new instance of the entry point of the application given by 'id'. It is NOT guaranteed that newMain().getClass() == mainClass(). The sbt launcher can wrap generic static main methods. In this case, there will be a wrapper class, and you must use the `entryPoint` method.
        Throws:
        java.lang.IncompatibleClassChangeError - if the configuration used for this Application does not represent a launched application.
      • mainClasspath

        java.io.File[] mainClasspath()
        The classpath from which the main class is loaded, excluding Scala jars.
      • components

        ComponentProvider components()
        Returns a mechanism you can use to install/find/resolve components. A component is just a related group of files.