class Example {
@SerializedName("foo")
@Expose
var foo: String? = null
@SerializedName("bar")
@Expose
var bar: String? = null
@SerializedName("baz")
@Expose
var baz: String? = null
}
如何在java类中访问kotlin pojo类属性
最佳答案
我们可以按照下面的方式访问它
Example example = new Example();
example.setBar("");
example.setBaz("");
example.setFoo("");
example.getBar();
example.getBaz();
example.getFoo();
关于java - 如何在java类中访问kotlin pojo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45673499/