@register_router(CompiledRouter)
def inspect_compiled_router(router: CompiledRouter) -> 'List[RouteInfo]':
    'Walk an instance of :class:`~.CompiledRouter` to return a list of defined routes.\n\n    Default route inspector for CompiledRouter.\n\n    Args:\n        router (CompiledRouter): The router to inspect.\n\n    Returns:\n        List[RouteInfo]: A list of :class:`~.RouteInfo`.\n    '

    def _traverse(roots, parent):
        for root in roots:
            path = ((parent + '/') + root.raw_segment)
            if (root.resource is not None):
                methods = []
                if root.method_map:
                    for (method, func) in root.method_map.items():
                        if isinstance(func, partial):
                            real_func = func.func
                        else:
                            real_func = func
                        source_info = _get_source_info(real_func)
                        internal = _is_internal(real_func)
                        method_info = RouteMethodInfo(method, source_info, real_func.__name__, internal)
                        methods.append(method_info)
                (source_info, class_name) = _get_source_info_and_name(root.resource)
                route_info = RouteInfo(path, class_name, source_info, methods)
                routes.append(route_info)
            if root.children:
                _traverse(root.children, path)
    routes = []
    _traverse(router._roots, '')
    return routes
Walk an instance of :class:`~.CompiledRouter` to return a list of defined routes.

Default route inspector for CompiledRouter.

Args:
    router (CompiledRouter): The router to inspect.

Returns:
    List[RouteInfo]: A list of :class:`~.RouteInfo`.
@register_router(CompiledRouter)
def inspect_compiled_router(router: CompiledRouter) -> 'List[RouteInfo]':
    'Walk an instance of :class:`~.CompiledRouter` to return a list of defined routes.\n\n    Default route inspector for CompiledRouter.\n\n    Args:\n        router (CompiledRouter): The router to inspect.\n\n    Returns:\n        List[RouteInfo]: A list of :class:`~.RouteInfo`.\n    '

    def _traverse(roots, parent):
        for root in roots:
            path = ((parent + '/') + root.raw_segment)
            if (root.resource is not None):
                methods = []
                if root.method_map:
                    for (method, func) in root.method_map.items():
                        if isinstance(func, partial):
                            real_func = func.func
                        else:
                            real_func = func
                        source_info = _get_source_info(real_func)
                        internal = _is_internal(real_func)
                        method_info = RouteMethodInfo(method, source_info, real_func.__name__, internal)
                        methods.append(method_info)
                (source_info, class_name) = _get_source_info_and_name(root.resource)
                route_info = RouteInfo(path, class_name, source_info, methods)
                routes.append(route_info)
            if root.children:
                _traverse(root.children, path)
    routes = []
    _traverse(router._roots, )
    return routes