trptr.java-wrapper.util

General utility fns and macros used for creating Clojure wrappers of Java classes.

camel-symbol

(camel-symbol clojure-name)

Turns clojure-name (a string or symbol, etc) into clojureName (a symbol).
Opposite of dashed-symbol.

dashed-symbol

Turns someMethodName (a string or symbol, etc) into some-method-name (a symbol).
Opposite of camel-symbol.

doseq-m

macro

(doseq-m macro coll)

Calls macro on each element of coll.

if-call

macro

(if-call obj method arg)

Calls method of obj if arg is non nil. Returns obj.
A special one-method version of clojure.core/doto.

split-camel

Turns someMethodName (a string or symbol, etc) into (“some”, “method”, “name”). C.f. strs->symbol.

strs->symbol

Turns (“some”, “method”, “name”) into some-method-name (a symbol). See split-camel.