01: package vicazh.hyperpool;
02:
03: import java.util.*;
04: import javax.xml.transform.*;
05:
06: /**
07: * The object mbean writer
08: *
09: * @author Victor Zhigunov
10: * @version 0.4.0
11: */
12: public class MWriter extends Writer {
13: private List<Integer> list;
14:
15: /**
16: * @param tout
17: * xsl result transformer
18: * @param list
19: * objects id list
20: */
21: public MWriter(String tout, List<Integer> list)
22: throws TransformerException {
23: super (tout);
24: this .list = list;
25: }
26:
27: ComData get() throws TransformerException {
28: if (object == null)
29: return null;
30: ComData data = new ComData(get(object));
31: data.objectID = new int[list.size()];
32: for (int i = 0; i < data.objectID.length; i++) {
33: data.objectID[i] = list.get(i);
34: Start.logger.finest("objectID[" + i + "]="
35: + data.objectID[i]);
36: }
37: return data;
38: }
39:
40: private Object object;
41:
42: /**
43: * Set the object
44: */
45: public void setObject(Object object) {
46: this .object = object;
47: }
48:
49: /**
50: * Get the object
51: */
52: public Object getObject() {
53: return object;
54: }
55: }
|