// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.2, build R23)
// Generated source version: 1.1.2

package org.tempuri.sample;

import com.sun.xml.rpc.encoding.*;
import com.sun.xml.rpc.util.exception.LocalizableExceptionAdapter;

public class PresidentialElectionResults2004PortType_whoisgoingtobepresident_ResponseStruct_SOAPBuilder implements SOAPInstanceBuilder {
    private org.tempuri.sample.PresidentialElectionResults2004PortType_whoisgoingtobepresident_ResponseStruct _instance;
    private org.tempuri.sample.Results _return;
    private static final int my_RETURN_INDEX = 0;
    
    public PresidentialElectionResults2004PortType_whoisgoingtobepresident_ResponseStruct_SOAPBuilder() {
    }
    
    public void set_return(org.tempuri.sample.Results _return) {
        this._return = _return;
    }
    
    public int memberGateType(int memberIndex) {
        switch (memberIndex) {
            case my_RETURN_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            default:
                throw new IllegalArgumentException();
        }
    }
    
    public void construct() {
    }
    
    public void setMember(int index, Object memberValue) {
        try {
            switch(index) {
                case my_RETURN_INDEX:
                    _instance.set_return((org.tempuri.sample.Results)memberValue);
                    break;
                default:
                    throw new IllegalArgumentException();
            }
        }
        catch (RuntimeException e) {
            throw e;
        }
        catch (Exception e) {
            throw new DeserializationException(new LocalizableExceptionAdapter(e));
        }
    }
    
    public void initialize() {
    }
    
    public void setInstance(Object instance) {
        _instance = (org.tempuri.sample.PresidentialElectionResults2004PortType_whoisgoingtobepresident_ResponseStruct)instance;
    }
    
    public Object getInstance() {
        return _instance;
    }
}
