(+meta-read-exact ??)()cache for hara.object.framework.read/meta-read-exact
cache for hara.object.framework.read/meta-read-exact
(+read-template+ <tag> <method>)returns a function template given tag and name
(read/+read-template+ 'String 'hello) => '(clojure.core/fn hello [obj] (. obj (hello)))
returns a function template given tag and name (read/+read-template+ 'String 'hello) => '(clojure.core/fn hello [obj] (. obj (hello)))
(create-read-method-form ele prefix template extra)creates a method based on a template (eval (read/create-read-method-form (reflect/query-class Dog ["getName" :#]) "get" read/+read-template+ nil)) => (contains-in [:name {:type String :fn fn?}])
creates a method based on a template
(eval (read/create-read-method-form (reflect/query-class Dog ["getName" :#])
"get"
read/+read-template+
nil))
=> (contains-in [:name {:type String :fn fn?}])(meta-read cls)access read attributes
(read/meta-read Pet) => (contains-in {:class test.Pet :methods {:name {:fn fn?} :species {:fn fn?}}})
access read attributes
(read/meta-read Pet)
=> (contains-in {:class test.Pet
:methods {:name {:fn fn?}
:species {:fn fn?}}})(meta-read-exact cls)access read attributes for the exact class
(read/meta-read-exact Object) => nil
access read attributes for the exact class (read/meta-read-exact Object) => nil
(meta-read-exact-raw cls)helper function for hara.object.framework.read/meta-read-exact
helper function for hara.object.framework.read/meta-read-exact
(meta-read-exact? cls)checks if read attributes are avaliable
(read/meta-read-exact? Object) => false
checks if read attributes are avaliable (read/meta-read-exact? Object) => false
(parse-opts opts)returns map for a given input
(def -opts- {:a 1}) (read/parse-opts '-opts-) => {:a 1}
returns map for a given input
(def -opts- {:a 1})
(read/parse-opts '-opts-)
=> {:a 1}(read-all-fields cls)all fields of an object from reflection
(-> (read/read-all-fields {}) keys) => [:-hash :-hasheq :-meta :array]
all fields of an object from reflection
(-> (read/read-all-fields {})
keys)
=> [:-hash :-hasheq :-meta :array](read-all-getters cls)(read-all-getters cls opts)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](read-ex k)creates a getter method that throws an an exception
((read/read-ex :hello) nil) => throws
creates a getter method that throws an an exception ((read/read-ex :hello) nil) => throws
(read-fields cls)(read-fields cls query-fn)fields of an object from reflection (-> (read/read-fields Dog) keys) => [:name :species]
fields of an object from reflection
(-> (read/read-fields Dog)
keys)
=> [:name :species](read-getters cls)(read-getters cls opts)(read-getters cls opts query-fn)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](read-getters-form cls)(read-getters-form cls opts)(read-getters-form cls {:keys [prefix template extra] :as opts} query-fn)creates the form for read-getters
(read/read-getters-form Dog) => '{:name {:type java.lang.String, :fn (clojure.core/fn getName [obj] (. obj (getName)))}, :species {:type java.lang.String, :fn (clojure.core/fn getSpecies [obj] (. obj (getSpecies)))}}
creates the form for read-getters
(read/read-getters-form Dog)
=> '{:name {:type java.lang.String,
:fn (clojure.core/fn getName [obj] (. obj (getName)))},
:species {:type java.lang.String,
:fn (clojure.core/fn getSpecies [obj] (. obj (getSpecies)))}}(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"})(to-map obj)creates a map from an object
(read/to-map (Cat. "spike")) => (contains {:name "spike"})
creates a map from an object
(read/to-map (Cat. "spike"))
=> (contains {:name "spike"})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |