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. See JavaApplicationLaunchConfig.Keys.ATTR_JRE_CONTAINER_PATH.
extraAttributes - Any additional EAttribute values not explicitly permitted by this class that may be of relevance to the launch config.
All Implemented Interfaces:
LaunchConfig

@Desugar 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.

  • 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 a JavaApplicationLaunchConfig record class.
      Parameters:
      project - the value for the project record component
      mainClass - the value for the mainClass record component
      moduleName - the value for the moduleName record component
      arguments - the value for the arguments record component
      vmArguments - the value for the vmArguments record component
      envVars - the value for the envVars record component
      workingDirectory - the value for the workingDirectory record component
      stopInMain - the value for the stopInMain record component
      jreContainer - the value for the jreContainer record component
      extraAttributes - the value for the extraAttributes record component
      useArgumentsFile - the value for the useArgumentsFile record component
  • Method Details

    • getType

      public String getType()
      Description copied from interface: LaunchConfig
      Returns the type name that corresponds to this launch config.
      Specified by:
      getType in interface LaunchConfig
    • bakeAttributes

      public List<EAttribute> bakeAttributes()
      Description copied from interface: LaunchConfig
      Serializes this launch configuration into E-Attribute form for LaunchConfig.write(Writer).
      Specified by:
      bakeAttributes in interface LaunchConfig
      Returns:
      A list containing all E-Attributes that make up this launch config.
    • argsListToStr

      public static String argsListToStr(List<String> list)
    • builder

      public static JavaApplicationLaunchConfig.Builder builder(String project)
      Creates a new builder for a specific Eclipse project.
      Parameters:
      project - The name of the Eclipse project the launch config is for.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • project

      public String project()
      Returns the value of the project record component.
      Returns:
      the value of the project record component
    • mainClass

      public String mainClass()
      Returns the value of the mainClass record component.
      Returns:
      the value of the mainClass record component
    • moduleName

      @Nullable public @Nullable String moduleName()
      Returns the value of the moduleName record component.
      Returns:
      the value of the moduleName record component
    • arguments

      public List<String> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component
    • vmArguments

      public List<String> vmArguments()
      Returns the value of the vmArguments record component.
      Returns:
      the value of the vmArguments record component
    • envVars

      public Map<String,String> envVars()
      Returns the value of the envVars record component.
      Returns:
      the value of the envVars record component
    • workingDirectory

      @Nullable public @Nullable String workingDirectory()
      Returns the value of the workingDirectory record component.
      Returns:
      the value of the workingDirectory record component
    • stopInMain

      public boolean stopInMain()
      Returns the value of the stopInMain record component.
      Returns:
      the value of the stopInMain record component
    • jreContainer

      @Nullable public @Nullable String jreContainer()
      Returns the value of the jreContainer record component.
      Returns:
      the value of the jreContainer record component
    • extraAttributes

      public List<EAttribute> extraAttributes()
      Returns the value of the extraAttributes record component.
      Returns:
      the value of the extraAttributes record component
    • useArgumentsFile

      public boolean useArgumentsFile()
      Returns the value of the useArgumentsFile record component.
      Returns:
      the value of the useArgumentsFile record component