Package net.neoforged.elc.configs
Record Class JavaApplicationLaunchConfig
java.lang.Object
java.lang.Record
net.neoforged.elc.configs.JavaApplicationLaunchConfig
- Record Components:
project- The name of the Eclipse project associated with the launch.mainClass- The Fully-Qualified name of the main class to launch.arguments- Command-line arguments passed to the program before execution.vmArguments- Command-line arguments passed to the JVM before startup.envVars- Environment variables set during execution.workingDirectory- The working directory for the launch config.stopInMain- If execution will pause in main when entered.jreContainer- The specific JRE to use during execution. SeeJavaApplicationLaunchConfig.Keys.ATTR_JRE_CONTAINER_PATH.extraAttributes- Any additionalEAttributevalues not explicitly permitted by this class that may be of relevance to the launch config.
- All Implemented Interfaces:
LaunchConfig
public record JavaApplicationLaunchConfig(String project, String mainClass, @Nullable String moduleName, List<String> arguments, List<String> vmArguments, Map<String,String> envVars, @Nullable String workingDirectory, boolean stopInMain, @Nullable String jreContainer, List<EAttribute> extraAttributes, boolean useArgumentsFile)
extends Record
implements LaunchConfig
This class implements the
org.eclipse.jdt.launching.localJavaApplication launch configuration type.
It is used for launching a Java Application locally via the main class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forJavaApplicationLaunchConfig.static classHolds keys relevant to serialization ofJavaApplicationLaunchConfig. -
Constructor Summary
ConstructorsConstructorDescriptionJavaApplicationLaunchConfig(String project, String mainClass, @Nullable String moduleName, List<String> arguments, List<String> vmArguments, Map<String, String> envVars, @Nullable String workingDirectory, boolean stopInMain, @Nullable String jreContainer, List<EAttribute> extraAttributes, boolean useArgumentsFile) Creates an instance of aJavaApplicationLaunchConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringargsListToStr(List<String> list) Returns the value of theargumentsrecord component.Serializes this launch configuration into E-Attribute form forLaunchConfig.write(Writer).Creates a new builder for a specific Eclipse project.envVars()Returns the value of theenvVarsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextraAttributesrecord component.getType()Returns the type name that corresponds to this launch config.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thejreContainerrecord component.Returns the value of themainClassrecord component.@Nullable StringReturns the value of themoduleNamerecord component.project()Returns the value of theprojectrecord component.booleanReturns the value of thestopInMainrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseArgumentsFilerecord component.Returns the value of thevmArgumentsrecord component.@Nullable StringReturns the value of theworkingDirectoryrecord component.Methods inherited from interface net.neoforged.elc.configs.LaunchConfig
write
-
Constructor Details
-
JavaApplicationLaunchConfig
public JavaApplicationLaunchConfig(String project, String mainClass, @Nullable @Nullable String moduleName, List<String> arguments, List<String> vmArguments, Map<String, String> envVars, @Nullable @Nullable String workingDirectory, boolean stopInMain, @Nullable @Nullable String jreContainer, List<EAttribute> extraAttributes, boolean useArgumentsFile) Creates an instance of aJavaApplicationLaunchConfigrecord class.- Parameters:
project- the value for theprojectrecord componentmainClass- the value for themainClassrecord componentmoduleName- the value for themoduleNamerecord componentarguments- the value for theargumentsrecord componentvmArguments- the value for thevmArgumentsrecord componentenvVars- the value for theenvVarsrecord componentworkingDirectory- the value for theworkingDirectoryrecord componentstopInMain- the value for thestopInMainrecord componentjreContainer- the value for thejreContainerrecord componentextraAttributes- the value for theextraAttributesrecord componentuseArgumentsFile- the value for theuseArgumentsFilerecord component
-
-
Method Details
-
getType
Description copied from interface:LaunchConfigReturns the type name that corresponds to this launch config.- Specified by:
getTypein interfaceLaunchConfig
-
bakeAttributes
Description copied from interface:LaunchConfigSerializes this launch configuration into E-Attribute form forLaunchConfig.write(Writer).- Specified by:
bakeAttributesin interfaceLaunchConfig- Returns:
- A list containing all E-Attributes that make up this launch config.
-
argsListToStr
-
builder
Creates a new builder for a specific Eclipse project.- Parameters:
project- The name of the Eclipse project the launch config is for.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
project
Returns the value of theprojectrecord component.- Returns:
- the value of the
projectrecord component
-
mainClass
Returns the value of themainClassrecord component.- Returns:
- the value of the
mainClassrecord component
-
moduleName
Returns the value of themoduleNamerecord component.- Returns:
- the value of the
moduleNamerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
vmArguments
Returns the value of thevmArgumentsrecord component.- Returns:
- the value of the
vmArgumentsrecord component
-
envVars
Returns the value of theenvVarsrecord component.- Returns:
- the value of the
envVarsrecord component
-
workingDirectory
Returns the value of theworkingDirectoryrecord component.- Returns:
- the value of the
workingDirectoryrecord component
-
stopInMain
public boolean stopInMain()Returns the value of thestopInMainrecord component.- Returns:
- the value of the
stopInMainrecord component
-
jreContainer
Returns the value of thejreContainerrecord component.- Returns:
- the value of the
jreContainerrecord component
-
extraAttributes
Returns the value of theextraAttributesrecord component.- Returns:
- the value of the
extraAttributesrecord component
-
useArgumentsFile
public boolean useArgumentsFile()Returns the value of theuseArgumentsFilerecord component.- Returns:
- the value of the
useArgumentsFilerecord component
-