summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-06-03 14:04:27 +0000
committerMichael Koch <konqueror@gmx.de>2004-06-03 14:04:27 +0000
commit4c4c14806b954b0e241c9b25d8960967bfece3e9 (patch)
treeb8c7b6caf5556e5fef3165b6677ddc48603bc70f /gnu
parentf30e3b19b16eea2e96d67553a1b96107e2feaa36 (diff)
downloadclasspath-4c4c14806b954b0e241c9b25d8960967bfece3e9.tar.gz
2004-06-03 Michael Koch <konqueror@gmx.de>
* gnu/java/lang/MainThread.java: Reformated to match our coding style.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/java/lang/MainThread.java59
1 files changed, 36 insertions, 23 deletions
diff --git a/gnu/java/lang/MainThread.java b/gnu/java/lang/MainThread.java
index bac4708cc..c4d5edb49 100644
--- a/gnu/java/lang/MainThread.java
+++ b/gnu/java/lang/MainThread.java
@@ -1,5 +1,6 @@
/* gnu.java.lang.MainThread
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,28 +42,40 @@ package gnu.java.lang;
import java.lang.reflect.*;
/**
- ** MainThread is a Thread which uses the main() method of some class.
- **
- ** @author John Keiser
- ** @version 1.1.0, Aug 11 1998
- **/
-public class MainThread {
- String[] args;
- Method mainMethod;
+ * MainThread is a Thread which uses the main() method of some class.
+ *
+ * @author John Keiser
+ * @author Tom Tromey (tromey@redhat.com)
+ */
+public class MainThread
+{
+ // Private data.
+ String[] args;
+ Method mainMethod;
- public MainThread(String classname, String[] args) throws ClassNotFoundException, NoSuchMethodException {
- Class found = Class.forName(classname);
- Class[] argTypes = new Class[1];
- argTypes[0] = args.getClass();
- mainMethod = found.getMethod("main", argTypes);
- this.args = args;
- }
+ public MainThread(String classname, String[] args)
+ throws ClassNotFoundException, NoSuchMethodException
+ {
+ Class found = Class.forName(classname);
+ Class[] argTypes = new Class[1];
+ argTypes[0] = args.getClass();
+ mainMethod = found.getMethod("main", argTypes);
+ this.args = args;
+ }
- public void run() {
- try {
- mainMethod.invoke(null,args);
- } catch(IllegalAccessException e) {
- } catch(InvocationTargetException e) {
- }
- }
+ public void run()
+ {
+ try
+ {
+ mainMethod.invoke(null,args);
+ }
+ catch(IllegalAccessException e)
+ {
+ // Ignore.
+ }
+ catch(InvocationTargetException e)
+ {
+ // Ignore.
+ }
+ }
}