Skip to content

Commit

Permalink
Update override-method documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Ambrose Bonnaire-Sergeant <abonnairesergeant@gmail.com>
  • Loading branch information
Tobias Kortkamp authored and frenchy64 committed Jul 21, 2015
1 parent f4c699d commit f1ed66c
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion module-rt/src/main/clojure/clojure/core/typed.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,24 @@ for checking namespaces, cf for checking individual forms."}
nil)

(defmacro override-method
"Override type for qualified method methodsym."
"Override type for qualified method methodsym.
methodsym identifies the method to override and should be a
namespace-qualified symbol in the form <class>/<method-name>.
The class name needs to be fully qualified.
typesyn uses the same annotation syntax as functions.
Use non-nil-return instead of override-method if you want to
declare that a method can never return nil.
Example:
(override-method java.util.Properties/stringPropertyNames
[-> (java.util.Set String)])
This overrides the return type of method stringPropertyNames
of class java.util.Properties to be (java.util.Set String)."
[methodsym typesyn]
`(override-method* '~methodsym '~typesyn))

Expand Down

0 comments on commit f1ed66c

Please sign in to comment.