Class StandaloneInitializerBuilder

java.lang.Object
tools.mdsd.library.standalone.initialization.StandaloneInitializerBuilder

public class StandaloneInitializerBuilder extends Object
Builder of StandaloneInitializer instances.
  • Method Details

    • builder

      public static StandaloneInitializerBuilder builder()
      Create a new instance of a builder.
      Returns:
      A new builder.
    • useEcoreClasspathDetection

      public StandaloneInitializerBuilder useEcoreClasspathDetection(boolean use)
      Register meta models and other ecore extensions by parsing the classpath. The default is using it.
      Parameters:
      use - True for using it, false otherwise.
      Returns:
      Modified builder instance.
    • registerProjectURI

      public StandaloneInitializerBuilder registerProjectURI(Class<?> classOfProject, String projectName)
      Register platform URIs for a project to a location determined by a class of this project. This only works if the project name is equal to the name of the project root folder. If this is not the case, use registerProjectURI(Class, String, String). Please note that the path of a fragment bundle project is usually the path of the host bundle after compilation.
      Parameters:
      classOfProject - A class of the project to register.
      projectName - The name of the project to register.
      Returns:
      Modified builder instance.
    • registerProjectURI

      public StandaloneInitializerBuilder registerProjectURI(Class<?> classOfProject, String projectName, String rootFolderName)
      Register platform URIs for a project to a location determined by a class of this project.
      Parameters:
      classOfProject - A class of the project to register.
      projectName - The name of the project to register.
      rootFolderName - The name of the project's root folder.
      Returns:
      Modified builder instance.
    • registerMetaModel

      public StandaloneInitializerBuilder registerMetaModel(String projectName, String relativePath)
      Register a meta model by a given project name and a relative path within this project. Callers have to ensure that
      Parameters:
      projectName - The name of the project.
      relativePath - The path to the meta model file relative to the project without leading slash.
      Returns:
      Modified builder instance.
    • addCustomTask

      public StandaloneInitializerBuilder addCustomTask(InitializationTask task)
      Add a custom initialization task to the builder.
      Parameters:
      task - A custom task to execute during initialization.
      Returns:
      Modified builder instance.
    • build

      public StandaloneInitializer build()
      Builds a StandaloneInitializer based on the configuration done on the builder.
      Returns:
      An initializer.