std.object.query
all-class-elements
added in 3.0
(all-class-elements class)returns elements
(all-class-elements String)
all-class-elements-raw
(all-class-elements-raw class)helper function for std.object.query/all-class-elements
all-class-members
added in 3.0
(all-class-members class)returns the raw reflected methods, fields and constructors
(all-class-members String)
all-instance-elements
added in 3.0
(all-instance-elements tcls icls)returns the hierarchy of elements corresponding to a class
(all-instance-elements String nil)
all-instance-elements-raw
(all-instance-elements-raw tcls icls)helper function for std.object.query/all-instance-elements
apply-element
added in 3.0
(apply-element obj method args)delegate
added in 3.0
(delegate obj)Allow transparent field access and manipulation to the underlying object.
(def -a- “hello”) (def -*a- (delegate -a-)) (def -world-array- (.getBytes “world”))
(mapv char (-*a- :value)) => \h \e \l \l \o
(-*a- :value -world-array-) (String. ^bytes (-*a- :value)) => “world” -a- => “world”
invoke-intern-element
added in 3.0
(invoke-intern-element _ name {:keys [type class selector], :as config} _)creates the form for element for definvoke
(invoke-intern-element :element ’-foo- {:class String :selector “charAt”} nil)
query-class
added in 3.0
(query-class obj selectors)queries the java view of the class declaration
(query-class String #“^c” :name) ;;=> “charAt” “checkBounds” “codePointAt” “codePointBefore” ;; “codePointCount” “compareTo” “compareToIgnoreCase” ;; “concat” “contains” “contentEquals” “copyValueOf”
query-hierarchy
added in 3.0
(query-hierarchy obj selectors)lists what methods could be applied to a particular instance
(query-hierarchy String :name #“^to”) => “toCharArray” “toLowerCase” “toString” “toUpperCase”
query-instance
added in 3.0
(query-instance obj selectors)lists what class methods could be applied to a particular instance
(query-instance “abc” :name #“^to”) => “toCharArray” “toLowerCase” “toString” “toUpperCase”
(query-instance String :name #“^to”) => (contains “toString”)
query-instance-hierarchy
added in 3.0
(query-instance-hierarchy obj selectors)lists what methods could be applied to a particular instance. includes all super class methods
(query-instance-hierarchy String :name #“^to”) => “toCharArray” “toLowerCase” “toString” “toUpperCase”
query-supers
added in 3.0
(query-supers obj selectors)returns all elements associated with the context class’s super
(query-supers “122” [])
select-class-elements
added in 3.0
(select-class-elements class selectors)returns the processed reflected methods, fields and constructors
(select-class-elements String #“^c” :name)
select-class-elements-raw
(select-class-elements-raw class selectors)helper function for std.object.query/select-class-elements
select-instance-elements
added in 3.0
(select-instance-elements tcls icls selectors)returns the hierarchy of elements corresponding to a class
(select-instance-elements String nil #“^c” :name)
select-instance-elements-raw
(select-instance-elements-raw tcls icls selectors)helper function for std.object.query/select-instance-elements
select-supers-elements
added in 3.0
(select-supers-elements class selectors)returns the elements related to the type’s super classes
(select-supers-elements String [])
select-supers-elements-raw
(select-supers-elements-raw class selectors)helper function for std.object.query/select-supers-elements