我正在尝试将
Java代码转换为Objective-C.下面的课程是.的扩展
TestCodeRequest.想知道如何将其转换为目标C等价物.我发现它有点令人困惑,因为Java是静态类型的,并且配置超过了约定.而Objective-C是动态类型的,而且是约定优于配置.我在下面有一个示例代码.任何小提示都应该非常棒.
package com.TestCode.api;
import java.io.IOException;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
import org.json.JSONObject;
public class Categories extends TestCodeRequest {
public Categories(String apiKey, String apiSecret) {
super(apiKey, apiSecret, "categories");
}
public Categories field(Object... fields) {
super.field(fields);
return this;
}
public JSONObject getCategories() throws OAuthMessageSignerException, OAuthExpectationFailedException, OAuthCommunicationException, IOException {
return this.get();
}
public Categories categoriesField(Object... fields) {
return this.field(fields);
}
}