Record Class Parser.ParseResult
java.lang.Object
java.lang.Record
org.springframework.shell.command.parser.Parser.ParseResult
- Record Components:
commandRegistration
- command registrationoptionResults
- option resultsargumentResults
- argument resultsmessageResults
- message resultsdirectiveResults
- directive result
- Enclosing interface:
- Parser
public static record Parser.ParseResult(CommandRegistration commandRegistration, List<Parser.ParseResult.OptionResult> optionResults, List<Parser.ParseResult.ArgumentResult> argumentResults, List<MessageResult> messageResults, List<DirectiveResult> directiveResults)
extends Record
Results from a
Parser
containing needed information like resolved
CommandRegistration
, list of CommandOption
instances, errors
and directive.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
-
Constructor Summary
ConstructorDescriptionParseResult
(CommandRegistration commandRegistration, List<Parser.ParseResult.OptionResult> optionResults, List<Parser.ParseResult.ArgumentResult> argumentResults, List<MessageResult> messageResults, List<DirectiveResult> directiveResults) Creates an instance of aParseResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentResults
record component.Returns the value of thecommandRegistration
record component.Returns the value of thedirectiveResults
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.Returns the value of themessageResults
record component.Returns the value of theoptionResults
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ParseResult
public ParseResult(CommandRegistration commandRegistration, List<Parser.ParseResult.OptionResult> optionResults, List<Parser.ParseResult.ArgumentResult> argumentResults, List<MessageResult> messageResults, List<DirectiveResult> directiveResults) Creates an instance of aParseResult
record class.- Parameters:
commandRegistration
- the value for thecommandRegistration
record componentoptionResults
- the value for theoptionResults
record componentargumentResults
- the value for theargumentResults
record componentmessageResults
- the value for themessageResults
record componentdirectiveResults
- the value for thedirectiveResults
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)
. -
commandRegistration
Returns the value of thecommandRegistration
record component.- Returns:
- the value of the
commandRegistration
record component
-
optionResults
Returns the value of theoptionResults
record component.- Returns:
- the value of the
optionResults
record component
-
argumentResults
Returns the value of theargumentResults
record component.- Returns:
- the value of the
argumentResults
record component
-
messageResults
Returns the value of themessageResults
record component.- Returns:
- the value of the
messageResults
record component
-
directiveResults
Returns the value of thedirectiveResults
record component.- Returns:
- the value of the
directiveResults
record component
-