Analyzer::Dart::Shelf
Inherits Analyzer < FileHelper < Reference < Object
Shelf (package:shelf_router/shelf_router.dart) is the foundational
Dart HTTP server library. The Router API exposes a method per
verb (router.get, router.post, ...) and a mount('/prefix', subRouter) composition primitive. Handlers are typically wired
with cascade operators on a fresh Router():
final router = Router() ..get('/users', _listUsers) ..post('/users', _createUser) ..get('/users/<id>', _getUser) ..mount('/api/v1', apiRouter.call);
Direct method calls (router.get('/foo', _handler)) and .all(...)
— which registers a handler against every verb — are also
supported. Path captures use angle brackets (<id>, <id|[0-9]+>)
which we surface as {id} path params.
Mounts are resolved across files: a Router variable mounted under
/prefix contributes its routes (recursively) under that prefix in
the parent router. Each top-level router (not mounted anywhere) is
emitted as a separate set of endpoints.
Constants
Matches the official @Route.<verb>('/path') annotation and the
shelf_router_classes @Route('VERB', '/path') variant. Capture 1
is the dotted verb (nil for the string-arg form).
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.