KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > soap > axis > ser > SetDeser


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote.soap.axis.ser;
10
11 import java.util.HashSet JavaDoc;
12 import java.util.Set JavaDoc;
13
14 import org.apache.axis.Constants;
15 import org.xml.sax.SAXException JavaDoc;
16
17 /**
18  * @version $Revision: 1.5 $
19  */

20 public class SetDeser extends AxisDeserializer
21 {
22    private Set JavaDoc set = new HashSet JavaDoc();
23
24    public void onSetChildValue(Object JavaDoc value, Object JavaDoc hint) throws SAXException JavaDoc
25    {
26       if (Constants.QNAME_LITERAL_ITEM.getLocalPart().equals(hint)) set.add(value);
27    }
28
29    protected Object JavaDoc createObject() throws SAXException JavaDoc
30    {
31       return set;
32    }
33 }
34
Popular Tags