(bind m)(bind config m)Returns a config from all the values of m, coerced into components,
and tagged with the corresponding keys of m.
Designed to be used similar to how Guice or Dagger 2 define modules,
binding implementations to types. With bind, you can bind
implementation vars to abstract tags.
Returns a config from all the values of `m`, coerced into components, and tagged with the corresponding keys of `m`. Designed to be used similar to how Guice or Dagger 2 define _modules_, binding implementations to types. With `bind`, you can bind implementation vars to abstract tags.
(classpath-namespaces)(classpath-namespaces prefixes)Returns a set of symbols of all namespaces on the classpath. When
prefixes are given, only returns namespaces starting with one of the
prefixes.
Returns a set of symbols of all namespaces on the classpath. When `prefixes` are given, only returns namespaces starting with one of the prefixes.
(find-namespaces prefixes)Returns namespaces whose names start with one of the prefixes. Can be
used together with from-namespaces to build a config from loaded
namespaces, found by prefixes.
Returns namespaces whose names start with one of the `prefixes`. Can be used together with [[from-namespaces]] to build a config from loaded namespaces, found by `prefixes`.
(from-namespaces namespaces)(from-namespaces config namespaces)Builds a configuration from the given namespaces.
Builds a configuration from the given namespaces.
(load-namespaces prefixes)Loads and returns all namespaces matching prefixes on the classpath.
Loads and returns all namespaces matching `prefixes` on the classpath.
(scan prefixes)(scan config prefixes)Scans the classpath for namespaces starting with prefixes, and returns
a config with all components found in those.
Scans the classpath for namespaces starting with `prefixes`, and returns a config with all components found in those.
(services)(services name)Builds a configuration map from namespaces configured in
META-INF/services/init.namespaces files on the classpath. The format
of these files is the same as defined by java.util.ServiceLoader.
The default filename init.namespaces can be overridden with name.
Requires com.fbeyer/autoload on the classpath.
Builds a configuration map from namespaces configured in `META-INF/services/init.namespaces` files on the classpath. The format of these files is the same as defined by `java.util.ServiceLoader`. The default filename `init.namespaces` can be overridden with `name`. Requires `com.fbeyer/autoload` on the classpath.
(static-scan prefixes)Like scan, but scans the classpath at macro expansion time.
Expands to code that uses require to load required namespaces, and a
config map created with from-namespaces.
Like [[scan]], but scans the classpath at macro expansion time. Expands to code that uses `require` to load required namespaces, and a config map created with [[from-namespaces]].
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |