(install-post! f classes-and-methods)
Like install!
but ensures that f
is only called post invocation.
The following contextual data is will always be present in the map passed
to f
:
Key | Value |
---|---|
:id | Uniquely identifies the call. Same value for pre and post calls. |
:args | The vector of args |
:start | Nanoseconds since some fixed but arbitrary origin time. |
:post? | true |
:stop | Nanoseconds since some fixed but arbitrary origin time. |
:spent-ns | Number of nanoseconds elapsed. |
:spent-ms | Number of milliseconds elapsed. Coerced to long. |
:result | The result of applying the value of :function to :args . |
:error | Any exception caught during computation of the result. |
:error? | True if an exception was thrown. |
:this | The object this . Will be nil for static methods. |
Like `install!` but ensures that `f` is only called **post** invocation. The following contextual data is will **always** be present in the map passed to `f`: | Key | Value | | ----------- | ---------------------------------------------------------------- | | `:id` | Uniquely identifies the call. Same value for pre and post calls. | | `:args` | The vector of args | | `:start` | Nanoseconds since some fixed but arbitrary origin time. | | `:post?` | `true` | | `:stop` | Nanoseconds since some fixed but arbitrary origin time. | | `:spent-ns` | Number of nanoseconds elapsed. | | `:spent-ms` | Number of milliseconds elapsed. Coerced to long. | | `:result` | The result of applying the value of `:function` to `:args`. | | `:error` | Any exception caught during computation of the result. | | `:error?` | True if an exception was thrown. | | `:this` | The object `this`. Will be nil for static methods. |
(install-pre! f classes-and-methods)
Like install!
but ensures that f
is only called pre invocation.
The following contextual data is will always be present in the map passed
to f
:
Key | Value |
---|---|
:id | Uniquely identifies the call. Same value for pre and post calls. |
:args | The vector of args |
:start | Nanoseconds since some fixed but arbitrary origin time. |
:pre? | true |
:this | The object this . Will be nil for static methods. |
Like `install!` but ensures that `f` is only called **pre** invocation. The following contextual data is will **always** be present in the map passed to `f`: | Key | Value | | ----------- | ---------------------------------------------------------------- | | `:id` | Uniquely identifies the call. Same value for pre and post calls. | | `:args` | The vector of args | | `:start` | Nanoseconds since some fixed but arbitrary origin time. | | `:pre?` | `true` | | `:this` | The object `this`. Will be nil for static methods. |
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close