1.2.0 permalink Arrow_down_16x16

set-property!

lancet

  • (set-property! inst prop value)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source lancet.clj:42 top

(defn set-property! [inst prop value]
  (let [pd (property-descriptor inst prop)]
    (when-not pd
      (throw (Exception. (format "No such property %s." prop))))
    (let [write-method (.getWriteMethod pd)
          dest-class (get-property-class write-method)]
      (.invoke write-method inst (into-array [(coerce dest-class value)])))))
Vars in lancet/set-property!: defn format into-array let when-not
Used in 0 other vars

Comments top

No comments for set-property!. Log in to add a comment.