parseTokenParameter method
Returns element
parsed into a TokenElement.
Uses the type definition, unless @Inject
is specified.
Implementation
TokenElement parseTokenParameter(ParameterElement element) {
final constTypeOrToken =
$Inject.firstAnnotationOfExact(element)?.getField('token') ??
$OpaqueToken.firstAnnotationOf(element);
return constTypeOrToken != null
? parseTokenObject(constTypeOrToken, element)
: parseTokenType(element);
}