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
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionParseResult(CommandRegistration commandRegistration, List<Parser.ParseResult.OptionResult> optionResults, List<Parser.ParseResult.ArgumentResult> argumentResults, List<MessageResult> messageResults, List<DirectiveResult> directiveResults) Creates an instance of aParseResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentResultsrecord component.Returns the value of thecommandRegistrationrecord component.Returns the value of thedirectiveResultsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themessageResultsrecord component.Returns the value of theoptionResultsrecord component.final StringtoString()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 aParseResultrecord class.- Parameters:
commandRegistration- the value for thecommandRegistrationrecord componentoptionResults- the value for theoptionResultsrecord componentargumentResults- the value for theargumentResultsrecord componentmessageResults- the value for themessageResultsrecord componentdirectiveResults- the value for thedirectiveResultsrecord 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 thecommandRegistrationrecord component.- Returns:
- the value of the
commandRegistrationrecord component
-
optionResults
Returns the value of theoptionResultsrecord component.- Returns:
- the value of the
optionResultsrecord component
-
argumentResults
Returns the value of theargumentResultsrecord component.- Returns:
- the value of the
argumentResultsrecord component
-
messageResults
Returns the value of themessageResultsrecord component.- Returns:
- the value of the
messageResultsrecord component
-
directiveResults
Returns the value of thedirectiveResultsrecord component.- Returns:
- the value of the
directiveResultsrecord component
-