Package net.neoforged.elc.configs
Class JavaApplicationLaunchConfig.Builder
java.lang.Object
net.neoforged.elc.configs.JavaApplicationLaunchConfig.Builder
- Enclosing class:
- JavaApplicationLaunchConfig
Builder for
JavaApplicationLaunchConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds one or more program argument to the launch config.Builds aJavaApplicationLaunchConfigtargetting a specific main class.Adds an environment variable to the launch config.Adds all environment variables to the launch config.extraAttribute(EAttribute attr) Adds an unspecified attribute to the builder.jreContainer(@Nullable String jreContainer) Sets the JRE that will be used during execution.moduleName(@Nullable String moduleName) Sets the launch config's module name.Changes the target Eclipse project.stopInMain(boolean stopInMain) Sets the stop in main flag.Sets eclipse to use an argument file to prevent command line length issues.useArgumentsFile(boolean useArgumentsFile) Sets whether eclipse should launch the configuration with an argument file preventing command line length issues.Adds one or more JVM argument to the launch config.workingDirectory(@Nullable String workingDirectory) Sets the working directory.
-
Constructor Details
-
Builder
Creates a new builder for a specific Eclipse project.- Parameters:
project- The name of the Eclipse project the launch config is for.
-
-
Method Details
-
project
Changes the target Eclipse project.- Parameters:
project- The name of the Eclipse project the launch config is for.- Returns:
- this
-
moduleName
Sets the launch config's module name.- Parameters:
moduleName- The module name of the main type.- Returns:
- this
-
args
Adds one or more program argument to the launch config.eclipse variables will be resolved in arguments.
- Parameters:
args- The argument(s) to add.- Returns:
- this
-
vmArgs
Adds one or more JVM argument to the launch config.eclipse variables will be resolved in arguments.
- Parameters:
args- The argument(s) to add.- Returns:
- this
-
envVar
Adds an environment variable to the launch config.Can use eclipse variables for value resolution, but not key resolution.
- Parameters:
key- The key of the env var.value- The value of the env var.- Returns:
- this
-
envVar
Adds all environment variables to the launch config.Can use eclipse variables for value resolution, but not key resolution.
- Parameters:
values- The values and their keys to add.- Returns:
- this
-
workingDirectory
public JavaApplicationLaunchConfig.Builder workingDirectory(@Nullable @Nullable String workingDirectory) Sets the working directory.Can use eclipse variables for path resolution.
- Parameters:
workingDirectory- The working directory.- Returns:
- this
-
stopInMain
Sets the stop in main flag.- Parameters:
stopInMain- The stop in main flag value.- Returns:
- this
-
jreContainer
Sets the JRE that will be used during execution.- Parameters:
jreContainer- The target JRE.- Returns:
- this
- See Also:
-
extraAttribute
Adds an unspecified attribute to the builder.- Parameters:
attr- The attribute being added.- Returns:
- this
-
useArgumentsFile
Sets whether eclipse should launch the configuration with an argument file preventing command line length issues.- Parameters:
useArgumentsFile- Whether to use an argument file.- Returns:
- this
-
useArgumentsFile
Sets eclipse to use an argument file to prevent command line length issues.- Returns:
- this
-
build
Builds aJavaApplicationLaunchConfigtargetting a specific main class.All containers (lists, maps) are copied, so further modification to this builder will not modify the built object.
- Parameters:
mainClass- The main class to launch.- Returns:
- A newly-constructed
JavaApplicationLaunchConfig.
-