• (javadoc class-or-object)
Opens a browser window displaying the javadoc for the argument.
Tries *local-javadocs* first, then *remote-javadocs*.

3 Examples top

  • user=> (use 'clojure.java.javadoc)
    nil
    
    user=> (javadoc String)
    "http://java.sun.com/javase/6/docs/api/java/lang/String.html"
    
    user=> (javadoc (java.util.Date.))
    "http://java.sun.com/javase/6/docs/api/java/util/Date.html"
    
  • user> (javadoc 1)
    "http://java.sun.com/javase/7/docs/api/java/lang/Long.html"
    
    (javadoc "abc")
    "http://java.sun.com/javase/7/docs/api/java/lang/String.html"
  • user> (javadoc org.joda.time.DateTime)
    "http://www.google.com/search?btnI=I%27m%20Feeling%20Lucky&q=allinurl:org/joda/time/DateTime.html"
Log in to add / edit an example.

See Also top

  • 0
    clojure.repl/doc

    Prints documentation for a var or special form given its name

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/java/javadoc.clj:72 top

(defn javadoc
  "Opens a browser window displaying the javadoc for the argument.
  Tries *local-javadocs* first, then *remote-javadocs*."
  {:added "1.2"}
  [class-or-object]
  (let [^Class c (if (instance? Class class-or-object) 
                    class-or-object 
                    (class class-or-object))]
    (if-let [url (javadoc-url (.getName c))]
      (browse-url url)
      (println "Could not find Javadoc for" c))))
Vars in clojure.java.javadoc/javadoc:
Used in 0 other vars

Comments top

No comments for javadoc. Log in to add a comment.