A set of utility functions mostly for internal use.
A set of utility functions mostly for internal use.
Takes a :keyword-like-this and turns it into a Java-style CONSTANT_LIKE_THIS.
Takes a :keyword-like-this and turns it into a Java-style CONSTANT_LIKE_THIS.
(get-class-constant cls field)
Get the value of a public static field of a Java class. Takes a keyword and assumes that the field is a constant and therefore uses all caps.
Example:
(get-class-constant Math :pi)
;;=> 3.141592653589793
Get the value of a public static field of a Java class. Takes a keyword and assumes that the field is a constant and therefore uses all caps. Example: ``` (get-class-constant Math :pi) ;;=> 3.141592653589793 ```
(get-static-fields-as-keywords cls)
Get a list of all static fields in a class as keywords.
Example:
(get-static-fields-as-keywords Math)
;;=> (:e :pi)
Get a list of all static fields in a class as keywords. Example: ``` (get-static-fields-as-keywords Math) ;;=> (:e :pi) ```
(replace-str match replacement s)
A version of clojure.string/replace that takes the input string as the last argument so that this function can be composed.
A version of clojure.string/replace that takes the input string as the last argument so that this function can be composed.
(string->source string)
Build a StreamSource from a String.
Build a StreamSource from a String.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close