summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/Manifest.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/Manifest.java')
-rw-r--r--NET/worlds/scape/Manifest.java126
1 files changed, 126 insertions, 0 deletions
diff --git a/NET/worlds/scape/Manifest.java b/NET/worlds/scape/Manifest.java
new file mode 100644
index 0000000..033aac5
--- /dev/null
+++ b/NET/worlds/scape/Manifest.java
@@ -0,0 +1,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
+ */ \ No newline at end of file