API for repl-utils
- ()
by Chris Houser, Christophe Grand, Stephen Gilardi
clojure-contrib is now deprecated
clojure-contrib is no longer being developed or maintained.
Rather than a single, monolithic, contributions library, Clojure now has
a set of separate libraries for each unit of functionality. The libraries
are in the Clojure GitHub organization at
https://github.com/clojure.
API documentation of the libraries can be found at
https://clojure.github.io.
If you're looking for a specific function or namespace from the old
clojure-contrib, see
"Where Did Clojure.Contrib Go".
Full namespace name:
clojure.contrib.repl-utils
Overview
Utilities meant to be used interactively at the REPL
Public Variables and Functions
*local-javadocs*
var
This library, clojure-contrib, is deprecated. See here for more information.
Ref to a list of local paths for Javadoc-generated HTML
files.
Source
*remote-javadocs*
var
This library, clojure-contrib, is deprecated. See here for more information.
Ref to a map from package name prefixes to URLs for remote
Javadocs.
Source
add-break-thread!
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (add-break-thread!)
(add-break-thread! t)
Add the given thread to break-threads so that it will be stopped
any time the user presses Ctrl-C. Calls start-handling-break for
you. Adds the current thread if none is given.
Source
add-local-javadoc
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (add-local-javadoc path)
Adds to the list of local Javadoc paths.
Source
add-remote-javadoc
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (add-remote-javadoc package-prefix url)
Adds to the list of remote Javadoc URLs. package-prefix is the
beginning of the package name that has docs at this URL.
Source
break-threads
var
This library, clojure-contrib, is deprecated. See here for more information.
Threads to stop when Ctrl-C is pressed. See 'add-break-thread!'
Source
expression-info
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (expression-info expr)
Uses the Clojure compiler to analyze the given s-expr. Returns
a map with keys :class and :primitive? indicating what the compiler
concluded about the return value of the expression. Returns nil if
not type info can be determined at compile-time.
Example: (expression-info '(+ (int 5) (float 10)))
Returns: {:class float, :primitive? true}
Source
find-javadoc-url
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (find-javadoc-url classname)
Searches for a URL for the given class name. Tries
*local-javadocs* first, then *remote-javadocs*. Returns a string.
Source
get-source
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (get-source x)
Returns a string of the source code for the given symbol, if it can
find it. This requires that the symbol resolve to a Var defined in
a namespace for which the .clj is in the classpath. Returns nil if
it can't find the source. For most REPL usage, 'source' is more
convenient.
Example: (get-source 'filter)
Source
javadoc
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (javadoc class-or-object)
Opens a browser window displaying the javadoc for the argument.
Tries *local-javadocs* first, then *remote-javadocs*.
Source
run
macro
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (run ns-name & args)
Loads the specified namespace and invokes its "main" function with
optional args. ns-name is not evaluated.
Source
run*
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (run* ns-sym & args)
Loads the specified namespace and invokes its "main" function with
optional args.
Source
show
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (show x)
(show x selector)
With one arg prints all static and instance members of x or (class x).
Each member is listed with a number which can be given as 'selector'
to return the member object -- the REPL will print more details for
that member.
The selector also may be a string or regex, in which case only
members whose names match 'selector' as a case-insensitive regex
will be printed.
Finally, the selector also may be a predicate, in which case only
members for which the predicate returns true will be printed. The
predicate will be passed a single argument, a map that includes the
:text that will be printed and the :member object itself, as well as
all the properies of the member object as translated by 'bean'.
Examples: (show Integer) (show []) (show String 23) (show String "case")
Source
source
macro
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (source n)
Prints the source code for the given symbol, if it can find it.
This requires that the symbol resolve to a Var defined in a
namespace for which the .clj is in the classpath.
Example: (source filter)
Source
start-handling-break
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (start-handling-break)
Register INT signal handler. After calling this, Ctrl-C will cause
all break-threads to be stopped. See 'add-break-thread!'
Source