This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-21
Channels
- # adventofcode (60)
- # aleph (2)
- # announcements (3)
- # architecture (2)
- # babashka (12)
- # beginners (90)
- # calva (14)
- # cider (32)
- # clj-kondo (1)
- # clj-together (7)
- # cljsrn (4)
- # clojars (10)
- # clojure (161)
- # clojure-dev (110)
- # clojure-europe (58)
- # clojure-nl (3)
- # clojure-spec (35)
- # clojure-taiwan (1)
- # clojure-uk (24)
- # clojuredesign-podcast (3)
- # clojurescript (27)
- # conjure (47)
- # cursive (17)
- # data-science (1)
- # datomic (1)
- # depstar (6)
- # fulcro (20)
- # java (4)
- # jobs-rus (1)
- # luminus (4)
- # malli (10)
- # off-topic (8)
- # re-frame (4)
- # reagent (1)
- # reitit (9)
- # reveal (1)
- # rewrite-clj (8)
- # ring (3)
- # sci (44)
- # shadow-cljs (5)
- # spacemacs (6)
- # specter (8)
- # tools-deps (6)
- # vim (1)
- # xtdb (11)
At run time we can do reflection on a Java class / interface to get a list of all of its methods, and the signature of the method, e.g. return type, number of parameters and their types. I know that a method in a class is considered to implement a method signature in an interface if the return type, number of parameters, and types of all parameters are equal, but I believe that there are other cases where the return type and/or parameter types are not equal, but "compatible", that the class's method is also considered to implement the method of the interface. Does anyone have precise rules, and/or some JVM library function, that determines whether a class's method implements an interface's method signature?
this is all in the specs
I assume you're talking about subtypes and covariant return types etc?
if so, see the java language spec