Class StandaloneInitializerBuilder
- java.lang.Object
-
- tools.mdsd.library.standalone.initialization.StandaloneInitializerBuilder
-
public class StandaloneInitializerBuilder extends Object
Builder ofStandaloneInitializer
instances.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StandaloneInitializerBuilder
addCustomTask(InitializationTask task)
Add a custom initialization task to the builder.StandaloneInitializer
build()
Builds aStandaloneInitializer
based on the configuration done on the builder.static StandaloneInitializerBuilder
builder()
Create a new instance of a builder.StandaloneInitializerBuilder
registerMetaModel(String projectName, String relativePath)
Register a meta model by a given project name and a relative path within this project.StandaloneInitializerBuilder
registerProjectURI(Class<?> classOfProject, String projectName)
Register platform URIs for a project to a location determined by a class of this project.StandaloneInitializerBuilder
registerProjectURI(Class<?> classOfProject, String projectName, String rootFolderName)
Register platform URIs for a project to a location determined by a class of this project.StandaloneInitializerBuilder
useEcoreClasspathDetection(boolean use)
Register meta models and other ecore extensions by parsing the classpath.
-
-
-
Method Detail
-
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, useregisterProjectURI(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- the given project is registered, e.g. by calling
registerProjectURI(Class, String)
- either
useEcoreClasspathDetection(boolean)
is used or all prerequisites for loading the meta model resource are fulfilled
- 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.
- the given project is registered, e.g. by calling
-
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 aStandaloneInitializer
based on the configuration done on the builder.- Returns:
- An initializer.
-
-