itemsearchresponse.java

来自「it is a tools for developing J2ME applic」· Java 代码 · 共 53 行

JAVA
53
字号
package org.ksoap2.samples.amazon.search.messages;import java.util.*;import org.ksoap2.serialization.*;public class ItemSearchResponse extends BaseObject {    private BookItems bookItems;    private String operationRequest;    public Object getProperty(int index) {        if (index == 0) {            return bookItems;        } else {            return operationRequest;        }    }    public int getPropertyCount() {        return 2;    }    public void getPropertyInfo(int index, Hashtable properties, PropertyInfo info) {        switch (index) {        case 0:            info.name = "Items";            info.type = new BookItems().getClass();            break;        case 1:            info.name = "OperationRequest";            info.type = new SoapObject(NAMESPACE, "OperationRequest").getClass();        default:            break;        }    }    public void setProperty(int index, Object value) {        if (index == 0) {            bookItems = (BookItems) value;        } else {            operationRequest = value.toString();        }    }    public void register(SoapSerializationEnvelope envelope) {        envelope.addMapping(NAMESPACE, "ItemSearchResponse", this.getClass());        new BookItems().register(envelope);        new BookAttributes().register(envelope);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?