aboutsummaryrefslogtreecommitdiffstats
path: root/sample/evolve/DemoLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'sample/evolve/DemoLoader.java')
-rw-r--r--sample/evolve/DemoLoader.java82
1 files changed, 41 insertions, 41 deletions
diff --git a/sample/evolve/DemoLoader.java b/sample/evolve/DemoLoader.java
index ecf45049..6c16c6dc 100644
--- a/sample/evolve/DemoLoader.java
+++ b/sample/evolve/DemoLoader.java
@@ -1,41 +1,41 @@
-package sample.evolve;
-
-import javassist.*;
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * DemoLoader is a class loader for running a program including
- * an updatable class. This simple loader allows only a single
- * class to be updatable. (Extending it for supporting multiple
- * updatable classes is easy.)
- *
- * To run, type as follows:
- *
- * % java sample.evolve.DemoLoader <port number>
- *
- * Then DemoLoader launches sample.evolve.DemoServer with <port number>.
- * It also translates sample.evolve.WebPage, which sample.evolve.DemoServer
- * uses, so that it is an updable class.
- *
- * Note: JDK 1.2 or later only.
- */
-public class DemoLoader {
- private static final int initialVersion = 0;
- private String updatableClassName = null;
- private CtClass updatableClass = null;
-
- /* Creates a <code>DemoLoader</code> for making class WebPage
- * updatable. Then it runs main() in sample.evolve.DemoServer.
- */
- public static void main(String[] args) throws Throwable {
- Evolution translator = new Evolution();
- ClassPool cp = ClassPool.getDefault();
- cp.insertTranslator(translator);
- Loader cl = new Loader();
- cl.setClassPool(cp);
-
- translator.makeUpdatable("sample.evolve.WebPage");
- cl.run("sample.evolve.DemoServer", args);
- }
-}
+package sample.evolve;
+
+import javassist.*;
+import java.io.*;
+import java.util.Hashtable;
+
+/**
+ * DemoLoader is a class loader for running a program including
+ * an updatable class. This simple loader allows only a single
+ * class to be updatable. (Extending it for supporting multiple
+ * updatable classes is easy.)
+ *
+ * To run, type as follows:
+ *
+ * % java sample.evolve.DemoLoader <port number>
+ *
+ * Then DemoLoader launches sample.evolve.DemoServer with <port number>.
+ * It also translates sample.evolve.WebPage, which sample.evolve.DemoServer
+ * uses, so that it is an updable class.
+ *
+ * Note: JDK 1.2 or later only.
+ */
+public class DemoLoader {
+ private static final int initialVersion = 0;
+ private String updatableClassName = null;
+ private CtClass updatableClass = null;
+
+ /* Creates a <code>DemoLoader</code> for making class WebPage
+ * updatable. Then it runs main() in sample.evolve.DemoServer.
+ */
+ public static void main(String[] args) throws Throwable {
+ Evolution translator = new Evolution();
+ ClassPool cp = ClassPool.getDefault();
+ cp.insertTranslator(translator);
+ Loader cl = new Loader();
+ cl.setClassPool(cp);
+
+ translator.makeUpdatable("sample.evolve.WebPage");
+ cl.run("sample.evolve.DemoServer", args);
+ }
+}