Package dk.gtz.graphedit.model
Record Class ModelRunTarget
java.lang.Object
java.lang.Record
dk.gtz.graphedit.model.ModelRunTarget
- Record Components:
name
- The name of the runtargetcommand
- The command to run - must be a valid path to an executablearguments
- List of command argumentscwd
- Where to execute the command fromrunAsShell
- When true, will run the command in a shellsaveBeforeRun
- When true, will save the project before running the runtargetrestartAfterRun
- When true, will restart the application after the runtarget has been runenvironment
- Mapping of environment variable assignments
public record ModelRunTarget(String name, String command, List<String> arguments, String cwd, Boolean runAsShell, Boolean saveBeforeRun, Boolean restartAfterRun, Map<String,String> environment)
extends Record
Runtarget datastructure. A runtarget is an abstraction over a command-line program call
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thearguments
record component.command()
Returns the value of thecommand
record component.cwd()
Returns the value of thecwd
record component.Returns the value of theenvironment
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.Returns the value of therestartAfterRun
record component.Returns the value of therunAsShell
record component.Returns the value of thesaveBeforeRun
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ModelRunTarget
public ModelRunTarget(String name, String command, List<String> arguments, String cwd, Boolean runAsShell, Boolean saveBeforeRun, Boolean restartAfterRun, Map<String, String> environment) Creates an instance of aModelRunTarget
record class.- Parameters:
name
- the value for thename
record componentcommand
- the value for thecommand
record componentarguments
- the value for thearguments
record componentcwd
- the value for thecwd
record componentrunAsShell
- the value for therunAsShell
record componentsaveBeforeRun
- the value for thesaveBeforeRun
record componentrestartAfterRun
- the value for therestartAfterRun
record componentenvironment
- the value for theenvironment
record component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
command
Returns the value of thecommand
record component.- Returns:
- the value of the
command
record component
-
arguments
Returns the value of thearguments
record component.- Returns:
- the value of the
arguments
record component
-
cwd
Returns the value of thecwd
record component.- Returns:
- the value of the
cwd
record component
-
runAsShell
Returns the value of therunAsShell
record component.- Returns:
- the value of the
runAsShell
record component
-
saveBeforeRun
Returns the value of thesaveBeforeRun
record component.- Returns:
- the value of the
saveBeforeRun
record component
-
restartAfterRun
Returns the value of therestartAfterRun
record component.- Returns:
- the value of the
restartAfterRun
record component
-
environment
Returns the value of theenvironment
record component.- Returns:
- the value of the
environment
record component
-