[英]Java or Kotlin Alternative to JS ParseObject.extend
I'm wanting to port a JavaScript
code to Kotlin
or Java
while using the Android Parse library, but the Java
Parse library doesn't have the function " ParseObject.extend() " because what "extend" does in JavaScript
cannot be done in the Java
world as far as I could understand.我想在使用 Android Parse 库时将
JavaScript
代码移植到Kotlin
或Java
,但Java
Parse 库没有函数“ ParseObject.extend() ”,因为JavaScript
“扩展”不能在据我所知, Java
世界。 The question is now what would the alternative be, how can I port following code to Java
or Kotlin
?:现在的问题是替代方案是什么,我如何将以下代码移植到
Java
或Kotlin
?:
const MyAddress = ParseObject.extend('_MyAddress');
const query = new ParseQuery(MyAddress);
const myAddressRecord = query.get(myAddress);
What I did was following:我所做的是以下内容:
val MyAddress = ParseObject.create("_MyAddress")
val query = ParseQuery(MyAddress.javaClass)
val myAddressRecord = query.get(myAddress)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.