4
我想寫用Clojure以下,但我無法弄清楚了我的生活:如何在Clojure中編寫以下類?
new TouchCommand() {
@Override
public void itemTouched(TouchMenuItem selectedItem) {
}
我想:
(reify com.vaadin.touchkit.TouchMenu$TouchCommand
(itemTouched [^com.vaadin.touchkit.TouchMenu$TouchMenuItem item]))
但它返回:
java.lang.IllegalArgumentException: Can't define method not in interfaces: itemTouched
即使「itemTouched」確實存在於界面中。誰能幫忙?