2024年Clojure调查中分享您的想法!

欢迎!请查阅关于页面获取更多关于此功能的信息。

0投票
java.data
给定一个类

public class BoolTest {
    private Boolean aBoolean;
    private String aString;

    public Boolean isABoolean() {
        return aBoolean;
    }

    public void setABoolean(Boolean value) {
        this.aBoolean = value;
    }

    public String getAString() {
        return aString;
    }

    public void setAString(String aString) {
        this.aString = aString;
    }
}

测试

(def example (BoolTest.))

(defn run-test []
  (do
    (-> example
      (.setABoolean true))
    (-> example
      (.setAString "something"))
    (from-java example)))

***** 实际
(test/run-test) => {:AString "something"}

**** 期望
(test/run-test) => {:AString "something" :ABoolean true}

1 答案

0投票
参考: https://clojure.atlassian.net/browse/JDATA-9 (由报告人提供)
...