Liking cljdoc? Tell your friends :D

hara.reflect.util


box-argclj

(box-arg param-type arg)

Converts primitives to their correct data types (box-arg Float/TYPE 2) => 2.0

(box-arg Integer/TYPE 2.001) => 2

(type (box-arg Short/TYPE 1.0)) => java.lang.Short

Converts primitives to their correct data types
(box-arg Float/TYPE 2)
=> 2.0

(box-arg Integer/TYPE 2.001)
=> 2

(type (box-arg Short/TYPE 1.0))
=> java.lang.Short
raw docstring

is-congruentclj

(is-congruent params args)

makes sure the argument types match with the param types

(is-congruent [Integer/TYPE String] [Long String]) => true

makes sure the argument types match with the param types

(is-congruent [Integer/TYPE String]
              [Long String])
=> true
raw docstring

param-arg-matchclj

(param-arg-match param-type arg-type)

Checks if the second argument can be used as the first argument (param-arg-match Double/TYPE Float/TYPE) => true

(param-arg-match Float/TYPE Double/TYPE) => true

(param-arg-match Integer/TYPE Float/TYPE) => false

(param-arg-match Byte/TYPE Long/TYPE) => false

(param-arg-match Long/TYPE Byte/TYPE) => true

(param-arg-match Long/TYPE Long) => true

(param-arg-match Long Byte) => false

(param-arg-match clojure.lang.PersistentHashMap java.util.Map) => false

(param-arg-match java.util.Map clojure.lang.PersistentHashMap) => true

Checks if the second argument can be used as the first argument
(param-arg-match Double/TYPE Float/TYPE)
=> true

(param-arg-match Float/TYPE Double/TYPE)
=> true

(param-arg-match Integer/TYPE Float/TYPE)
=> false

(param-arg-match Byte/TYPE Long/TYPE)
=> false

(param-arg-match Long/TYPE Byte/TYPE)
=> true

(param-arg-match Long/TYPE Long)
=> true

(param-arg-match Long Byte)
=> false

(param-arg-match clojure.lang.PersistentHashMap java.util.Map)
=> false

(param-arg-match java.util.Map clojure.lang.PersistentHashMap)
=> true
raw docstring

set-fieldclj

(set-field field obj val)

base function to set the field value of a particular object

base function to set the field value of a particular object
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close