blob: 033aac547119cc1828a916afd461fafae8987ccd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.io.FileOutputStream;
/* */ import java.io.IOException;
/* */ import java.util.Enumeration;
/* */ import java.util.Hashtable;
/* */ import java.util.Vector;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Manifest
/* */ {
/* */ private IndentStream _out;
/* */
/* */ public Manifest(IndentStream out)
/* */ {
/* 28 */ this._out = out;
/* 29 */ this._out.println("MANIFEST Worlds, Inc.");
/* 30 */ this._out.indent();
/* */ }
/* */
/* */ public Manifest(String name) throws IOException {
/* 34 */ this(new IndentStream(new FileOutputStream(name)));
/* */ }
/* */
/* */ public void done() {
/* 38 */ this._out.undent();
/* 39 */ this._out.println("END MANIFEST");
/* 40 */ this._out.close();
/* 41 */ this._out = null;
/* 42 */ this._ht = null;
/* */ }
/* */
/* */ private void printID(String s) {
/* 46 */ this._out.print(" (#" + s + ")");
/* */ }
/* */
/* 49 */ private Hashtable<Object, String> _ht = new Hashtable();
/* 50 */ private int _lastID = 0;
/* */
/* */
/* */
/* */
/* */
/* */ private void printRef(Object obj)
/* */ {
/* 58 */ if ((obj instanceof SuperRoot)) {
/* 59 */ this._out.print(((SuperRoot)obj).getName());
/* */ } else
/* 61 */ this._out.print("<anonymous>");
/* 62 */ if (this._ht.containsKey(obj)) {
/* 63 */ printID((String)this._ht.get(obj));
/* 64 */ this._out.println(" --q.v.--");
/* */ } else {
/* 66 */ String newID = Integer.toString(this._lastID++);
/* 67 */ this._ht.put(obj, newID);
/* 68 */ printID(newID);
/* 69 */ this._out.println(":" + obj.getClass().getName() + " [");
/* 70 */ this._out.indent();
/* 71 */ saveProps((Properties)obj);
/* 72 */ this._out.undent();
/* 73 */ this._out.println("]");
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void saveMaybeProp(Object obj)
/* */ {
/* 84 */ if ((obj instanceof Properties))
/* */ {
/* 86 */ if (!obj.getClass().getName().equals("NET.worlds.scape.Transform")) {
/* 87 */ printRef(obj);
/* 88 */ return; } }
/* 89 */ this._out.println(obj);
/* */ }
/* */
/* */
/* */
/* */
/* */ public void saveProps(Properties obj)
/* */ {
/* 97 */ Enumeration<Object> pe = new EnumProperties(obj);
/* 98 */ while (pe.hasMoreElements()) {
/* 99 */ Property prop = (Property)pe.nextElement();
/* 100 */ this._out.print(prop.getName());
/* 101 */ this._out.print(" := ");
/* 102 */ if ((prop instanceof VectorProperty)) {
/* 103 */ this._out.println("{");
/* 104 */ this._out.indent();
/* */
/* 106 */ Vector<Object> v = (Vector)prop.get();
/* 107 */ if (v != null) {
/* 108 */ Enumeration<Object> ve = v.elements();
/* 109 */ while (ve.hasMoreElements()) {
/* 110 */ saveMaybeProp(ve.nextElement());
/* */ }
/* */ }
/* 113 */ this._out.undent();
/* 114 */ this._out.println("}");
/* */ } else {
/* 116 */ saveMaybeProp(prop.get());
/* */ }
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Manifest.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|