오버로드 방법과 인터페이스 할 때 Clojure의 세대 수준을 발생ArityException 내가 다음과 같은 자바 인터페이스를
public interface Wrapper {
void error(Exception e);
void error(String str);
}
그리고 난 발전기 클래스 Clojure에서의 구현을 만들려고 오전 :
(ns myimpl)
(gen-class
:name myimpl
:implements [Wrapper]
:state state
:init init
:prefix "w-"
:main false
)
(defn- w-error [this ^Exception e]
(println e))
(defn- w-error [this ^String s]
(println s))
을
그럼 내가 REPL에서 방법을 인스턴스를 생성하고 호출 할 :
> (def w (myimpl.))
> (.error w "oops")
이 나를 Arit에게 줄 것이다 yException : 잘못된 수의 args (2)가 다음과 같이 전달되었습니다. myimpl $ w-error.
내가 여기서 잘못 했습니까?