Package software.amazon.smithy.waiters
Class Matcher<T>
java.lang.Object
software.amazon.smithy.waiters.Matcher<T>
- All Implemented Interfaces:
ToNode
- Direct Known Subclasses:
Matcher.ErrorTypeMember,Matcher.InputOutputMember,Matcher.OutputMember,Matcher.SuccessMember,Matcher.UnknownMember
Determines if an acceptor matches the current state of a resource.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMatches if an operation returns an error, and the error matches the expected error type.static final classstatic final classstatic final classWhen set to true, matches when a call returns a success response.static final classRepresents an union value.static interfaceVisits the variants of the Matcher union type. -
Method Summary
Modifier and TypeMethodDescriptionabstract <U> Uaccept(Matcher.Visitor<U> visitor) Visits the Matcher union type.final booleanstatic Matcher<?>Creates aMatcherfrom aNode.abstract StringGets the member name of the matcher.abstract TgetValue()Gets the value of the set matcher variant.final inthashCode()
-
Method Details
-
getValue
Gets the value of the set matcher variant.- Returns:
- Returns the set variant's value.
-
getMemberName
Gets the member name of the matcher.- Returns:
- Returns the set member name.
-
accept
Visits the Matcher union type.- Type Parameters:
U- The type returned by the visitor.- Parameters:
visitor- Visitor to apply.- Returns:
- Returns the return value of the visitor.
-
hashCode
public final int hashCode() -
equals
-
fromNode
Creates aMatcherfrom aNode.- Parameters:
node-Nodeto create aMatcherfrom.- Returns:
- Returns the create
Matcher. - Throws:
ExpectationNotMetException- if the givennodeis invalid.
-