summaryrefslogtreecommitdiff
path: root/test/base
diff options
context:
space:
mode:
authorJohn Keiser <shalom@gnu.org>1998-08-12 22:09:17 +0000
committerJohn Keiser <shalom@gnu.org>1998-08-12 22:09:17 +0000
commit36a7e92e9ffbeff70eba1d63a4ac0c5b5d061d09 (patch)
treea3d5cea200a268e4e17e4f65cea18f659ac78c2d /test/base
parente70f339f48aacf592b5f1b5bd1fb5cb2bf751d81 (diff)
downloadclasspath-36a7e92e9ffbeff70eba1d63a4ac0c5b5d061d09.tar.gz
Now outputs one file with all the class names prepended, for easier diffing.
Diffstat (limited to 'test/base')
-rwxr-xr-xtest/base/OutputClass.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/base/OutputClass.java b/test/base/OutputClass.java
index 430827a68..d0fe3ecdf 100755
--- a/test/base/OutputClass.java
+++ b/test/base/OutputClass.java
@@ -11,7 +11,7 @@ public class OutputClass {
args[i] = args[i].replace('/','.');
try {
try {
- OutputClass.outputClass(Class.forName(args[i]),new FileOutputStream(args[i]+".out-"+args[0]));
+ OutputClass.outputClass(Class.forName(args[i]),System.out);
} catch(ClassNotFoundException E) {
new PrintStream(new FileOutputStream(args[i]+".out-"+args[0])).println(args[i] + ": class missing.");
}
@@ -20,15 +20,15 @@ public class OutputClass {
}
}
- static void outputClass(Class c, OutputStream o) {
- PrintStream out = new PrintStream(o);
- out.println("%class%" + Modifier.toString(sanitizeModifier(c.getModifiers())));
+ static void outputClass(Class c, PrintStream out) {
+ out.println(c.getName() + ":class:" + Modifier.toString(sanitizeModifier(c.getModifiers())));
// Put implemented interfaces here
Field[] f = ClassHelper.getAllFields(c);
for(int i=0;i<f.length;i++) {
if(Modifier.isPublic(f[i].getModifiers()) || Modifier.isProtected(f[i].getModifiers())) {
out.println(
- "%field%"
+ c.getName()
+ + ":field:"
+ Modifier.toString(sanitizeModifier(f[i].getModifiers()))
+ " "
+ f[i].getType().getName()
@@ -41,7 +41,8 @@ public class OutputClass {
for(int i=0;i<m.length;i++) {
if(Modifier.isPublic(m[i].getModifiers()) || Modifier.isProtected(m[i].getModifiers())) {
out.println(
- "%method%"
+ c.getName()
+ + ":method:"
+ Modifier.toString(sanitizeModifier(m[i].getModifiers()))
+ " "
+ m[i].getReturnType().getName()
@@ -58,7 +59,8 @@ public class OutputClass {
for(int i=0;i<cl.length;i++) {
if(Modifier.isPublic(cl[i].getModifiers()) || Modifier.isProtected(cl[i].getModifiers())) {
out.println(
- "%constructor%"
+ c.getName()
+ + ":constructor:"
+ Modifier.toString(sanitizeModifier(cl[i].getModifiers()))
+ " "
+ ClassHelper.getTruncatedName(cl[i].getName())