Indicate return value when appropriate
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
[marginalia.core :as marg]
|
||||
[play-clj-doclet.html :as html])
|
||||
(:import [com.sun.javadoc ClassDoc ConstructorDoc Doc ExecutableMemberDoc
|
||||
FieldDoc Parameter RootDoc]))
|
||||
FieldDoc MethodDoc Parameter RootDoc]))
|
||||
|
||||
(def targets (-> "targets.edn" io/resource slurp edn/read-string))
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
{:name n})
|
||||
(when (> (count (.commentText d)) 0)
|
||||
{:text (.commentText d)})
|
||||
(when (and (isa? (type d) MethodDoc)
|
||||
(not= (-> d .returnType .typeName) "void"))
|
||||
{:type (-> d .returnType .typeName)})
|
||||
(cond
|
||||
(isa? (type d) ExecutableMemberDoc)
|
||||
{:args (->> d .parameters (map parse-param) vec)}
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
param-name]))
|
||||
|
||||
(defn item
|
||||
[{:keys [name text args]}]
|
||||
[{:keys [name text type args]}]
|
||||
[:div
|
||||
[:p
|
||||
[:b (str name)]
|
||||
" "
|
||||
(string/join ", " (map param args))]
|
||||
(when text [:i text])])
|
||||
(cond
|
||||
text [:i text]
|
||||
type [:i (str "Returns a " type)])])
|
||||
|
||||
(defn create-from-file
|
||||
[parsed-file]
|
||||
|
||||
Reference in New Issue
Block a user