I have the following java class.
public class Toto { public void aMethod(A a) { System.out.println("A " + a); } public void aMethod(B b) { System.out.println("B " + b); } } I want to override aMethod(A a) but not aMethod(B b). The only way I could do that was:
(ns titi (:gen-class :extends Toto :exposes-method {aMethod parentMethod})) (defn- -aMethod [this x] (if (= (type x) A) (println "ok do something here") (.parentMethod this x))) Is there a better way to do this? (I mean without checking type of x myself).