Liking cljdoc? Tell your friends :D

hara.object.read


+read-get-template+clj


+read-is-template+clj


+read-template+clj


create-read-methodclj

(create-read-method ele prefix template extra)

creates a method based on a template (read/create-read-method (reflect/query-class Dog ["getName" :#]) "get" read/+read-get-template+ nil) => (contains-in [:name {:prefix "get", :template fn?}])

creates a method based on a template
(read/create-read-method (reflect/query-class Dog ["getName" :#])
                         "get"
                         read/+read-get-template+
                         nil)
=> (contains-in [:name {:prefix "get", :template fn?}])
raw docstring

meta-readclj

(meta-read cls)

accesses the read-attributes of an object

(read/meta-read Pet) => (contains-in {:class test.Pet :methods {:name fn? :species fn?}})

accesses the read-attributes of an object

(read/meta-read Pet)
=> (contains-in {:class test.Pet
                 :methods {:name fn?
                           :species fn?}})
raw docstring

read-all-gettersclj

(read-all-getters cls)
(read-all-getters cls {:keys [prefix template extra]})

returns fields of an object and base classes (-> (read/read-all-getters Dog) keys) => [:class :name :species]

returns fields of an object and base classes
(-> (read/read-all-getters Dog)
    keys)
=> [:class :name :species]
raw docstring

read-gettersclj

(read-getters cls)
(read-getters cls {:keys [prefix template extra]})

returns fields of an object through getter methods (-> (read/read-getters Dog) keys) => [:name :species]

returns fields of an object through getter methods
(-> (read/read-getters Dog)
    keys)
=> [:name :species]
raw docstring

read-reflect-fieldsclj

(read-reflect-fields cls)

fields of an object from reflection (-> (read/read-reflect-fields Dog) keys) => [:name :species]

fields of an object from reflection
(-> (read/read-reflect-fields Dog)
    keys)
=> [:name :species]
raw docstring

to-dataclj

(to-data obj)

creates the object from a string or map

(read/to-data "hello") => "hello"

(read/to-data (write/from-map {:name "hello" :species "dog"} Pet)) => (contains {:name "hello"})

creates the object from a string or map

(read/to-data "hello")
=> "hello"

(read/to-data (write/from-map {:name "hello" :species "dog"} Pet))
=> (contains {:name "hello"})
raw docstring

to-mapclj

(to-map obj)

creates a map from an object

(read/to-map (Cat. "spike")) => {:name "spike"}

creates a map from an object

(read/to-map (Cat. "spike"))
=> {:name "spike"}
raw docstring

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

× close