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 theargumentsrecord component.command()Returns the value of thecommandrecord component.cwd()Returns the value of thecwdrecord component.Returns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of therestartAfterRunrecord component.Returns the value of therunAsShellrecord component.Returns the value of thesaveBeforeRunrecord component.final StringtoString()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 aModelRunTargetrecord class.- Parameters:
name- the value for thenamerecord componentcommand- the value for thecommandrecord componentarguments- the value for theargumentsrecord componentcwd- the value for thecwdrecord componentrunAsShell- the value for therunAsShellrecord componentsaveBeforeRun- the value for thesaveBeforeRunrecord componentrestartAfterRun- the value for therestartAfterRunrecord componentenvironment- the value for theenvironmentrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
cwd
Returns the value of thecwdrecord component.- Returns:
- the value of the
cwdrecord component
-
runAsShell
Returns the value of therunAsShellrecord component.- Returns:
- the value of the
runAsShellrecord component
-
saveBeforeRun
Returns the value of thesaveBeforeRunrecord component.- Returns:
- the value of the
saveBeforeRunrecord component
-
restartAfterRun
Returns the value of therestartAfterRunrecord component.- Returns:
- the value of the
restartAfterRunrecord component
-
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-