DestinationParser<T extends DestinationParameters> class abstract

A base destination parser.

DestinationParser is used to parse the destination object from the given URI string, and to generate the URI for the destination.

When subclassed, the certain type of destination parameters must be provided.

There are two methods, that must be implemented in the specific parser: parametersFromMap and parametersToMap.

If typed parameters are not required, the DefaultDestinationParser is used.

See also:

Implementers

Constructors

DestinationParser()
Creates destination parser.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isMatch(String uri, Destination<T> destination) bool
Checks if the destination matches the uri.
isPathParameter(String pathSegment) bool
Check if the path segment string is a valid path parameter placeholder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parametersFromMap(Map<String, String> map) Future<T>
Creates a destination parameters object of type T from the given map.
parametersToMap(T parameters) Map<String, String>
Converts destination parameters object of type T to a map.
parseParameters(String uri, Destination<T> matchedDestination) Future<Destination<T>>
Parses parameter values from the specified URI for matched destination.
parsePathParameterName(String pathSegment) String
Extract parameter name from the path segment string.
toString() String
A string representation of this object.
inherited
uri(Destination<DestinationParameters> destination) String
Returns URI string for the destination

Operators

operator ==(Object other) bool
The equality operator.
inherited