[英]How to access kotlin pojo in java class
class Example {
@SerializedName("foo")
@Expose
var foo: String? = null
@SerializedName("bar")
@Expose
var bar: String? = null
@SerializedName("baz")
@Expose
var baz: String? = null
}
How to access kotlin pojo class properties in java class 如何在Java类中访问Kotlin Pojo类属性
We can access it as given below 我们可以如下访问
Example example = new Example();
example.setBar("");
example.setBaz("");
example.setFoo("");
example.getBar();
example.getBaz();
example.getFoo();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.