java.lang.Object
java.lang.Record
com.github.sormuras.bach.Options
public record Options(Options.MainOptions forMain, Options.ConfigurationOptions forConfiguration, Options.ProjectOptions forProject, List<String> unhandledArguments)
extends Record
All well-known options, usually parsed from command-line arguments.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
A group of optional components used as global settings of aConfiguration
instance.static final record
A group of optional components used by the main program.static final record
A group of optional components used when building a project model instance. -
Constructor Summary
ConstructorDescriptionOptions
(Options.MainOptions forMain, Options.ConfigurationOptions forConfiguration, Options.ProjectOptions forProject, List<String> unhandledArguments) Creates an instance of aOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theforConfiguration
record component.forMain()
Returns the value of theforMain
record component.Returns the value of theforProject
record component.final int
hashCode()
Returns a hash code value for this object.static Options
Parses an array of strings in command-line style into an options instance.static Options
final String
toString()
Returns a string representation of this record class.Returns the value of theunhandledArguments
record component.
-
Constructor Details
-
Options
public Options(Options.MainOptions forMain, Options.ConfigurationOptions forConfiguration, Options.ProjectOptions forProject, List<String> unhandledArguments) Creates an instance of aOptions
record class.- Parameters:
forMain
- the value for theforMain
record componentforConfiguration
- the value for theforConfiguration
record componentforProject
- the value for theforProject
record componentunhandledArguments
- the value for theunhandledArguments
record component
-
-
Method Details
-
parse
Parses an array of strings in command-line style into an options instance. -
parse
-
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
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)
. -
forMain
Returns the value of theforMain
record component.- Returns:
- the value of the
forMain
record component
-
forConfiguration
Returns the value of theforConfiguration
record component.- Returns:
- the value of the
forConfiguration
record component
-
forProject
Returns the value of theforProject
record component.- Returns:
- the value of the
forProject
record component
-
unhandledArguments
Returns the value of theunhandledArguments
record component.- Returns:
- the value of the
unhandledArguments
record component
-